about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-04-05 16:53:00 +0000
committerUlrich Drepper <drepper@redhat.com>2002-04-05 16:53:00 +0000
commit55544141b859e3c640c52ce962727c5419a2fa6b (patch)
tree7856dc1c51b15ed73d1dccfd7a291222778678cc
parentcc49352eee7ab379df31b96866716a9d54df9124 (diff)
downloadglibc-55544141b859e3c640c52ce962727c5419a2fa6b.tar.gz
glibc-55544141b859e3c640c52ce962727c5419a2fa6b.tar.xz
glibc-55544141b859e3c640c52ce962727c5419a2fa6b.zip
Update.
2002-04-05  Jakub Jelinek  <jakub@redhat.com>

	* time/mktime.c (__mktime_internal): Move check for year < 70 below
	all variable declarations.

2002-04-04  Andreas Schwab  <schwab@suse.de>

	* sysdeps/unix/sysv/linux/ia64/pipe.S: Don't overwrite r8 on error.

	* sysdeps/unix/sysv/linux/x86_64/time.c: Removed.
	* sysdeps/mips/dec/bits/endian.h: Removed since arch is not supported.
-rw-r--r--ChangeLog14
-rw-r--r--time/mktime.c9
2 files changed, 16 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 230f90b65b..a265dbafc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-04-05  Jakub Jelinek  <jakub@redhat.com>
+
+	* time/mktime.c (__mktime_internal): Move check for year < 70 below
+	all variable declarations.
+
+2002-04-04  Andreas Schwab  <schwab@suse.de>
+
+	* sysdeps/unix/sysv/linux/ia64/pipe.S: Don't overwrite r8 on error.
+
 2002-04-04  Andreas Jaeger  <aj@suse.de>
 
 	* sysdeps/x86_64/fpu/e_sqrt.c: New file.
@@ -12,12 +21,11 @@
 	* sysdeps/unix/sysv/linux/x86_64/gettimeofday.S: New file.
 
 	* sysdeps/unix/sysv/linux/x86_64/gettimeofday.c: Removed.
-	* sysdeps/unix/sysv/linux/x86_64/time.S: Removed.
+	* sysdeps/unix/sysv/linux/x86_64/time.c: Removed.
 
 	* configure.in: Handle all mips entries the same.
 
-	* sysdeps/mips/dec/bits/endian.h: Removed since arch is not
-	supported.
+	* sysdeps/mips/dec/bits/endian.h: Removed since arch is not supported.
 	* sysdeps/mips/mips3/*: Likewise.
 	* sysdeps/mips/p40/bits/endian.h: Likewise.
 
diff --git a/time/mktime.c b/time/mktime.c
index 101c197851..5632f14b78 100644
--- a/time/mktime.c
+++ b/time/mktime.c
@@ -246,10 +246,6 @@ __mktime_internal (struct tm *tp,
   int mon_years = mon / 12 - negative_mon_remainder;
   int year = year_requested + mon_years;
 
-  /* Only years after 1970 are defined.  */
-  if (year < 70)
-    return -1;
-
    /* The other values need not be in range:
      the remaining code handles minor overflows correctly,
      assuming int and time_t arithmetic wraps around.
@@ -262,6 +258,11 @@ __mktime_internal (struct tm *tp,
 	      + mday - 1);
 
   int sec_requested = sec;
+
+  /* Only years after 1970 are defined.  */
+  if (year < 70)
+    return -1;
+
 #if LEAP_SECONDS_POSSIBLE
   /* Handle out-of-range seconds specially,
      since ydhms_tm_diff assumes every minute has 60 seconds.  */