gettimeofday and POSIX
Ralf Corsepius
ralf.corsepius@rtems.org
Fri Jul 6 02:24:00 GMT 2007
On Thu, 2007-07-05 at 08:35 -0600, Eric Blake wrote:
> gnulib projects that use gettimeofday currently crash when configured with
> -Werror [1], because gettimeofday has the wrong signature according to
> POSIX rules. OK to apply this patch?
Hmm, IMO, no, because
1. SUSv says:
int gettimeofday(struct timeval *restrict, void *restrict);
I.e. either there is a conflicts between standards or the issue you are
trying to fix are bugs inside of the applications.
2. There should not be flags such as _COMPILING_NEWLIB in public and
standardized headers such as sys/time.h. It's bad design, IMO.
Ralf
More information about the Newlib
mailing list