summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-04-15 10:15:16 +0000
committerUlrich Drepper <drepper@redhat.com>1998-04-15 10:15:16 +0000
commit479e9b3f2135707d4bfd13bf6c2ad1a242ea6cfc (patch)
tree9c17c6ca936f6c5ec2c003c9e47292bdba689643
parent480bc72713c841bbf55f4a33fe9f11d2c304ef1a (diff)
downloadglibc-479e9b3f2135707d4bfd13bf6c2ad1a242ea6cfc.tar.gz
glibc-479e9b3f2135707d4bfd13bf6c2ad1a242ea6cfc.tar.xz
glibc-479e9b3f2135707d4bfd13bf6c2ad1a242ea6cfc.zip
Update.
1998-04-15  Ulrich Drepper  <drepper@cygnus.com>

	* iconv/gconv_simple.c (__gconv_transform_ucs4_ascii): Fix typo in
	last change.

1998-04-14  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* elf/dl-minimal.c (__strtol_internal): Correct range check.  Fix
	return value on overflow.

1998-04-14  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/posix/mkstemp.c (mkstemp): Change value and v to 64
	bits.

1998-04-14  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* malloc/mtrace.c (mtrace): Use standard function setvbuf instead
	of non-standard function setbuffer.

1998-04-15  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* stdio-common/perror.c: Include <string.h> for __strerror_r.
-rw-r--r--ChangeLog24
-rw-r--r--elf/dl-minimal.c11
-rw-r--r--iconv/gconv_simple.c2
-rw-r--r--malloc/mtrace.c2
-rw-r--r--stdio-common/perror.c1
-rw-r--r--sysdeps/posix/mkstemp.c4
6 files changed, 33 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index b860a45c72..0068610dc3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+1998-04-15  Ulrich Drepper  <drepper@cygnus.com>
+
+	* iconv/gconv_simple.c (__gconv_transform_ucs4_ascii): Fix typo in
+	last change.
+
+1998-04-14  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+	* elf/dl-minimal.c (__strtol_internal): Correct range check.  Fix
+	return value on overflow.
+
+1998-04-14  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+	* sysdeps/posix/mkstemp.c (mkstemp): Change value and v to 64
+	bits.
+
+1998-04-14  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+	* malloc/mtrace.c (mtrace): Use standard function setvbuf instead
+	of non-standard function setbuffer.
+
+1998-04-15  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+	* stdio-common/perror.c: Include <string.h> for __strerror_r.
+
 1998-04-14 23:54  Ulrich Drepper  <drepper@cygnus.com>
 
 	* iconvdata/Makefile: Add rules to run tests.
diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c
index c9a0575fd0..b0c8c465e4 100644
--- a/elf/dl-minimal.c
+++ b/elf/dl-minimal.c
@@ -247,15 +247,12 @@ __strtol_internal (const char *nptr, char **endptr, int base, int group)
     {
       unsigned long int digval = *nptr - '0';
       if (result > LONG_MAX / 10
-	  || (result == (sign
-			 ? (unsigned long int) LONG_MAX
-			 : (unsigned long int) LONG_MAX + 1) / 10
-	      && digval > (sign
-			   ? (unsigned long int) LONG_MAX
-			   : (unsigned long int) LONG_MAX + 1) % 10))
+	  || (sign > 0 ? result == LONG_MAX / 10 && digval > LONG_MAX % 10
+	      : (result == ((unsigned long int) LONG_MAX + 1) / 10
+		 && digval > ((unsigned long int) LONG_MAX + 1) % 10)))
 	{
 	  errno = ERANGE;
-	  return LONG_MAX * sign;
+	  return sign > 0 ? LONG_MAX : LONG_MIN;
 	}
       result *= 10;
       result += digval;
diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c
index 21f3caee92..38b6b56adb 100644
--- a/iconv/gconv_simple.c
+++ b/iconv/gconv_simple.c
@@ -239,7 +239,7 @@ __gconv_transform_ucs4_ascii (struct gconv_step *step,
 	  size_t cnt = 0;
 
 	  while (data->outbufavail < data->outbufsize
-		 && cnt + sizeof (wchar_t) + 3 < *inlen)
+		 && cnt + 3 < *inlen)
 	    {
 	      if (*newinbuf < L'\0' || *newinbuf > L'\x7f')
 		{
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
index a7f0a90d5f..f3c1387274 100644
--- a/malloc/mtrace.c
+++ b/malloc/mtrace.c
@@ -244,7 +244,7 @@ mtrace ()
       if (mallstream != NULL)
 	{
 	  /* Be sure it doesn't malloc its buffer!  */
-	  setbuffer (mallstream, malloc_trace_buffer, TRACE_BUFFER_SIZE);
+	  setvbuf (mallstream, malloc_trace_buffer, _IOFBF, TRACE_BUFFER_SIZE);
 	  fprintf (mallstream, "= Start\n");
 	  tr_old_free_hook = __free_hook;
 	  __free_hook = tr_freehook;
diff --git a/stdio-common/perror.c b/stdio-common/perror.c
index 4b29f5286a..4c29cb09e1 100644
--- a/stdio-common/perror.c
+++ b/stdio-common/perror.c
@@ -17,6 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <stdio.h>
+#include <string.h>
 #include <errno.h>
 
 /* Print a line on stderr consisting of the text in S, a colon, a space,
diff --git a/sysdeps/posix/mkstemp.c b/sysdeps/posix/mkstemp.c
index 3d8be9cc9c..f0db5d5d53 100644
--- a/sysdeps/posix/mkstemp.c
+++ b/sysdeps/posix/mkstemp.c
@@ -35,7 +35,7 @@ mkstemp (template)
 {
   static const char letters[]
     = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
-  static uint32_t value;
+  static uint64_t value;
   struct timeval tv;
   char *XXXXXX;
   size_t len;
@@ -57,7 +57,7 @@ mkstemp (template)
 
   for (count = 0; count < TMP_MAX; ++count)
     {
-      uint32_t v = value;
+      uint64_t v = value;
       int fd;
 
       /* Fill in the random bits.  */