]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* time/bug-getdate1.c (do_test): Don't use century values which
authorUlrich Drepper <drepper@redhat.com>
Wed, 12 Dec 2007 18:23:00 +0000 (18:23 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 12 Dec 2007 18:23:00 +0000 (18:23 +0000)
aren't valid on 32-bit systems.

ChangeLog
time/bug-getdate1.c
time/mktime.c

index 69fa31bff5856ad9765f1b53acddab52b9d01d60..502ef29681654791099bbca91fe97f32645155c0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-12  Ulrich Drepper  <drepper@redhat.com>
+
+       * time/bug-getdate1.c (do_test): Don't use century values which
+       aren't valid on 32-bit systems.
+
 2007-12-12  Jakub Jelinek  <jakub@redhat.com>
 
        * sysdeps/i386/i486/bits/string.h (memmove): Define as macro.
index 7da88f4548d926eb61f377cdb0e30a1c11427658..3d68cf2a79f69fba08689314703abc8c869bc637 100644 (file)
@@ -115,13 +115,13 @@ do_test (int argc, char *argv[])
   res |= process_getdate_on ("25 3");
 
   output_to_template_file ("%C");
-  res |= process_getdate_on ("98");
+  res |= process_getdate_on ("20");
 
   output_to_template_file ("%C %y %m");
-  res |= process_getdate_on ("98 3 2");
+  res |= process_getdate_on ("20 3 2");
 
   output_to_template_file ("%C %y");
-  res |= process_getdate_on ("21 5");
+  res |= process_getdate_on ("20 5");
 
   /*
    * The following testcase reproduces the problem:
index 8f00c72e09ab4f1db4be3a7042a4a2a262eb1710..e299375a16293db0a3293cad711c5d6b66ee96cc 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert a `struct tm' to a time_t value.
-   Copyright (C) 1993-1999, 2002-2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1993-1999, 2002-2006, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Eggert <eggert@twinsun.com>.
 
@@ -372,7 +372,7 @@ __mktime_internal (struct tm *tp,
       int diff = approx_biennia - approx_requested_biennia;
       int abs_diff = diff < 0 ? - diff : diff;
 
-      /* IRIX 4.0.5 cc miscaculates TIME_T_MIN / 3: it erroneously
+      /* IRIX 4.0.5 cc miscalculates TIME_T_MIN / 3: it erroneously
         gives a positive value of 715827882.  Setting a variable
         first then doing math on it seems to work.
         (ghazi@caip.rutgers.edu) */