This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gettimeofday and POSIX


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]