about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-11-14 16:58:17 +0000
committerUlrich Drepper <drepper@redhat.com>2006-11-14 16:58:17 +0000
commitbef8927ad4b655ffa574a26810597de601fd8daf (patch)
tree97383aeb134342f55f9caad13ff2f2771ffc0520
parent146c129a46b58a6af9379047e2c4832d446a6185 (diff)
downloadglibc-bef8927ad4b655ffa574a26810597de601fd8daf.tar.gz
glibc-bef8927ad4b655ffa574a26810597de601fd8daf.tar.xz
glibc-bef8927ad4b655ffa574a26810597de601fd8daf.zip
[BZ #3137]
2006-11-14  Ulrich Drepper  <drepper@redhat.com>
	* timezone/zdump.c: Redo fix for BZ #3137.

	* timezone/scheck.c: Likewise.
-rw-r--r--ChangeLog6
-rw-r--r--time/tzfile.c4
-rw-r--r--timezone/zdump.c4
3 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index f60d058aea..eff033d2de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-11-14  Ulrich Drepper  <drepper@redhat.com>
+
+	* timezone/zdump.c: Redo fix for BZ #3137.
+
 2006-11-10  Ulrich Drepper  <drepper@redhat.com>
 
 	* timezone/africa: Update from tzdata2006o.
@@ -17,7 +21,7 @@
 	* timezone/checktab.awk: Update from tzcode2006o.
 	* timezone/ialloc.c: Likewise.
 	* timezone/private.h: Likewise.
-	* timezone/scheck.: Likewise.
+	* timezone/scheck.c: Likewise.
 	* timezone/tzfile.h: Likewise.
 	* timezone/tzselect.ksh: Likewise.
 	* timezone/zdump.c: Likewise.
diff --git a/time/tzfile.c b/time/tzfile.c
index 295f0aa3cb..ea2d7cae4c 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -279,7 +279,9 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
     if (__builtin_expect (type_idxs[i] >= num_types, 0))
       goto lose;
 
-  if (BYTE_ORDER != BIG_ENDIAN || (sizeof (time_t) == 8 && trans_width == 4))
+  if ((BYTE_ORDER != BIG_ENDIAN && (sizeof (time_t) == 4 || trans_width == 4))
+      || (BYTE_ORDER == BIG_ENDIAN && sizeof (time_t) == 8
+	  && trans_width == 4))
     {
       /* Decode the transition times, stored as 4-byte integers in
 	 network (big-endian) byte order.  We work from the end of
diff --git a/timezone/zdump.c b/timezone/zdump.c
index b5dd09b861..ae4d286b12 100644
--- a/timezone/zdump.c
+++ b/timezone/zdump.c
@@ -385,7 +385,7 @@ _("%s: usage is %s [ --version ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"),
 	}
 	if (fflush(stdout) || ferror(stdout)) {
 		(void) fprintf(stderr, "%s: ", progname);
-		(void) perror(_("Error writing standard output"));
+		(void) perror(_("Error writing to standard output"));
 		exit(EXIT_FAILURE);
 	}
 	exit(EXIT_SUCCESS);
@@ -423,7 +423,7 @@ _("%s: use of -v on system with floating time_t other than float or double\n"),
 			t = t1;
 			t1 = 2 * t1 + 1;
 		}
-		  
+
 		absolute_max_time = t;
 		t = -t;
 		absolute_min_time = t - 1;