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].
This commit is contained in:
Ulrich Drepper 2002-04-04 05:10:14 +00:00
parent 87c9379402
commit 4a10c7fec7
9 changed files with 59 additions and 17 deletions

View file

@ -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>

View file

@ -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"

View file

@ -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,

View file

@ -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

View file

@ -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);
}

View file

@ -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. */

View file

@ -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. */

View file

@ -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. */

View file

@ -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. */