about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog24
-rwxr-xr-xdebug/catchsegv.sh23
-rw-r--r--locale/programs/charmap.c5
-rw-r--r--malloc/hooks.c6
-rw-r--r--misc/syslog.c4
-rw-r--r--sysdeps/generic/w_lgamma.c2
-rw-r--r--sysdeps/generic/w_lgammaf.c2
-rw-r--r--sysdeps/generic/w_lgammal.c2
-rw-r--r--time/mktime.c8
9 files changed, 59 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e55416131..0644ceccd3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2002-04-03  Ulrich Drepper  <drepper@redhat.com>
+
+	* locale/programs/charmap.c (charmap_read): If the charmap doesn't
+	define a code_set_name provide one based on the filename.
+
+	* malloc/hooks.c: Define weak_variable correctly for _LIBC.
+
+2001-12-28  Andreas Jaeger  <aj@suse.de>
+
+	* time/mktime.c (__mktime_internal): Check for year < 70
+	[PR libc/2738].
+
 2002-04-03  Andreas Jaeger  <aj@suse.de>
 
 	* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Fix arguments for
@@ -6,6 +18,16 @@
 
 2002-04-03  Ulrich Drepper  <drepper@redhat.com>
 
+	* sysdeps/generic/w_lgamma.c: Initialized local_signgam.
+	* sysdeps/generic/w_lgammaf.c: Likewise.
+	* sysdeps/generic/w_lgammal.c: Likewise [PR libc/2854].
+
+	* debug/catchsegv.sh (exval): Quote [ in pattern [PR libc/2902].
+	Adjust for new output format of the backtrace functions.
+
+	* misc/syslog.c (vsyslog): Only use cleanup handler if
+	_LIBC_REENTRANT is defined [PR libc/2924].
+
 	* libio/Makefile (tests): Add bug-ungetwc2.
 	* libio/bug-ungetwc2.c: New file.
 
@@ -2847,7 +2869,7 @@
 	* sysdeps/ia64/bits/byteswap.h: Likewise.
 	* sysdeps/m68k/bits/byteswap.h: Likewise.
 	* sysdeps/s390/s390-32/bits/byteswap.h: Likewise.
-	* sysdeps/s390/s390-64/bits/byteswap.h: Likewise.
+	* sysdeps/s390/s390-64/bits/byteswap.h: Likewise [PR libc/2757].
 
 2002-01-02  Bruno Haible  <bruno@clisp.org>
 
diff --git a/debug/catchsegv.sh b/debug/catchsegv.sh
index 8e32ed4423..6781ac1aab 100755
--- a/debug/catchsegv.sh
+++ b/debug/catchsegv.sh
@@ -38,7 +38,7 @@ if test $# -eq 0; then
       ;;
     --v | --ve | --ver | --vers | --versi | --versio | --version)
       echo 'catchsegv (GNU libc) @VERSION@'
-      echo 'Copyright (C) 2001 Free Software Foundation, Inc.
+      echo 'Copyright (C) 2002 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 Written by Ulrich Drepper.'
@@ -87,17 +87,18 @@ if test -f "$segv_output"; then
   sed '/Backtrace/q' "$segv_output"
   sed '1,/Backtrace/d' "$segv_output" |
   (while read line; do
+     line=`echo $line | sed "s@^$prog\\(\\[.*\\)@\1@"`
      case "$line" in
-       [*) addr=`echo "$line" | sed 's/^\[\(.*\)\]$/\1/'`
-	   complete=`addr2line -f -e "$prog" $addr 2>/dev/null`
-	   if test $? -eq 0; then
-             echo "`echo "$complete"|sed 'N;s/\(.*\)\n\(.*\)/\2(\1)/;'`$line"
-           else
-             echo "$line"
-           fi
-           ;;
-        *) echo "$line"
-           ;;
+       \[*) addr=`echo "$line" | sed 's/^\[\(.*\)\]$/\1/'`
+	    complete=`addr2line -f -e "$prog" $addr 2>/dev/null`
+	    if test $? -eq 0; then
+	      echo "`echo "$complete"|sed 'N;s/\(.*\)\n\(.*\)/\2(\1)/;'`$line"
+	    else
+	      echo "$line"
+	    fi
+	    ;;
+         *) echo "$line"
+	    ;;
      esac
    done)
    rm -f "$segv_output"
diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c
index ee755ba50a..82d5fb349f 100644
--- a/locale/programs/charmap.c
+++ b/locale/programs/charmap.c
@@ -194,6 +194,11 @@ character map file `%s' not found"), filename));
 default character map file `%s' not found"), DEFAULT_CHARMAP));
     }
 
