This is the mail archive of the libc-alpha@cygnus.com mailing list for the glibc project.


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

Re: getdate && Y2K



Mark Kettenis writes:
 >    From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
 >    Date: Fri, 18 Dec 1998 10:08:23 +0100 (CET)
 > 
 >    Hi,
 > 
 >    I've downloaded some Y2K test programs from:
 >    ftp://ftp.rdg.opengroup.org/pub/unsupported/stdtools/y2k/
 > 
 >    and got a segmentation fault using the getdate.c program :-(.
 > 
 >    Could somebody check if either the testprogram (appended below) or the
 >    getdate implementation in glibc2.1 is broken and fix it?
 > 
 >    Thanks,
 >    Andreas
 > 
 > On sparc-sun-solaris-2.5.1 the program segfaults too.  But if I
 > uncomment the
 > 
 >    #define TOG_END 38
 > 
 > it produces the output
 > 
 >    getdate(3C) window: 2000-2037 1969-1999
 > 
 > So did you check the program with TOG_END set to 38?  I wrote the
 > initial implementation of getdate in glibc2.1 and IIRC it uses
 > mktime(), which probably means that the implementation is limited to
 > dates up to Jan 1 2038 because of the size of time_t.  Anyway if there
 > is a problem with getdate, I'll take a look at it over the weekend.
 > 
 > Mark
I tried setting TOG_END but was unsuccessful.  

The program is broken since it doesn't check the return values of
getdate which is NULL when the program crashes.  But I'm not sure if
the getdate implementation is ok or not.

Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@gnu.org


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