This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] Fix getdata take 2 (was Re: problem with getdate)
- To: Ulrich Drepper <drepper at redhat dot com>, Andreas Jaeger <aj at suse dot de>
- Subject: [PATCH] Fix getdata take 2 (was Re: problem with getdate)
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 17 Jul 2001 17:58:10 +0200
- Cc: libc-alpha at sources dot redhat dot com, Hendrik Uhlmann <HUhlmann at stn-atlas dot de>
- References: <hoitgsrlse.fsf@gee.suse.de> <ho66crtzve.fsf@gee.suse.de>
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jul 17, 2001 at 04:05:25PM +0200, Andreas Jaeger wrote:
>
> I've added a patch to our regression test suite for the bug report by
> Hendrik.
If the testcase is correct, then the following patch instead of the one I
mailed earlier today will do the job.
2001-07-17 Jakub Jelinek <jakub@redhat.com>
* time/getdate.c (__getdate_r): Initialize tm_isdst, tm_gmtoff and
tm_zone before calling strptime.
--- libc/time/getdate.c.jj Fri Sep 1 11:38:27 2000
+++ libc/time/getdate.c Tue Jul 17 17:50:50 2001
@@ -147,6 +147,9 @@ __getdate_r (const char *string, struct
/* Do the conversion. */
tp->tm_year = tp->tm_mon = tp->tm_mday = tp->tm_wday = INT_MIN;
tp->tm_hour = tp->tm_sec = tp->tm_min = INT_MIN;
+ tp->tm_isdst = -1;
+ tp->tm_gmtoff = 0;
+ tp->tm_zone = NULL;
result = strptime (string, line, tp);
if (result && *result == '\0')
break;
Jakub