aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-04-04 05:10:14 +0000
committerUlrich Drepper <drepper@redhat.com>2002-04-04 05:10:14 +0000
commit4a10c7fec7babe4b74d070c1d5ff575ca8abe31b (patch)
tree34675dfc790492933ec70351e75438fbdd6279a8
parent87c9379402f3d91373438919f77f693f59ceafe1 (diff)
downloadglibc-4a10c7fec7babe4b74d070c1d5ff575ca8abe31b.zip
glibc-4a10c7fec7babe4b74d070c1d5ff575ca8abe31b.tar.gz
glibc-4a10c7fec7babe4b74d070c1d5ff575ca8abe31b.tar.bz2
Update.
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]. * 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]. * sysdeps/s390/s390-64/bits/byteswap.h: Likewise [PR libc/2757].
-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 6e55416..0644cec 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 8e32ed4..6781ac1 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 ee755ba..82d5fb3 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 e288b9c..2dc5cf5 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 de5737d..10a8309 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 4815db6..7c7f34f 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 a50525a..d0f6d0d 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 328c94e..1ee51a6 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 5f3f3f2..101c197 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. */