This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: (libf2c) libu77 struct timezone configuration fix


On 13 Apr 1999, Dave Love wrote:

> >>>>> "MK" == Mumit Khan <khan@xraylith.wisc.edu> writes:
> 
>  MK> This patch fixes a problem in libU77/datetime_.c regarding the use of
>  MK> struct timezone and gettimeofday.
> 
>  MK> This patch is essential to build on i386-pc-interix which lacks the
>  MK> ``struct timezone'', but does have gettimeofday (2nd arg is void* like
>  MK> on HPUX). 
> 
> If the standard timezone test is deficient (which I don't see),
> shouldn't the necessary stuff go in autoconf, not here?  It at least
> needs some commentary, I think.  The position of the comment in
> datetime_.c confused me too initially; it looks as though it refers to
> the following statement, saying it isn't correct.

Here's quote from Susv2:

  The gettimeofday() function obtains the current time, expressed
  as seconds and microseconds since 00:00 Coordinated Universal
  Time (UTC), January 1, 1970, and stores it in the timeval structure
  pointed to by tp. The resolution of the system clock is  unspecified. 

  If tzp is not a null pointer, the behaviour is unspecified.

Another quote from glibc2:

  The use of the timezone struct is obsolete; the tz_dsttime
  field has never been used under Linux - it  has  not  been
  and  will  not  be  supported  by libc or glibc.  Each and
  every occurrence of this field in the kernel source (other
  than  the  declaration)  is  a bug. Thus, the following is
  purely of historic interest.

In other words, the existing code is non-conformant. However, the
legacy systems, such as SunOS 4.1.x, are supported via the #ifdef'd 
part.

Let me know if you want more clarification, and/or any particular way you
want me to handle this.

> [What is `interix' anyway?]

POSIX subsystem for windows32 -- http://www.interix.com/.

Regards,
Mumit




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