+  if (result->code_set_name == NULL)
+    /* The input file does not specify a code set name.  This
+       shouldn't happen but we should cope with it.  */
+    result->code_set_name = basename (filename);
+
   /* Test of ASCII compatibility of locale encoding.
 
      Verify that the encoding to be used in a locale is ASCII compatible,
diff --git a/malloc/hooks.c b/malloc/hooks.c
index e288b9c05d..2dc5cf55e5 100644
--- a/malloc/hooks.c
+++ b/malloc/hooks.c
@@ -21,7 +21,13 @@
 /* $Id$ */
 
 #ifndef weak_variable
+#ifndef _LIBC
 #define weak_variable /**/
+#else
+/* In GNU libc we want the hook variables to be weak definitions to
+   avoid a problem with Emacs.  */
+#define weak_variable weak_function
+#endif
 #endif
 
 #ifndef DEFAULT_CHECK_ACTION
diff --git a/misc/syslog.c b/misc/syslog.c
index de5737d235..10a830969c 100644
--- a/misc/syslog.c
+++ b/misc/syslog.c
@@ -214,11 +214,13 @@ vsyslog(pri, fmt, ap)
 		(void)__writev(STDERR_FILENO, iov, v - iov + 1);
 	}
 
+#ifdef _LIBC_REENTRANT
 	/* Prepare for multiple users.  We have to take care: open and
 	   write are cancellation points.  */
 	__libc_cleanup_region_start (1, (void (*) (void *)) cancel_handler,
 				     &oldaction_ptr);
 	__libc_lock_lock (syslog_lock);
+#endif
 
 	/* Prepare for a broken connection.  */
  	memset (&action, 0, sizeof (action));
@@ -268,9 +270,11 @@ vsyslog(pri, fmt, ap)
 	if (sigpipe == 0)
 		__sigaction (SIGPIPE, &oldaction, (struct sigaction *) NULL);
 
+#ifdef _LIBC_REENTRANT
 	/* End of critical section.  */
 	__libc_cleanup_region_end (0);
 	__libc_lock_unlock (syslog_lock);
+#endif
 
 	free (buf);
 }
diff --git a/sysdeps/generic/w_lgamma.c b/sysdeps/generic/w_lgamma.c
index 4815db6df7..7c7f34ff39 100644
--- a/sysdeps/generic/w_lgamma.c
+++ b/sysdeps/generic/w_lgamma.c
@@ -34,7 +34,7 @@ static char rcsid[] = "$NetBSD: w_lgamma.c,v 1.6 1995/05/10 20:49:24 jtc Exp $";
 	return __ieee754_lgamma_r(x,&signgam);
 #else
         double y;
-	int local_signgam;
+	int local_signgam = 0;
         y = __ieee754_lgamma_r(x,&local_signgam);
 	if (_LIB_VERSION != _ISOC_)
 	  /* ISO C99 does not define the global variable.  */
diff --git a/sysdeps/generic/w_lgammaf.c b/sysdeps/generic/w_lgammaf.c
index a50525a4eb..d0f6d0d17c 100644
--- a/sysdeps/generic/w_lgammaf.c
+++ b/sysdeps/generic/w_lgammaf.c
@@ -31,7 +31,7 @@ static char rcsid[] = "$NetBSD: w_lgammaf.c,v 1.3 1995/05/10 20:49:30 jtc Exp $"
 	return __ieee754_lgammaf_r(x,&signgam);
 #else
         float y;
-	int local_signgam;
+	int local_signgam = 0;
         y = __ieee754_lgammaf_r(x,&local_signgam);
 	if (_LIB_VERSION != _ISOC_)
 	  /* ISO C99 does not define the global variable.  */
diff --git a/sysdeps/generic/w_lgammal.c b/sysdeps/generic/w_lgammal.c
index 328c94e0ac..1ee51a6f49 100644
--- a/sysdeps/generic/w_lgammal.c
+++ b/sysdeps/generic/w_lgammal.c
@@ -38,7 +38,7 @@ static char rcsid[] = "$NetBSD: $";
 	return __ieee754_lgammal_r(x,&signgam);
 #else
         long double y;
-	int local_signgam;
+	int local_signgam = 0;
         y = __ieee754_lgammal_r(x,&local_signgam);
 	if (_LIB_VERSION != _ISOC_)
 	  /* ISO C99 does not define the global variable.  */
diff --git a/time/mktime.c b/time/mktime.c
index 5f3f3f23f8..101c197851 100644
--- a/time/mktime.c
+++ b/time/mktime.c
@@ -1,5 +1,5 @@
 /* Convert a `struct tm' to a time_t value.
-   Copyright (C) 1993, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
+   Copyright (C) 1993-1999, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Eggert (eggert@twinsun.com).
 
@@ -246,7 +246,11 @@ __mktime_internal (struct tm *tp,
   int mon_years = mon / 12 - negative_mon_remainder;
   int year = year_requested + mon_years;
 
-  /* The other values need not be in range:
+  /* 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.
      Major overflows are caught at the end.  */