1998-01-22 00:55  Ulrich Drepper  <drepper@happy.cygnus.com>

	* libc.map: Add __libc_uid, __libc_pid, __syscall_rt_sigqueueinfo,
	__pread64, __pwrite64, and __getpid.

	* libc/rt/aio_misc.c: Use pread and pwrite instead of __ protected
	versions.

1998-01-06  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/alpha/syscalls.list: Define the
	cancelable socket functions as __libc_xxx with __xxx as weak
	alias.
	* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.

	* sysdeps/unix/sysv/linux/m68k/socket.S: Allow __socket to be
	redefined.
	* sysdeps/unix/sysv/linux/i386/socket.S: Likewise.
	* sysdeps/unix/sysv/linux/arm/socket.S: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/socket.S: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/socket.S: Likewise.

	* sysdeps/unix/sysv/linux/accept.S: Make __libc_xxx the main name
	and __xxx a weak alias.
	* sysdeps/unix/sysv/linux/connect.S: Likewise.
	* sysdeps/unix/sysv/linux/recv.S: Likewise.
	* sysdeps/unix/sysv/linux/recvfrom.S: Likewise.
	* sysdeps/unix/sysv/linux/recvmsg.S: Likewise.
	* sysdeps/unix/sysv/linux/send.S: Likewise.
	* sysdeps/unix/sysv/linux/sendmsg.S: Likewise.
	* sysdeps/unix/sysv/linux/sendto.S: Likewise.

1998-01-21  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* locale/langinfo.h: Add defines.

	* dirent/dirent.h: Add defines for DT_*, check also for
	_DIRENT_HAVE_D_TYPE.
	Suggested by Roland McGrath.

1998-01-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* sysdeps/unix/sysv/linux/netinet/ip_fw.h:
	Update from Linux 2.1.73+79.

	* README.template: Update information about possible
	configurations.

	* manual/mbyte.texi (Wide String Conversion): Fix declaration of
	wcstombs. Pointed out by Jochen Voss <voss@mathematik.uni-kl.de>.
	[PR libc/417].

	* manual/time.texi (Priority): Correct description of
	PRIO_MAX. Pointed out by Jochen Voss <voss@mathematik.uni-kl.de>.
	[PR libc/416].

11998-01-21 21:34  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/alpha/fpu/bits/mathdef.h: Add definition of FP_ILOGB0 and
	FP_ILOGNAN.   Patch by a sun <asun@zoology.washington.edu>.

1998-01-21 17:53  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/generic/_strerror.c: Handle BUFLEN == 0.  Reported by
	Andreas Jaeger.

1998-01-20 18:13  Ulrich Drepper  <drepper@cygnus.com>

	* locale/programs/ld-collate.c: Little optimizations.

	* stdio-common/xbug.c: Unset LD_LIBRRARY_PATH variable.

	* string/Makefile (tests): Add tst-inlcall.
	* string/tst-inlcall.c: New file.

	* string/strsignal.c: Add support for real-time signals.

	* sysdeps/generic/_strerror.c: Fix Handling of unknown error in
	presense of small buffer.

	* sysdeps/i386/bits/string.h: Define _HAVE_STRING_ARCH_* macros.

	* sysdeps/i386/i486/bits/string.h: Correct strrchr implementation
	for i686.

	* sysdeps/unix/sysv/linux/siglist.c: Change length of arrays to
	_NSIG + 1.
	
1998-01-02 15:10  Matthias Urlichs   <urlichs@noris.de>

	* Rules: Add explicit rule for dummy.o; at least one library needs
	  it and it isn't autogenerated by the default rules.
	
1997-12-31  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* math/libm-test.c: Tweak epsilons.

1997-12-31  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* math/test-fenv.c (feenv_nomask_test): Avoid dumping core in the
	child.
	(feenv_mask_test): Likewise.

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

	* Makeconfig: Don't export CPPFLAGS.

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

	* sunrpc/rpc_main.c (parseargs): Use perror to print error
	message.

1998-01-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
	* nss/nss_db/db-alias.c (_nss_db_getaliasent_r): Don't include
	terminating null in key size.

1998-01-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* nss/nss_files/files-service.c: Fix allocation size to include
	length of PROTO.

	* nss/nss_db/db-XXX.c (lookup): Always set errno and h_errno if
	applicable.  Fix return value and error checking.
	(CONCAT(_nss_db_get,ENTNAME_r)): Loop around to skip over
	unparsable lines.
	(DB_LOOKUP): Allocate space for terminating null byte.

	* nss/db-Makefile ($(VAR_DB)/passwd.db): Don't handle duplicate
	uids specially.

	* db2/makedb.c (process_input): Continue processing if a duplicate
	key is encountered.

1998-01-19 15:20  Ulrich Drepper  <drepper@cygnus.com>

	* time/tzfile.h: Updated from tzcode1998b.
	* time/zdump.c: Likewise.
	* time/zic.c: Likewise.
	* time/africa: Update from tzdata1998b.
	* time/antarctica: Likewise.
	* time/asia: Likewise.
	* time/australasia: Likewise.
	* time/etcetera: Likewise.
	* time/europe: Likewise.
	* time/leapseconds: Likewise.
	* time/northamerica: Likewise.
	* time/southamerica: Likewise.
	
1998-01-12  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* nss/nss_files/files-alias.c (get_next_alias): Do mail alias
	lookups ignoring case.
	* nss/nss_files/files-network.c: Do network lookups ignoring
	case.
	* nss/nss_files/files-hosts.c: Do hostname lookups ignoring
	case.
	* nss/nss_files/files-parse.c (LOOKUP_NAME_CASE): New macro for
	case insensitive comparing.
	Patches by Cristian Gafton <gafton@redhat.com>.

1998-01-09  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* sysdeps/unix/sysv/linux/net/if.h: Add IFF_*defines.  Suggested
	by Roland McGrath. [PR libc/395]

1998-01-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

 	* manual/arith.texi (Parsing of Integers): Correct description of
 	strtoul. Pointed out by Scott Snyder <snyder@fnald0.fnal.gov>.
 	[PR libc/396]

1997-12-30 14:14  Matthias Urlichs  <urlichs@noris.de>

        * misc/lsearch.c (lsearch): Return a pointer to the new element
        if one was "allocated".

1997-12-26  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

        * string/strsignal.c: NSIG is not a valid index into
        _sys_siglist.  Don't zap the last character of the "Unknown
        signal" message.

1998-01-19 15:08  Ulrich Drepper  <drepper@cygnus.com>
	
	* locale/programs/charmap.c (parse_charmap): Correct parsing of
	ellipsis expressions.

	* locale/programs/charset.c (insert_char): Correctly insert value
	of eliipsis expression.
This commit is contained in:
Ulrich Drepper 1998-01-21 17:04:36 +00:00
parent b9b49b44fd
commit 740152054e
72 changed files with 1535 additions and 804 deletions

192
ChangeLog
View File

@ -1,3 +1,195 @@
1998-01-22 00:55 Ulrich Drepper <drepper@happy.cygnus.com>
* libc.map: Add __libc_uid, __libc_pid, __syscall_rt_sigqueueinfo,
__pread64, __pwrite64, and __getpid.
* libc/rt/aio_misc.c: Use pread and pwrite instead of __ protected
versions.
1998-01-06 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Define the
cancelable socket functions as __libc_xxx with __xxx as weak
alias.
* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/m68k/socket.S: Allow __socket to be
redefined.
* sysdeps/unix/sysv/linux/i386/socket.S: Likewise.
* sysdeps/unix/sysv/linux/arm/socket.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/socket.S: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/socket.S: Likewise.
* sysdeps/unix/sysv/linux/accept.S: Make __libc_xxx the main name
and __xxx a weak alias.
* sysdeps/unix/sysv/linux/connect.S: Likewise.
* sysdeps/unix/sysv/linux/recv.S: Likewise.
* sysdeps/unix/sysv/linux/recvfrom.S: Likewise.
* sysdeps/unix/sysv/linux/recvmsg.S: Likewise.
* sysdeps/unix/sysv/linux/send.S: Likewise.
* sysdeps/unix/sysv/linux/sendmsg.S: Likewise.
* sysdeps/unix/sysv/linux/sendto.S: Likewise.
1998-01-21 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* locale/langinfo.h: Add defines.
* dirent/dirent.h: Add defines for DT_*, check also for
_DIRENT_HAVE_D_TYPE.
Suggested by Roland McGrath.
1998-01-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/unix/sysv/linux/netinet/ip_fw.h:
Update from Linux 2.1.73+79.
* README.template: Update information about possible
configurations.
* manual/mbyte.texi (Wide String Conversion): Fix declaration of
wcstombs. Pointed out by Jochen Voss <voss@mathematik.uni-kl.de>.
[PR libc/417].
* manual/time.texi (Priority): Correct description of
PRIO_MAX. Pointed out by Jochen Voss <voss@mathematik.uni-kl.de>.
[PR libc/416].
11998-01-21 21:34 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/alpha/fpu/bits/mathdef.h: Add definition of FP_ILOGB0 and
FP_ILOGNAN. Patch by a sun <asun@zoology.washington.edu>.
1998-01-21 17:53 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/_strerror.c: Handle BUFLEN == 0. Reported by
Andreas Jaeger.
1998-01-20 18:13 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/ld-collate.c: Little optimizations.
* stdio-common/xbug.c: Unset LD_LIBRRARY_PATH variable.
* string/Makefile (tests): Add tst-inlcall.
* string/tst-inlcall.c: New file.
* string/strsignal.c: Add support for real-time signals.
* sysdeps/generic/_strerror.c: Fix Handling of unknown error in
presense of small buffer.
* sysdeps/i386/bits/string.h: Define _HAVE_STRING_ARCH_* macros.
* sysdeps/i386/i486/bits/string.h: Correct strrchr implementation
for i686.
* sysdeps/unix/sysv/linux/siglist.c: Change length of arrays to
_NSIG + 1.
1998-01-02 15:10 Matthias Urlichs <urlichs@noris.de>
* Rules: Add explicit rule for dummy.o; at least one library needs
it and it isn't autogenerated by the default rules.
1997-12-31 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* math/libm-test.c: Tweak epsilons.
1997-12-31 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* math/test-fenv.c (feenv_nomask_test): Avoid dumping core in the
child.
(feenv_mask_test): Likewise.
1998-01-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makeconfig: Don't export CPPFLAGS.
1998-01-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sunrpc/rpc_main.c (parseargs): Use perror to print error
message.
1998-01-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* nss/nss_db/db-alias.c (_nss_db_getaliasent_r): Don't include
terminating null in key size.
1998-01-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* nss/nss_files/files-service.c: Fix allocation size to include
length of PROTO.
* nss/nss_db/db-XXX.c (lookup): Always set errno and h_errno if
applicable. Fix return value and error checking.
(CONCAT(_nss_db_get,ENTNAME_r)): Loop around to skip over
unparsable lines.
(DB_LOOKUP): Allocate space for terminating null byte.
* nss/db-Makefile ($(VAR_DB)/passwd.db): Don't handle duplicate
uids specially.
* db2/makedb.c (process_input): Continue processing if a duplicate
key is encountered.
1998-01-19 15:20 Ulrich Drepper <drepper@cygnus.com>
* time/tzfile.h: Updated from tzcode1998b.
* time/zdump.c: Likewise.
* time/zic.c: Likewise.
* time/africa: Update from tzdata1998b.
* time/antarctica: Likewise.
* time/asia: Likewise.
* time/australasia: Likewise.
* time/etcetera: Likewise.
* time/europe: Likewise.
* time/leapseconds: Likewise.
* time/northamerica: Likewise.
* time/southamerica: Likewise.
1998-01-12 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* nss/nss_files/files-alias.c (get_next_alias): Do mail alias
lookups ignoring case.
* nss/nss_files/files-network.c: Do network lookups ignoring
case.
* nss/nss_files/files-hosts.c: Do hostname lookups ignoring
case.
* nss/nss_files/files-parse.c (LOOKUP_NAME_CASE): New macro for
case insensitive comparing.
Patches by Cristian Gafton <gafton@redhat.com>.
1998-01-09 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/unix/sysv/linux/net/if.h: Add IFF_*defines. Suggested
by Roland McGrath. [PR libc/395]
1998-01-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* manual/arith.texi (Parsing of Integers): Correct description of
strtoul. Pointed out by Scott Snyder <snyder@fnald0.fnal.gov>.
[PR libc/396]
1997-12-30 14:14 Matthias Urlichs <urlichs@noris.de>
* misc/lsearch.c (lsearch): Return a pointer to the new element
if one was "allocated".
1997-12-26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* string/strsignal.c: NSIG is not a valid index into
_sys_siglist. Don't zap the last character of the "Unknown
signal" message.
1998-01-19 15:08 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/charmap.c (parse_charmap): Correct parsing of
ellipsis expressions.
* locale/programs/charset.c (insert_char): Correctly insert value
of eliipsis expression.
1997-12-28 15:08 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/powerpc/__longjmp.S: Define _SETJMP_H before including

16
FAQ.in
View File

@ -200,6 +200,22 @@ you first delete config.cache.
some problems of this kind. The setting of CFLAGS is checked at the
very beginning and if it is not usable `configure' will bark.
?? Why do I get messages about missing thread functions when I use
the librt? I don't even use threads.
{UD} In this case you probably mixed up your installation of the libc.
The librt internally uses threads and it has implicit references to
the thread library. Normally these references are satisfied
automatically but if the thread library belonging to the librt is not
in the expected place one has to specify this place. When using GNU
ld it works like this:
gcc -o foo foo.c -Wl,-rpath-link=/some/other/dir -lrt
The `/some/other/dir' should contain the matching thread library and
`ld' will use the given path to find the implicitly referenced library
while not disturbing any other link path order.
?? What's the problem with configure --enable-omitfp?
{AJ} When --enable-omitfp is set the libraries are built without frame

View File

@ -121,6 +121,9 @@ $(common-objpfx)config.status: $(..)version.h $(..)configure \
echo Try \`configure --help\' for more details. >&2; \
exit 1; fi
# We don't want CPPFLAGS to be exported to the command running configure.
unexport CPPFLAGS
# Get the user's configuration parameters.
ifneq ($(wildcard $(..)configparms),)
include $(..)configparms

6
README
View File

@ -40,7 +40,7 @@ Since no one has volunteered to test and fix the above configurations,
these are not supported at the moment. It's expected that these don't
work anymore. Porting the library is not hard. If you are interested
in doing a port, please contact the glibc maintainers by sending
electronic mail to <bug-glibc@prep.ai.mit.edu>.
electronic mail to <bug-glibc@gnu.org>.
The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
provides the Unix `crypt' function, plus some other entry points.
@ -82,8 +82,8 @@ facilities you want it to make available.
We prefer to get bug reports sent using the `glibcbug' shell script which
is installed together with the rest of the GNU libc to <bugs@gnu.org>.
Simply run this shell script and fill in the information. Nevertheless
you can still send bug reports to <bug-glibc@prep.ai.mit.edu> as normal
electronic mails.
you can still send bug reports to <bug-glibc@gnu.irg> as normal electronic
mails.
The GNU C Library is free software. See the file COPYING.LIB for copying
conditions.

View File

@ -5,10 +5,13 @@ Some bugs surely remain.
As of this release, the GNU C library is known to run on the following
configurations:
i[3456]86-*-gnu GNU Hurd
i[3456]86-*-linux-gnu Linux-2.0 on Intel
m68k-*-linux-gnu Linux-2.0 on Motorola 680x0
alpha-*-linux-gnu Linux-2.0 on DEC Alpha
*-*-gnu GNU Hurd
i[3456]86-*-linux-gnu Linux-2.x on Intel
m68k-*-linux-gnu Linux-2.x on Motorola 680x0
alpha-*-linux-gnu Linux-2.x on DEC Alpha
powerpc-*-linux-gnu Linux and MkLinux on PowerPC systems
sparc-*-linux-gnu Linux-2.x on SPARC
sparc64-*-linux-gnu Linux-2.x on UltraSPARC
Former releases of this library (version 1.09.1 and perhaps earlier
@ -82,7 +85,7 @@ facilities you want it to make available.
We prefer to get bug reports sent using the `glibcbug' shell script which
is installed together with the rest of the GNU libc to <bugs@gnu.org>.
Simply run this shell script and fill in the information. Nevertheless
you can still send bug reports to <bug-glibc@gnu.irg> as normal electronic
you can still send bug reports to <bug-glibc@gnu.org> as normal electronic
mails.
The GNU C Library is free software. See the file COPYING.LIB for copying

2
Rules
View File

@ -70,6 +70,8 @@ dep-dummy-lib = $(common-objpfx)dummy.o
define make-dummy-lib
$(AR) cr$(verbose) $@ $<
endef
$(common-objpfx)dummy.o: $(common-objpfx)dummy.c; $(compile-command.c)
$(common-objpfx)dummy.c:
rm -f $@
echo 'void __dummy__ (void) { }' > $@

2
configure vendored
View File

@ -698,7 +698,7 @@ if test "${enable_add_ons+set}" = set; then
add_ons=`echo */configure | sed -e 's!/configure!!g'`
else
add_ons=`echo $srcdir/*/configure | \
sed -e "s!^$srcdir/!!g" -e 's!/configure!!g'`
sed -e "s!$srcdir/!!g" -e 's!/configure!!g'`
fi;;
*) add_ons=`echo "$enableval" | sed 's/,/ /g'`;;
esac

View File

@ -1,5 +1,5 @@
/* Create simple DB database from textual input.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@ -316,11 +316,12 @@ process_input (input, inname, output, to_lowercase, be_quiet)
gettext ("duplicate key"));
/* This is no real error. Just give a warning. */
status = 0;
continue;
}
else
error (0, errno, gettext ("while writing database file"));
status = status ? EXIT_FAILURE : EXIT_SUCCESS;
status = EXIT_FAILURE;
clearerr (input);
break;

View File

@ -83,13 +83,21 @@ __BEGIN_DECLS
enum
{
DT_UNKNOWN = 0,
# define DT_UNKNOWN DT_UNKNOWN
DT_FIFO = 1,
# define DT_FIFO DT_FIFO
DT_CHR = 2,
# define DT_CHR DT_CHR
DT_DIR = 4,
# define DT_DIR DT_DIR
DT_BLK = 6,
# define DT_BLK DT_BLK
DT_REG = 8,
# define DT_REG DT_REG
DT_LNK = 10,
# define DT_LNK DT_LNK
DT_SOCK = 12
# define DT_SOCK DT_SOCK
};
/* Convert between stat structure types and directory types. */

View File

@ -256,7 +256,7 @@ static const wchar_t to_ucs4[256] = {
[0xFF] = 0x042A,
};
static struct gap from_idx[] = {
{ start: 000000, end: 0x007f, idx: 0 },
{ start: 0x0000, end: 0x007f, idx: 0 },
{ start: 0x00a0, end: 0x00a0, idx: -32 },
{ start: 0x00a9, end: 0x00a9, idx: -40 },
{ start: 0x00b0, end: 0x00b7, idx: -46 },

View File

@ -128,7 +128,7 @@ static const wchar_t to_ucs4[256] = {
[0x7F] = 0x007F,
};
static struct gap from_idx[] = {
{ start: 000000, end: 0x007f, idx: 0 },
{ start: 0x0000, end: 0x007f, idx: 0 },
{ start: 0x00a4, end: 0x00a4, idx: -36 },
{ start: 0x0393, end: 0x03a9, idx: -786 },
{ start: 0x203e, end: 0x203e, idx: -8102 },

View File

@ -127,7 +127,7 @@ static const wchar_t to_ucs4[256] = {
[0x7F] = 0x007F,
};
static struct gap from_idx[] = {
{ start: 000000, end: 0x0060, idx: 0 },
{ start: 0x0000, end: 0x0060, idx: 0 },
{ start: 0x007b, end: 0x007f, idx: -26 },
{ start: 0x00a3, end: 0x00a8, idx: -61 },
{ start: 0x00b7, end: 0x00b7, idx: -75 },

View File

@ -15,6 +15,8 @@ GLIBC_2.0 {
_IO_list_all; _IO_stderr_; _IO_stdin_; _IO_stdout_;
__libc_pid; __libc_uid;
# This is for ix86 only.
_fp_hw;
@ -94,7 +96,7 @@ GLIBC_2.0 {
_IO_fopen; _IO_fclose; _IO_file_open;
__vsscanf; __vfscanf; __vsnprintf;
_rpc_dtablesize; _null_auth; _seterr_reply;
__res_randomid;
__res_randomid; __syscall_rt_sigqueueinfo; __getpid; __pread64; __pwrite64;
# Exception handling support functions from libgcc
__register_frame; __register_frame_table; __deregister_frame;

View File

@ -46,64 +46,114 @@ enum
/* Abbreviated days of the week. */
ABDAY_1 = _NL_ITEM (LC_TIME, 0), /* Sun */
#define ABDAY_1 ABDAY_1
ABDAY_2,
#define ABDAY_2 ABDAY_2
ABDAY_3,
#define ABDAY_3 ABDAY_3
ABDAY_4,
#define ABDAY_4 ABDAY_4
ABDAY_5,
#define ABDAY_5 ABDAY_5
ABDAY_6,
#define ABDAY_6 ABDAY_6
ABDAY_7,
#define ABDAY_7 ABDAY_7
/* Long-named days of the week. */
DAY_1, /* Sunday */
#define DAY_1 DAY_1
DAY_2, /* Monday */
#define DAY_2 DAY_2
DAY_3, /* Tuesday */
#define DAY_3 DAY_3
DAY_4, /* Wednesday */
#define DAY_4 DAY_4
DAY_5, /* Thursday */
#define DAY_5 DAY_5
DAY_6, /* Friday */
#define DAY_6 DAY_6
DAY_7, /* Saturday */
#define DAY_7 DAY_7
/* Abbreviated month names. */
ABMON_1, /* Jan */
#define ABMON_1 ABMON_1
ABMON_2,
#define ABMON_2 ABMON_2
ABMON_3,
#define ABMON_3 ABMON_3
ABMON_4,
#define ABMON_4 ABMON_4
ABMON_5,
#define ABMON_5 ABMON_5
ABMON_6,
#define ABMON_6 ABMON_6
ABMON_7,
#define ABMON_7 ABMON_7
ABMON_8,
#define ABMON_8 ABMON_8
ABMON_9,
#define ABMON_9 ABMON_9
ABMON_10,
#define ABMON_10 ABMON_10
ABMON_11,
#define ABMON_11 ABMON_11
ABMON_12,
#define ABMON_12 ABMON_12
/* Long month names. */
MON_1, /* January */
#define MON_1 MON_1
MON_2,
#define MON_2 MON_2
MON_3,
#define MON_3 MON_3
MON_4,
#define MON_4 MON_4
MON_5,
#define MON_5 MON_5
MON_6,
#define MON_6 MON_6
MON_7,
#define MON_7 MON_7
MON_8,
#define MON_8 MON_8
MON_9,
#define MON_9 MON_9
MON_10,
#define MON_10 MON_10
MON_11,
#define MON_11 MON_11
MON_12,
#define MON_12 MON_12
AM_STR, /* Ante meridian string. */
#define AM_STR AM_STR
PM_STR, /* Post meridian string. */
#define PM_STR PM_STR
D_T_FMT, /* Date and time format for strftime. */
#define D_T_FMT D_T_FMT
D_FMT, /* Date format for strftime. */
#define D_FMT D_FMT
T_FMT, /* Time format for strftime. */
#define T_FMT T_FMT
T_FMT_AMPM, /* 12-hour time format for strftime. */
#define T_FMT_AMPM T_FMT_AMPM
ERA, /* Alternate era. */
#define ERA ERA
ERA_YEAR, /* Year in alternate era format. */
#define ERA_YEAR ERA_YEAR
ERA_D_FMT, /* Date in alternate era format. */
#define ERA_D_FMT ERA_D_FMT
ALT_DIGITS, /* Alternate symbols for digits. */
#define ALT_DIGITS ALT_DIGITS
ERA_D_T_FMT, /* Date and time in alternate era format. */
#define ERA_D_T_FMT ERA_D_T_FMT
ERA_T_FMT, /* Time in alternate era format. */
#define ERA_T_FMT ERA_T_FMT
_NL_TIME_NUM_ALT_DIGITS, /* Number entries in the alt_digits arrays. */
@ -166,42 +216,67 @@ enum
These items each correspond to a member of `struct lconv',
defined in <locale.h>. */
INT_CURR_SYMBOL = _NL_ITEM (LC_MONETARY, 0),
#define INT_CURR_SYMBOL INT_CURR_SYMBOL
CURRENCY_SYMBOL,
#define CURRENCY_SYMBOL CURRENCY_SYMBOL
#ifdef __USE_UNIX98
CRNCYSTR = CURRENCY_SYMBOL,
# define CRNCYSTR CRNCYSTR
#endif
MON_DECIMAL_POINT,
#define MON_DECIMAL_POINT MON_DECIMAL_POINT
MON_THOUSANDS_SEP,
#define MON_THOUSANDS_SEP MON_THOUSANDS_SEP
MON_GROUPING,
#define MON_GROUPING MON_GROUPING
POSITIVE_SIGN,
#define POSITIVE_SIGN POSITIVE_SIGN
NEGATIVE_SIGN,
#define NEGATIVE_SIGN NEGATIVE_SIGN
INT_FRAC_DIGITS,
#define INT_FRAC_DIGITS INT_FRAC_DIGITS
FRAC_DIGITS,
#define FRAC_DIGITS FRAC_DIGITS
P_CS_PRECEDES,
#define P_CS_PRECEDES P_CS_PRECEDES
P_SEP_BY_SPACE,
#define P_SEP_BY_SPACE P_SEP_BY_SPACE
N_CS_PRECEDES,
#define N_CS_PRECEDES N_CS_PRECEDES
N_SEP_BY_SPACE,
#define N_SEP_BY_SPACE N_SEP_BY_SPACE
P_SIGN_POSN,
#define P_SIGN_POSN P_SIGN_POSN
N_SIGN_POSN,
#define N_SIGN_POSN N_SIGN_POSN
_NL_NUM_LC_MONETARY,
/* LC_NUMERIC category: formatting of numbers.
These also correspond to members of `struct lconv'; see <locale.h>. */
DECIMAL_POINT = _NL_ITEM (LC_NUMERIC, 0),
#define DECIMAL_POINT DECIMAL_POINT
#ifdef __USE_UNIX98
RADIXCHAR = DECIMAL_POINT,
# define RADIXCHAR RADIXCHAR
#endif
THOUSANDS_SEP,
#define THOUSANDS_SEP THOUSANDS_SEP
#ifdef __USE_UNIX98
THOUSEP = THOUSANDS_SEP,
#define THOUSANDS_SEP THOUSANDS_SEP
#endif
GROUPING,
#define GROUPING GROUPING
_NL_NUM_LC_NUMERIC,
YESEXPR = _NL_ITEM (LC_MESSAGES, 0), /* Regex matching ``yes'' input. */
#define YESEXPR YESEXPR
NOEXPR, /* Regex matching ``no'' input. */
#define NOEXPR NOEXPR
YESSTR, /* Output string for ``yes''. */
#define YESSTR YESSTR
NOSTR, /* Output string for ``no''. */
#define NOSTR NOSTR
_NL_NUM_LC_MESSAGES,
/* This marks the highest value used. */

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
@ -471,7 +471,7 @@ argument to <%s> must be a single character"),
cmfile->token.val.str.start,
cmfile->token.val.str.len);
state = 3;
state = 5;
continue;
case 90:

View File

@ -125,10 +125,11 @@ insert_char (struct linereader *lr, struct charset_t *cs, int bytes,
for (cnt = from_nr; cnt <= to_nr; ++cnt)
{
sprintf (&buf[prefix_len], "%0d", cnt);
sprintf (&buf[prefix_len], "%0*d", len1 - prefix_len, cnt);
if (insert_entry (&cs->char_table, buf, len1,
(void *) (unsigned long int) cnt) < 0)
(void *) (unsigned long int) (value + (cnt - from_nr)))
< 0)
lr_error (lr, _("duplicate character name `%s'"), buf);
}
}

View File

@ -190,7 +190,7 @@ collate_startup (struct linereader *lr, struct localedef_t *locale,
collate->all_patches = NULL;
/* This tells us no UNDEFINED entry was found until now. */
collate->undefined.this_weight = 0;
memset (&collate->undefined, '\0', sizeof (collate->undefined));
lr->translate_strings = 0;
}
@ -457,12 +457,10 @@ Computing table size for collation information might take a while..."),
information. While reading them they get inserted in the \
table and later not removed when something goes wrong with \
reading its weights. */ \
{ \
value += 1 + runp->ordering[cnt]; \
value += 1 + runp->ordering[cnt]; \
\
if (runp->name[1] == L'\0') \
has_simple = runp; \
} \
if (runp->name[1] == L'\0') \
has_simple = runp; \
\
ADD_ELEMENT (runp, value); \
} \
@ -1891,7 +1889,7 @@ collate_end_weight (struct linereader *lr, struct localedef_t *locale)
|| collate->kind == undefined);
/* Fill in the missing weights. */
while (++collate->weight_idx < collate->nrules)
while (collate->weight_idx++ < collate->nrules)
{
collate->weight[collate->nweight++] = pelem->this_weight;
++collate->weight_cnt[collate->weight_idx];

View File

@ -1,3 +0,0 @@
# This is only to keep the GNU C library configure mechanism happy.
#
exit 0

View File

@ -1056,16 +1056,13 @@ There is an example at the end of this section.
@deftypefun {unsigned long int} strtoul (const char *@var{string}, char **@var{tailptr}, int @var{base})
The @code{strtoul} (``string-to-unsigned-long'') function is like
@code{strtol} except it deals with unsigned numbers, and returns its
value with type @code{unsigned long int}. No @samp{+} or @samp{-} sign
may appear before the number, but the syntax is otherwise the same as
value with type @code{unsigned long int}. If the number has a leading
@samp{-} sign the negated value is returned. The syntax is the same as
described above for @code{strtol}. The value returned in case of
overflow is @code{ULONG_MAX} (@pxref{Range of Type}).
Like @code{strtol} this function sets @code{errno} and returns the value
@code{0ul} in case the value for @var{base} is not in the legal range.
For @code{strtoul} this can happen in another situation. In case the
number to be converted is negative @code{strtoul} also sets @code{errno}
to @code{EINVAL} and returns @code{0ul}.
@end deftypefun
@comment stdlib.h

View File

@ -399,7 +399,7 @@ mbstowcs_alloc (const char *string)
@comment stdlib.h
@comment ISO
@deftypefun size_t wcstombs (char *@var{string}, const wchar_t @var{wstring}, size_t @var{size})
@deftypefun size_t wcstombs (char *@var{string}, const wchar_t *@var{wstring}, size_t @var{size})
The @code{wcstombs} (``wide character string to multibyte string'')
function converts the null-terminated wide character array @var{wstring}
into a string containing multibyte characters, storing not more than

View File

@ -1812,7 +1812,7 @@ The smallest valid priority value.
@comment BSD
@item PRIO_MAX
@vindex PRIO_MAX
The smallest valid priority value.
The largest valid priority value.
@end table
@comment sys/resource.h

View File

@ -869,8 +869,8 @@ acosh_test (void)
#endif
check ("acosh(1) == 0", FUNC(acosh) (1), 0);
check ("acosh(7) == 2.633915793...", FUNC(acosh) (7),
2.6339157938496334172L);
check_eps ("acosh(7) == 2.633915793...", FUNC(acosh) (7),
2.6339157938496334172L, CHOOSE (3e-19, 0, 0));
}
@ -1069,7 +1069,7 @@ cbrt_test (void)
check_eps ("cbrt (0.970299) == 0.99", FUNC(cbrt) (0.970299), 0.99,
CHOOSE (2e-17L, 0, 0));
check_eps ("cbrt (0.7) == .8879040017...", FUNC(cbrt) (0.7),
0.8879040017426007084L, CHOOSE(2e-17L, 2e-16, 0));
0.8879040017426007084L, CHOOSE(2e-17L, 6e-16, 0));
}
@ -2688,15 +2688,15 @@ cexp_test (void)
result = FUNC(cexp) (BUILD_COMPLEX (0.7, 1.2));
check_eps ("real(cexp(0.7 + i 1.2)) == 0.72969...", __real__ result,
0.7296989091503236012L, CHOOSE(6e-17L, 0, 6e-8));
0.7296989091503236012L, CHOOSE(6e-17L, 0, 2e-7));
check_eps ("imag(cexp(0.7 + i 1.2)) == 1.87689...", __imag__ result,
1.8768962328348102821L, CHOOSE(2e-16L, 0, 0));
1.8768962328348102821L, CHOOSE(2e-16L, 0, 3e-7));
result = FUNC(cexp) (BUILD_COMPLEX (-2, -3));
check_eps ("real(cexp(-2 - i 3)) == --0.13398...", __real__ result,
-0.1339809149295426134L, CHOOSE(6e-20L, 0, 0));
check_eps ("real(cexp(-2 - i 3)) == -0.13398...", __real__ result,
-0.1339809149295426134L, CHOOSE(6e-20L, 0, 2e-8));
check_eps ("imag(cexp(-2 - i 3)) == -0.01909...", __imag__ result,
-0.0190985162611351964L, CHOOSE(4e-20L, 0, 0));
-0.0190985162611351964L, CHOOSE(4e-20L, 0, 2e-9));
}
@ -2871,13 +2871,13 @@ csin_test (void)
check_eps ("real(csin(0.7 + i 1.2)) = 1.166456341...", __real__ result,
1.1664563419657581376L, CHOOSE(2e-16L, 0, 0));
check_eps ("imag(csin(0.7 + i 1.2)) = 1.154499724...", __imag__ result,
1.1544997246948547371L, CHOOSE(2e-17L, 0, 0));
1.1544997246948547371L, CHOOSE(2e-17L, 0, 2e-7));
result = FUNC(csin) (BUILD_COMPLEX (-2, -3));
check ("real(csin(-2 - i 3)) == --9.15449...", __real__ result,
-9.1544991469114295734L);
check ("imag(csin(-2 - i 3)) == -4.16890...", __imag__ result,
4.1689069599665643507L);
check_eps ("real(csin(-2 - i 3)) == -9.15449...", __real__ result,
-9.1544991469114295734L, CHOOSE(4e-18L, 0, 1e-6));
check_eps ("imag(csin(-2 - i 3)) == -4.16890...", __imag__ result,
4.1689069599665643507L, CHOOSE(2e-17L, 0, 5e-7));
}
@ -3052,13 +3052,13 @@ csinh_test (void)
check_eps ("real(csinh(0.7 + i 1.2)) = 0.274878686...", __real__ result,
0.27487868678117583582L, CHOOSE(2e-17L, 6e-17, 3e-8));
check_eps ("imag(csinh(0.7 + i 1.2)) = 1.169866572...", __imag__ result,
1.1698665727426565139L, CHOOSE(6e-17L, 0, 3e-8));
1.1698665727426565139L, CHOOSE(6e-17L, 0, 2e-7));
result = FUNC(csinh) (BUILD_COMPLEX (-2, -3));
check_eps ("real(csinh(-2 - i 3)) == -3.59056...", __real__ result,
3.5905645899857799520L, CHOOSE(0, 5e-16, 0));
3.5905645899857799520L, CHOOSE(7e-19L, 5e-16, 3e-7));
check_eps ("imag(csinh(-2 - i 3)) == -0.53092...", __imag__ result,
-0.5309210862485198052L, CHOOSE(2e-19L, 2e-16, 6e-8));
-0.5309210862485198052L, CHOOSE(3e-19L, 2e-16, 6e-8));
}
@ -3229,15 +3229,15 @@ ccos_test (void)
result = FUNC(ccos) (BUILD_COMPLEX (0.7, 1.2));
check_eps ("real(ccos(0.7 + i 1.2)) = 1.384865764...", __real__ result,
1.3848657645312111080L, CHOOSE(6e-19L, 3e-16, 2e-7));
1.3848657645312111080L, CHOOSE(4e-18L, 3e-16, 2e-7));
check_eps ("imag(ccos(0.7 + i 1.2)) = -0.972421703...", __imag__ result,
-0.97242170335830028619L, CHOOSE(2e-16L, 2e-16, 0));
result = FUNC(ccos) (BUILD_COMPLEX (-2, -3));
check ("real(ccos(-2 - i 3)) == --4.18962...", __real__ result,
-4.1896256909688072301L);
check_eps ("real(ccos(-2 - i 3)) == -4.18962...", __real__ result,
-4.1896256909688072301L, CHOOSE(2e-17L, 0, 5e-7));
check_eps ("imag(ccos(-2 - i 3)) == -9.10922...", __imag__ result,
-9.1092278937553365979L, CHOOSE(9e-19L, 0, 1e-6));
-9.1092278937553365979L, CHOOSE(3e-18L, 0, 1e-6));
}
@ -3408,15 +3408,15 @@ ccosh_test (void)
result = FUNC(ccosh) (BUILD_COMPLEX (0.7, 1.2));
check_eps ("real(ccosh(0.7 + i 1.2)) == 0.45482...", __real__ result,
0.4548202223691477654L, CHOOSE(4e-17L, 6e-17, 3e-8));
0.4548202223691477654L, CHOOSE(5e-17L, 6e-17, 9e-8));
check_eps ("imag(ccosh(0.7 + i 1.2)) == 0.70702...", __imag__ result,
0.7070296600921537682L, CHOOSE(7e-17L, 0, 0));
result = FUNC(ccosh) (BUILD_COMPLEX (-2, -3));
check ("real(ccosh(-2 - i 3)) == --3.72454...", __real__ result,
-3.7245455049153225654L);
check_eps ("real(ccosh(-2 - i 3)) == -3.72454...", __real__ result,
-3.7245455049153225654L, CHOOSE(7e-19L, 0, 3e-7));
check_eps ("imag(ccosh(-2 - i 3)) == -0.51182...", __imag__ result,
0.5118225699873846088L, CHOOSE(6e-20, 2e-16, 6e-8));
0.5118225699873846088L, CHOOSE(3e-19L, 2e-16, 6e-8));
}
@ -3553,10 +3553,10 @@ cacos_test (void)
-1.0927647857577371459L, CHOOSE(4e-17L, 0, 3e-7));
result = FUNC(cacos) (BUILD_COMPLEX (-2, -3));
check ("real(cacos(-2 - i 3)) == -2.14144...", __real__ result,
2.1414491111159960199L);
check_eps ("real(cacos(-2 - i 3)) == 2.14144...", __real__ result,
2.1414491111159960199L, CHOOSE(3e-19L, 0, 0));
check_eps ("imag(cacos(-2 - i 3)) == -1.98338...", __imag__ result,
1.9833870299165354323L, CHOOSE(2e-19L, 0, 0));
1.9833870299165354323L, CHOOSE(3e-19L, 0, 0));
}
@ -3694,9 +3694,9 @@ cacosh_test (void)
result = FUNC(cacosh) (BUILD_COMPLEX (-2, -3));
check_eps ("real(cacosh(-2 - i 3)) == -1.98338...", __real__ result,
-1.9833870299165354323L, CHOOSE (6e-19, 3e-16, 9e-7));
-1.9833870299165354323L, CHOOSE (2e-18L, 3e-16, 9e-7));
check_eps ("imag(cacosh(-2 - i 3)) == 2.14144...", __imag__ result,
2.1414491111159960199L, CHOOSE (3e-19, 5e-16, 0));
2.1414491111159960199L, CHOOSE (3e-19, 5e-16, 1e-6));
}
@ -3838,10 +3838,10 @@ casin_test (void)
1.0927647857577371459L, CHOOSE(4e-17L, 0, 3e-7));
result = FUNC(casin) (BUILD_COMPLEX (-2, -3));
check ("real(casin(-2 - i 3)) == --0.57065...", __real__ result,
-0.5706527843210994007L);
check_eps ("real(casin(-2 - i 3)) == -0.57065...", __real__ result,
-0.5706527843210994007L, CHOOSE(4e-19L, 0, 0));
check_eps ("imag(casin(-2 - i 3)) == -1.98338...", __imag__ result,
-1.9833870299165354323L, CHOOSE(2e-19L, 0, 0));
-1.9833870299165354323L, CHOOSE(3e-19L, 0, 0));
}
@ -3980,10 +3980,10 @@ casinh_test (void)
check_eps ("real(casinh(0.7 + i 1.2)) == 0.97865...", __real__ result,
0.9786545955936738768L, CHOOSE(5e-17L, 2e-16, 0));
check_eps ("imag(casinh(0.7 + i 1.2)) == 0.91135...", __imag__ result,
0.9113541895315601156L, CHOOSE(7e-19L, 0, 6e-8));
0.9113541895315601156L, CHOOSE(7e-19L, 2e-16, 6e-8));
result = FUNC(casinh) (BUILD_COMPLEX (-2, -3));
check_eps ("real(casinh(-2 - i 3)) == --1.96863...", __real__ result,
check_eps ("real(casinh(-2 - i 3)) == -1.96863...", __real__ result,
-1.9686379257930962917L, CHOOSE(7e-19L, 2e-15, 2e-7));
check_eps ("imag(casinh(-2 - i 3)) == -0.96465...", __imag__ result,
-0.9646585044076027920L, CHOOSE(4e-19L, 2e-15, 4e-7));
@ -4136,7 +4136,7 @@ catan_test (void)
check ("real(catan(-2 - i 3)) == -1.40992...", __real__ result,
-1.4099210495965755225L);
check_eps ("imag(catan(-2 - i 3)) == -0.22907...", __imag__ result,
-0.2290726829685387662L, CHOOSE(1e-19L, 3e-17, 2e-8));
-0.2290726829685387662L, CHOOSE(1.1e-19L, 3e-17, 2e-8));
}
@ -4284,9 +4284,9 @@ catanh_test (void)
result = FUNC(catanh) (BUILD_COMPLEX (-2, -3));
check_eps ("real(catanh(-2 - i 3)) == -0.14694...", __real__ result,
-0.1469466662255297520L, CHOOSE (3e-20, 6e-17, 2e-8));
check ("imag(catanh(-2 - i 3)) == -1.33897...", __imag__ result,
-1.3389725222944935611L);
-0.1469466662255297520L, CHOOSE (9e-20L, 6e-17, 2e-8));
check_eps ("imag(catanh(-2 - i 3)) == -1.33897...", __imag__ result,
-1.3389725222944935611L, CHOOSE (7e-19L, 0, 0));
}
@ -4586,10 +4586,10 @@ ctanh_test (void)
0.4778641038326365540L, CHOOSE(9e-17L, 6e-17, 0));
result = FUNC(ctanh) (BUILD_COMPLEX (-2, -3));
check_eps ("real(ctanh(-2 - i 3)) == --0.96538...", __real__ result,
check_eps ("real(ctanh(-2 - i 3)) == -0.96538...", __real__ result,
-0.9653858790221331242L, CHOOSE(2e-19L, 0, 0));
check_eps ("imag(ctanh(-2 - i 3)) == -0.00988...", __imag__ result,
0.0098843750383224937L, CHOOSE(2e-20L, 0, 1e-9));
check_eps ("imag(ctanh(-2 - i 3)) == 0.00988...", __imag__ result,
0.0098843750383224937L, CHOOSE(7e-20L, 0, 1e-9));
}
@ -4752,10 +4752,10 @@ clog_test (void)
1.0427218783685369524L, CHOOSE(2e-17L, 0, 0));
result = FUNC(clog) (BUILD_COMPLEX (-2, -3));
check ("real(clog(-2 - i 3)) == -1.28247...", __real__ result,
1.2824746787307683680L);
check_eps ("real(clog(-2 - i 3)) == 1.28247...", __real__ result,
1.2824746787307683680L, CHOOSE(3e-19L, 0, 0));
check_eps ("imag(clog(-2 - i 3)) == -2.15879...", __imag__ result,
-2.1587989303424641704L, CHOOSE(3e-19L, 0, 0));
-2.1587989303424641704L, CHOOSE(2e-18L, 0, 0));
}
@ -4934,10 +4934,10 @@ clog10_test (void)
0.4528483579352493248L, CHOOSE(6e-18, 6e-17, 3e-8));
result = FUNC(clog10) (BUILD_COMPLEX (-2, -3));
check ("real(clog10(-2 - i 3)) == -0.55697...", __real__ result,
0.5569716761534183846L);
check_eps ("real(clog10(-2 - i 3)) == 0.55697...", __real__ result,
0.5569716761534183846L, CHOOSE(6e-20L, 0, 0));
check_eps ("imag(clog10(-2 - i 3)) == -0.93755...", __imag__ result,
-0.9375544629863747085L, CHOOSE (6e-20, 2e-16, 0));
-0.9375544629863747085L, CHOOSE (7e-19L, 2e-16, 0));
}
@ -5102,8 +5102,8 @@ csqrt_test (void)
result = FUNC(csqrt) (BUILD_COMPLEX (-2, -3));
check_eps ("real(csqrt(-2 - i 3)) == -0.89597...", __real__ result,
0.8959774761298381247L, CHOOSE(6e-20L, 2e-16, 6e-8));
check ("imag(csqrt(-2 - i 3)) == -1.67414...", __imag__ result,
-1.6741492280355400404L);
check_eps ("imag(csqrt(-2 - i 3)) == -1.67414...", __imag__ result,
-1.6741492280355400404L, CHOOSE(0, 5e-16, 0));
}
@ -5641,7 +5641,7 @@ identities (void)
identities1_test (-1, CHOOSE (1e-18L, 0, 1e-7));
identities2_test (0.2L, CHOOSE (1e-19L, 1e-16, 0));
identities2_test (0.9L, CHOOSE (0, 1e-15, 2e-7));
identities2_test (0.9L, CHOOSE (3e-19L, 1e-15, 2e-7));
identities2_test (0, 0);
identities2_test (-1, CHOOSE (1e-18L, 1e-15, 2e-7));

View File

@ -36,6 +36,7 @@
#include <string.h>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/resource.h>
/*
Since not all architectures might define all exceptions, we define
@ -249,6 +250,14 @@ feenv_nomask_test (const char *flag_name, int fe_exc)
pid = fork ();
if (pid == 0)
{
#ifdef RLIMIT_CORE
/* Try to avoid dumping core. */
struct rlimit core_limit;
core_limit.rlim_cur = 0;
core_limit.rlim_max = 0;
setrlimit (RLIMIT_CORE, &core_limit);
#endif
fesetenv (FE_NOMASK_ENV);
feraiseexcept (fe_exc);
exit (2);
@ -293,6 +302,14 @@ feenv_mask_test (const char *flag_name, int fe_exc)
pid = fork ();
if (pid == 0)
{
#ifdef RLIMIT_CORE
/* Try to avoid dumping core. */
struct rlimit core_limit;
core_limit.rlim_cur = 0;
core_limit.rlim_max = 0;
setrlimit (RLIMIT_CORE, &core_limit);
#endif
fesetenv (FE_DFL_ENV);
feraiseexcept (fe_exc);
exit (2);

View File

@ -1,5 +1,5 @@
/* Linear search functions.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@ -33,7 +33,7 @@ lsearch (const void *key, void *base, size_t *nmemb, size_t size,
if (result == NULL)
{
/* Not available. Insert at the end. */
memcpy (base + (*nmemb) * size, key, size);
result = memcpy (base + (*nmemb) * size, key, size);
++(*nmemb);
}

View File

@ -1,5 +1,5 @@
# Makefile to (re-)generate db versions of system database files.
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
# Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
#
@ -34,8 +34,7 @@ $(VAR_DB)/passwd.db: /etc/passwd
@$(AWK) 'BEGIN { FS=":"; OFS=":"; cnt=0 } \
{ printf "0%u ", cnt++; print } \
/^[^#]/ { printf ".%s ", $$1; print; \
if (!uids[$$3]++) \
{ printf "=%s ", $$3; print } }' $^ | \
printf "=%s ", $$3; print }' $^ | \
$(MAKEDB) -o $@ -
@echo "done."

View File

@ -149,6 +149,7 @@ static enum nss_status
lookup (const DBT *key, struct STRUCTURE *result,
void *buffer, size_t buflen, int *errnop H_ERRNO_PROTO)
{
char *p;
enum nss_status status;
int err;
DBT value;
@ -156,15 +157,59 @@ lookup (const DBT *key, struct STRUCTURE *result,
/* Open the database. */
status = internal_setent (keep_db);
if (status != NSS_STATUS_SUCCESS)
return status;
{
*errnop = errno;
H_ERRNO_SET (NETDB_INTERNAL);
return status;
}
/* Succeed iff it matches a value that parses correctly. */
err = ((*db->get) (db, key, &value, 0) == 0 &&
parse_line (value.data, result, buffer, buflen, errnop));
if (err == 0)
status = NSS_STATUS_SUCCESS;
err = (*db->get) (db, key, &value, 0);
if (err < 0)
{
*errnop = errno;
H_ERRNO_SET (NETDB_INTERNAL);
status = NSS_STATUS_UNAVAIL;
}
else if (err != 0)
{
H_ERRNO_SET (HOST_NOT_FOUND);
status = NSS_STATUS_NOTFOUND;
}
else
status = err < 0 ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND;
{
/* Skip leading blanks. */
p = (char *) value.data;
while (isspace (*p))
++p;
err = parse_line (p, result, buffer, buflen, errnop);
if (err == 0)
{
/* If the key begins with '0' we are trying to get the next
entry. We want to ignore unparsable lines in this case. */
if (((char *) key->data)[0] == '0')
{
/* Super magical return value. We need to tell our caller
that it should continue looping. This value cannot
happen in other cases. */
status = NSS_STATUS_RETURN;
}
else
{
H_ERRNO_SET (HOST_NOT_FOUND);
status = NSS_STATUS_NOTFOUND;
}
}
else if (err < 0)
{
H_ERRNO_SET (NETDB_INTERNAL);
status = NSS_STATUS_TRYAGAIN;
}
else
status = NSS_STATUS_SUCCESS;
}
if (! keep_db)
internal_endent ();
@ -196,7 +241,7 @@ _nss_db_get##name##_r (proto, \
{ \
DBT key; \
enum nss_status status; \
const size_t size = (keysize); \
const size_t size = (keysize) + 1; \
key.data = __alloca (size); \
key.size = KEYPRINTF keypattern; \
__libc_lock_lock (lock); \
@ -221,8 +266,16 @@ CONCAT(_nss_db_get,ENTNAME_r) (struct STRUCTURE *result, char *buffer,
DBT key;
__libc_lock_lock (lock);
key.size = 1 + snprintf (key.data = buf, sizeof buf, "0%u", entidx++);
status = lookup (&key, result, buffer, buflen, errnop H_ERRNO_ARG);
/* Loop until we find a valid entry or hit EOF. See above for the
special meaning of the status value. */
do
{
key.size = snprintf (key.data = buf, sizeof buf, "0%u", entidx++);
status = lookup (&key, result, buffer, buflen, errnop H_ERRNO_ARG);
}
while (status == NSS_STATUS_RETURN);
__libc_lock_unlock (lock);
return status;

View File

@ -1,5 +1,5 @@
/* Mail alias file parser in nss_db module.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@ -221,13 +221,13 @@ enum nss_status
_nss_db_getaliasent_r (struct aliasent *result, char *buffer, size_t buflen,
int *errnop)
{
/* Return next entry in host file. */
/* Return next entry in alias file. */
enum nss_status status;
char buf[20];
DBT key;
__libc_lock_lock (lock);
key.size = 1 + snprintf (key.data = buf, sizeof buf, "0%u", entidx++);
key.size = snprintf (key.data = buf, sizeof buf, "0%u", entidx++);
status = lookup (&key, result, buffer, buflen, errnop);
__libc_lock_unlock (lock);

View File

@ -1,5 +1,5 @@
/* Mail alias file parser in nss_files module.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@ -200,7 +200,8 @@ get_next_alias (const char *match, struct aliasent *result,
looking for. If it does not match we simply ignore all
lines until the next line containing the start of a new
alias is found. */
ignore = match != NULL && strcmp (result->alias_name, match) != 0;
ignore = (match != NULL
&& strcasecmp (result->alias_name, match) != 0);
while (! ignore)
{

View File

@ -1,5 +1,5 @@
/* Hosts file parser in nss_files module.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -89,14 +89,14 @@ DB_LOOKUP (hostbyname, ,,
if (result->h_addrtype != ((_res.options & RES_USE_INET6)
? AF_INET6 : AF_INET))
continue;
LOOKUP_NAME (h_name, h_aliases)
LOOKUP_NAME_CASE (h_name, h_aliases)
}, const char *name)
DB_LOOKUP (hostbyname2, ,,
{
if (result->h_addrtype != af)
continue;
LOOKUP_NAME (h_name, h_aliases)
LOOKUP_NAME_CASE (h_name, h_aliases)
}, const char *name, int af)
DB_LOOKUP (hostbyaddr, ,,

View File

@ -1,5 +1,5 @@
/* Networks file parser in nss_files module.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -44,7 +44,7 @@ LINE_PARSER
#include "files-XXX.c"
DB_LOOKUP (netbyname, ,,
LOOKUP_NAME (n_name, n_aliases),
LOOKUP_NAME_CASE (n_name, n_aliases),
const char *name)
DB_LOOKUP (netbyaddr, ,,

View File

@ -1,5 +1,5 @@
/* Common code for file-based database parsers in nss_files module.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -232,6 +232,18 @@ parse_list (char *line, struct parser_data *data, size_t datalen, int *errnop)
break; \
}
#define LOOKUP_NAME_CASE(nameelt, aliaselt) \
{ \
char **ap; \
if (! strcasecmp (name, result->nameelt)) \
break; \
for (ap = result->aliaselt; *ap; ++ap) \
if (! strcasecmp (name, *ap)) \
break; \
if (*ap) \
break; \
}
/* This is defined by db-*.c to include "../nss_db/db-XXX.c" instead. */
#ifndef GENERIC

View File

@ -39,7 +39,8 @@ LINE_PARSER
#include GENERIC
DB_LOOKUP (servbyname, 1 + strlen (name), (".%s/%s", name, proto),
DB_LOOKUP (servbyname, 2 + strlen (name) + strlen (proto),
(".%s/%s", name, proto),
{
/* Must match both protocol (if specified) and name. */
if (proto != NULL && strcmp (result->s_proto, proto))
@ -48,7 +49,7 @@ DB_LOOKUP (servbyname, 1 + strlen (name), (".%s/%s", name, proto),
},
const char *name, const char *proto)
DB_LOOKUP (servbyport, 20, ("=%d/%s", port, proto),
DB_LOOKUP (servbyport, 21 + strlen (proto), ("=%d/%s", port, proto),
{
/* Must match both port and protocol. */
if (result->s_port == port

View File

@ -421,10 +421,10 @@ handle_fildes_io (void *arg)
aiocbp->aiocb64.aio_offset));
else
aiocbp->aiocb.__return_value =
TEMP_FAILURE_RETRY (__pread (fildes,
(void *) aiocbp->aiocb.aio_buf,
aiocbp->aiocb.aio_nbytes,
aiocbp->aiocb.aio_offset));
TEMP_FAILURE_RETRY (pread (fildes,
(void *) aiocbp->aiocb.aio_buf,
aiocbp->aiocb.aio_nbytes,
aiocbp->aiocb.aio_offset));
}
else if ((aiocbp->aiocb.aio_lio_opcode & 127) == LIO_WRITE)
{
@ -436,10 +436,10 @@ handle_fildes_io (void *arg)
aiocbp->aiocb64.aio_offset));
else
aiocbp->aiocb.__return_value =
TEMP_FAILURE_RETRY (__pwrite (fildes,
(const void *) aiocbp->aiocb.aio_buf,
aiocbp->aiocb.aio_nbytes,
aiocbp->aiocb.aio_offset));
TEMP_FAILURE_RETRY (pwrite (fildes,
(const void *) aiocbp->aiocb.aio_buf,
aiocbp->aiocb.aio_nbytes,
aiocbp->aiocb.aio_offset));
}
else if (aiocbp->aiocb.aio_lio_opcode == LIO_DSYNC)
aiocbp->aiocb.__return_value = TEMP_FAILURE_RETRY (fdatasync (fildes));

View File

@ -63,6 +63,8 @@ main(int argc, char *argv[])
if (!freopen (filename, "r", stdin))
fprintf(stderr, "cannot open file\n");
unsetenv ("LD_LIBRARY_PATH");
if (!(input = popen("/bin/cat", "r")))
fprintf(stderr, "cannot run \n");

View File

@ -42,7 +42,7 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \
strcoll_l strxfrm_l
tests := tester inl-tester noinl-tester testcopy test-ffs \
tst-strlen stratcliff tst-svc
tst-strlen stratcliff tst-svc tst-inlcall
distribute := memcopy.h pagecopy.h tst-svc.expect

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
/* Copyright (C) 1991, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -18,7 +18,9 @@
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <bits/libc-lock.h>
#ifndef HAVE_GNU_LD
@ -27,23 +29,100 @@
/* Defined in siglist.c. */
extern const char *const _sys_siglist[];
static __libc_key_t key;
/* If nonzero the key allocation failed and we should better use a
static buffer than fail. */
#define BUFFERSIZ 100
static char local_buf[BUFFERSIZ];
static char *static_buf;
/* Destructor for the thread-specific data. */
static void init (void);
static void free_key_mem (void *mem);
static char *getbuffer (void);
/* Return a string describing the meaning of the signal number SIGNUM. */
char *
strsignal (int signum)
{
__libc_once_define (static, once);
const char *desc;
if (signum < 0 || signum > NSIG || (desc = _sys_siglist[signum]) == NULL)
/* If we have not yet initialized the buffer do it now. */
__libc_once (once, init);
if (
#ifdef SIGRTMIN
(signum >= SIGRTMIN && signum <= SIGRTMAX) ||
#endif
signum < 0 || signum > NSIG || (desc = _sys_siglist[signum]) == NULL)
{
static char buf[512];
int len = __snprintf (buf, sizeof buf, _("Unknown signal %d"), signum);
char *buffer = getbuffer ();
int len = __snprintf (buffer, BUFFERSIZ - 1,
#ifdef SIGRTMIN
signum >= SIGRTMIN && signum <= SIGRTMAX
? _("Real-time signal %d") :
#endif
_("Unknown signal %d"), signum);
if (len < 0)
return NULL;
buf[len - 1] = '\0';
return buf;
buffer = NULL;
else
buffer[len] = '\0';
return buffer;
}
return (char *) _(desc);
}
/* Initialize buffer. */
static void
init (void)
{
if (__libc_key_create (&key, free_key_mem))
/* Creating the key failed. This means something really went
wrong. In any case use a static buffer which is better than
nothing. */
static_buf = local_buf;
}
/* Free the thread specific data, this is done if a thread terminates. */
static void
free_key_mem (void *mem)
{
free (mem);
__libc_setspecific (key, NULL);
}
/* Return the buffer to be used. */
static char *
getbuffer (void)
{
char *result;
if (static_buf != NULL)
result = static_buf;
else
{
/* We don't use the static buffer and so we have a key. Use it
to get the thread-specific buffer. */
result = __libc_getspecific (key);
if (result == NULL)
{
/* No buffer allocated so far. */
result = malloc (BUFFERSIZ);
if (result == NULL)
/* No more memory available. We use the static buffer. */
result = local_buf;
else
__libc_setspecific (key, result);
}
}
return result;
}

76
string/tst-inlcall.c Normal file
View File

@ -0,0 +1,76 @@
/* Tester for calling inline string functions.
Copyright (C) 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
/* Make sure we test the optimized inline functions. */
#define __USE_STRING_INLINES 1
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <fcntl.h>
int
main (void)
{
int status;
int errors = 0;
char buf1[1000];
char *cp;
char ch;
cp = strcpy (buf1, "hello world");
if (strcmp ("hello world", cp++) != 0)
{
puts ("strcmp test 1 failed");
++errors;
}
cp = buf1;
if (strcmp (cp++, "hello world") != 0)
{
puts ("strcmp test 2 failed");
++errors;
}
ch = 'h';
if (strchr ("hello world", ch++) == NULL)
{
puts ("strchr test 1 failed");
++errors;
}
if (errors == 0)
{
status = EXIT_SUCCESS;
puts ("No errors.");
}
else
{
status = EXIT_FAILURE;
printf ("%Zd errors.\n", errors);
}
exit (status);
}

View File

@ -1016,8 +1016,7 @@ parseargs(int argc, const char *argv[], struct commandline *cmd)
size_t len = strlen (argv[i]);
pathbuf = malloc (len + 5);
if (pathbuf == NULL) {
f_print(stderr, "%s\n",
strerror (errno));
perror(cmdname);
crash();
}
stpcpy (stpcpy (pathbuf,

View File

@ -63,5 +63,9 @@ typedef double double_t;
#endif
/* The values returned by `ilogb' for 0 and NaN respectively. */
#define FP_ILOGB0 0x80000001
#define FP_ILOGBNAN 0x7fffffff
/* Number of decimal digits for the `double' type. */
#define DECIMAL_DIG 15

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
/* Copyright (C) 1991, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -19,7 +19,8 @@
#include <libintl.h>
#include <stdio.h>
#include <string.h>
#include "../stdio-common/_itoa.h"
#include <sys/param.h>
#include <stdio-common/_itoa.h>
#ifndef HAVE_GNU_LD
#define _sys_errlist sys_errlist
@ -41,12 +42,27 @@ _strerror_internal (int errnum, char *buf, size_t buflen)
{
if (errnum < 0 || errnum >= _sys_nerr)
{
/* Buffer we use to print the number in. For a maximum size for
`int' of 8 bytes we never need more than 20 digits. */
char numbuf[21];
const char *unk = _("Unknown error ");
const size_t unklen = strlen (unk);
char *p = buf + buflen;
*--p = '\0';
p = _itoa_word (errnum, p, 10, 0);
return memcpy (p - unklen, unk, unklen);
char *p, *q;
numbuf[20] = '\0';
p = _itoa_word (errnum, &numbuf[20], 10, 0);
/* Now construct the result while taking care for the destination
buffer size. */
q = __mempcpy (buf, unk, MIN (unklen, buflen));
if (unklen < buflen)
__stpncpy (q, p, buflen - unklen);
/* Terminate the string in any case. */
if (buflen > 0)
buf[buflen - 1] = '\0';
return buf;
}
return (char *) _(_sys_errlist[errnum]);

View File

@ -1,5 +1,5 @@
/* Optimized, inlined string functions. i386 version.
Copyright (C) 1997 Free Software Foundation, Inc.
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -38,6 +38,7 @@
/* Copy N bytes of SRC to DEST. */
#define _HAVE_STRING_ARCH_memcpy 1
#define memcpy(dest, src, n) \
(__extension__ (__builtin_constant_p (n) \
? __memcpy_c (dest, src, n) \
@ -132,6 +133,7 @@ __memcpy_c (void *__dest, __const void *__src, size_t __n)
/* Copy N bytes of SRC to DEST, guaranteeing
correct behavior for overlapping strings. */
#define _HAVE_STRING_ARCH_memmove 1
__STRING_INLINE void *
memmove (void *__dest, __const void *__src, size_t __n)
{
@ -158,6 +160,7 @@ memmove (void *__dest, __const void *__src, size_t __n)
/* Set N bytes of S to C. */
#define _HAVE_STRING_ARCH_memset 1
#define memset(s, c, n) \
(__extension__ (__builtin_constant_p (c) \
? (__builtin_constant_p (n) \
@ -249,27 +252,7 @@ __memset_gg (void *__s, char __c, size_t __n)
/* Search N bytes of S for C. */
__STRING_INLINE void *
memchr (__const void *__s, int __c, size_t __n)
{
register void *__res;
if (count == 0)
return NULL;
__asm__ __volatile__
("cld\n\t"
"repne; scasb\n\t"
"je 1f\n\t"
"movl $1,%0\n"
"1:\n\t"
"decl %0"
: "=D" (__res)
: "a" (__c), "D" (__s), "c" (__n)
: "cx", "cc");
return __res;
}
/* Search N bytes of S for C. */
#define _HAVE_STRING_ARCH_memchr 1
__STRING_INLINE void *
memchr (__const void *__s, int __c, size_t __n)
{
@ -291,6 +274,7 @@ memchr (__const void *__s, int __c, size_t __n)
/* Return the length of S. */
#define _HAVE_STRING_ARCH_strlen 1
__STRING_INLINE size_t
strlen (__const char *__str)
{
@ -307,6 +291,7 @@ strlen (__const char *__str)
/* Copy SRC to DEST. */
#define _HAVE_STRING_ARCH_strcpy 1
__STRING_INLINE char *
strcpy (char *__dest, __const char *__src)
{
@ -325,6 +310,7 @@ strcpy (char *__dest, __const char *__src)
/* Copy no more than N characters of SRC to DEST. */
#define _HAVE_STRING_ARCH_strncpy 1
__STRING_INLINE char *
strncpy (char *__dest, __const char *__src, size_t __n)
{
@ -347,6 +333,7 @@ strncpy (char *__dest, __const char *__src, size_t __n)
/* Append SRC onto DEST. */
#define _HAVE_STRING_ARCH_strcat 1
__STRING_INLINE char *
strcat (char *__dest, __const char *__src)
{
@ -367,6 +354,7 @@ strcat (char *__dest, __const char *__src)
/* Append no more than N characters from SRC onto DEST. */
#define _HAVE_STRING_ARCH_strncat 1
__STRING_INLINE char *
strncat (char *__dest, __const char *__src, size_t __n)
{
@ -393,6 +381,7 @@ strncat (char *__dest, __const char *__src, size_t __n)
/* Compare S1 and S2. */
#define _HAVE_STRING_ARCH_strcmp 1
__STRING_INLINE int
strcmp (__const char *__s1, __const char *__s2)
{
@ -419,6 +408,7 @@ strcmp (__const char *__s1, __const char *__s2)
/* Compare N characters of S1 and S2. */
#define _HAVE_STRING_ARCH_strncmp 1
__STRING_INLINE int
strncmp (__const char *__s1, __const char *__s2, size_t __n)
{
@ -448,6 +438,7 @@ strncmp (__const char *__s1, __const char *__s2, size_t __n)
/* Find the first occurrence of C in S. */
#define _HAVE_STRING_ARCH_strchr 1
#define strchr(s, c) \
(__extension__ (__builtin_constant_p (c) \
? __strchr_c (s, ((c) & 0xff) << 8) \
@ -499,6 +490,7 @@ __strchr_c (__const char *__s, int __c)
/* Return the length of the initial segment of S which
consists entirely of characters not in REJECT. */
#define _HAVE_STRING_ARCH_strcspn 1
#ifdef __PIC__
__STRING_INLINE size_t
strcspn (__const char *__s, __const char *__reject)
@ -558,6 +550,7 @@ strcspn (__const char *__s, __const char *__reject)
/* Return the length of the initial segment of S which
consists entirely of characters in ACCEPT. */
#define _HAVE_STRING_ARCH_strspn 1
#ifdef __PIC__
__STRING_INLINE size_t
strspn (__const char *__s, __const char *__accept)
@ -616,6 +609,7 @@ strspn (__const char *__s, __const char *__accept)
/* Find the first occurrence in S of any character in ACCEPT. */
#define _HAVE_STRING_ARCH_strpbrk 1
#ifdef __PIC__
__STRING_INLINE char *
strpbrk (__const char *__s, __const char *__accept)
@ -682,6 +676,7 @@ strpbrk (__const char *__s, __const char *__accept)
/* Find the first occurrence of NEEDLE in HAYSTACK. */
#define _HAVE_STRING_ARCH_strstr 1
#ifdef __PIC__
__STRING_INLINE char *
strstr (__const char *__haystack, __const char *__needle)

View File

@ -1,5 +1,5 @@
/* Optimized, inlined string functions. i486 version.
Copyright (C) 1997 Free Software Foundation, Inc.
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -373,7 +373,7 @@ __strlen_g (__const char *__str)
: (char *) memcpy (dest, src, strlen (src) + 1)) \
: __strcpy_g (dest, src)))
# define __strcpy_small(dest, src, srclen) \
#define __strcpy_small(dest, src, srclen) \
(__extension__ ({ unsigned char *__dest = (unsigned char *) (dest); \
switch (srclen) \
{ \
@ -1006,11 +1006,11 @@ __strrchr_c (__const char *__s, int __c)
"1:\n\t"
"lodsb\n\t"
"cmpb %%ah,%%al\n\t"
"cmovne %%esi,%0\n\t"
"cmove %%esi,%0\n\t"
"testb %%al,%%al\n\t"
"jne 1b"
: "=d" (__res)
: "0" (1), "S" (__s),"a" (__c)
: "0" (1), "S" (__s), "a" (__c)
: "ax", "si", "cc");
return __res - 1;
}
@ -1025,11 +1025,11 @@ __strrchr_g (__const char *__s, int __c)
"1:\n\t"
"lodsb\n\t"
"cmpb %%ah,%%al\n\t"
"cmovne %%esi,%0\n\t"
"cmove %%esi,%0\n\t"
"testb %%al,%%al\n\t"
"jne 1b"
: "=r" (__res)
: "0" (1), "S" (__s),"a" (__c)
: "0" (1), "S" (__s), "a" (__c)
: "ax", "si", "cc");
return __res - 1;
}

View File

@ -1,4 +1,5 @@
#define socket accept
#define __socket __libc_accept
#define NARGS 3
#include <socket.S>
strong_alias (__accept, __libc_accept)
weak_alias (__libc_accept, __accept)

View File

@ -36,20 +36,20 @@ sys_mknod xmknod mknod 3 __syscall_mknod
# override select.S in parent directory:
select - select 5 __select select
accept - accept 3 __accept accept
accept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
connect - connect 3 __connect connect
connect - connect 3 __libc_connect __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
recv - recv 4 __recv recv
recvfrom - recvfrom 6 __recvfrom recvfrom
recvmsg - recvmsg 3 __recvmsg recvmsg
recv - recv 4 __libc_recv __recv recv
recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
ptrace - ptrace 4 __ptrace ptrace
send - send 4 __send send
sendmsg - sendmsg 3 __sendmsg sendmsg
sendto - sendto 6 __sendto sendto
send - send 4 __libc_send __send send
sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socketpair - socketpair 4 __socketpair socketpair

View File

@ -31,8 +31,12 @@
The .S files for the other calls just #define socket and #include this. */
.globl P(__,socket)
ENTRY (P(__,socket))
#ifndef __socket
#define __socket P(__,socket)
#endif
.globl __socket
ENTRY (__socket)
/* Do the system call trap. */
swi SYS_ify(socketcall)
@ -44,6 +48,6 @@ ENTRY (P(__,socket))
/* Successful; return the syscall's value. */
RETINSTR(mov,pc,r14)
PSEUDO_END (P(__,socket))
PSEUDO_END (__socket)
weak_alias (P(__,socket), socket)
weak_alias (__socket, socket)

View File

@ -1,4 +1,5 @@
#define socket connect
#define __socket __libc_connect
#define NARGS 3
#include <socket.S>
strong_alias (__connect, __libc_connect)
weak_alias (__libc_connect, __connect)

View File

@ -31,8 +31,12 @@
The .S files for the other calls just #define socket and #include this. */
.globl P(__,socket)
ENTRY (P(__,socket))
#ifndef __socket
#define __socket P(__,socket)
#endif
.globl __socket
ENTRY (__socket)
/* Save registers. */
movl %ebx, %edx
@ -56,6 +60,6 @@ ENTRY (P(__,socket))
/* Successful; return the syscall's value. */
ret
PSEUDO_END (P(__,socket))
PSEUDO_END (__socket)
weak_alias (P(__,socket), socket)
weak_alias (__socket, socket)

View File

@ -31,8 +31,12 @@
The .S files for the other calls just #define socket and #include this. */
.globl P(__,socket)
ENTRY (P(__,socket))
#ifndef __socket
#define __socket P(__,socket)
#endif
.globl __socket
ENTRY (__socket)
/* Save registers. */
move.l %d2, %a0
@ -56,6 +60,6 @@ ENTRY (P(__,socket))
/* Successful; return the syscall's value. */
rts
PSEUDO_END (P(__,socket))
PSEUDO_END (__socket)
weak_alias (P(__,socket), socket)
weak_alias (__socket, socket)

View File

@ -16,19 +16,19 @@ sigsuspend - sigsuspend 1 __sigsuspend sigsuspend
# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
# it's provided for compatibility, though.
#
accept - accept 3 __accept accept
ccept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
connect - connect 3 __connect connect
connect - connect 3 __libc_connect __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
recv - recv 4 __recv recv
recvfrom - recvfrom 6 __recvfrom recvfrom
recvmsg - recvmsg 3 __recvmsg recvmsg
send - send 4 __send send
sendmsg - sendmsg 3 __sendmsg sendmsg
sendto - sendto 6 __sendto sendto
recv - recv 4 __libc_recv __recv recv
recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
send - send 4 __libc_send __send send
sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socket - socket 3 __socket socket

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1997 Free Software Foundation, Inc.
/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -28,24 +28,40 @@
enum
{
IFF_UP = 0x1, /* Interface is up. */
#define IFF_UP IFF_UP
IFF_BROADCAST = 0x2, /* Broadcast address valid. */
#define IFF_BROADCAST IFF_BROADCAST
IFF_DEBUG = 0x4, /* Turn on debugging. */
#define IFF_DEBUG IFF_DEBUG
IFF_LOOPBACK = 0x8, /* Is a loopback net. */
#define IFF_LOOPBACK IFF_LOOPBACK
IFF_POINTOPOINT = 0x10, /* Interface is point-to-point link. */
#define IFF_POINTOPOINT IFF_POINTOPOINT
IFF_NOTRAILERS = 0x20, /* Avoid use of trailers. */
#define IFF_NOTRAILERS IFF_NOTRAILERS
IFF_RUNNING = 0x40, /* Resources allocated. */
#define IFF_RUNNING IFF_RUNNING
IFF_NOARP = 0x80, /* No address resolution protocol. */
#define IFF_NOARP IFF_NOARP
IFF_PROMISC = 0x100, /* Receive all packets. */
#define IFF_PROMISC IFF_PROMISC
/* Not supported */
IFF_ALLMULTI = 0x200, /* Receive all multicast packets. */
#define IFF_ALLMULTI IFF_ALLMULTI
IFF_MASTER = 0x400, /* Master of a load balancer. */
#define IFF_MASTER IFF_MASTER
IFF_SLAVE = 0x800, /* Slave of a load balancer. */
#define IFF_SLAVE IFF_SLAVE
IFF_MULTICAST = 0x1000, /* Supports multicast. */
#define IFF_MULTICAST IFF_MULTICAST
IFF_PORTSEL = 0x2000, /* Can set media type. */
#define IFF_PORTSEL IFF_PORTSEL
IFF_AUTOMEDIA = 0x4000 /* Auto media select active. */
#define IFF_AUTOMEDIA IFF_AUTOMEDIA
};
/* The ifaddr structure contains information about one address of an

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc.
/* Copyright (C) 1991, 92, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -125,6 +125,7 @@ struct ip_fw {
#define IP_FW_OUT 2
#define IP_FW_ACCT 3
#define IP_FW_CHAINS 4 /* total number of ip_fw chains */
#define IP_FW_MASQ 5
#define IP_FW_INSERT (IP_FW_BASE_CTL)
#define IP_FW_APPEND (IP_FW_BASE_CTL+1)
@ -165,6 +166,11 @@ struct ip_fw {
#define IP_ACCT_FLUSH (IP_FW_FLUSH | (IP_FW_ACCT << IP_FW_SHIFT))
#define IP_ACCT_ZERO (IP_FW_ZERO | (IP_FW_ACCT << IP_FW_SHIFT))
#define IP_FW_MASQ_INSERT (IP_FW_INSERT | (IP_FW_MASQ << IP_FW_SHIFT))
#define IP_FW_MASQ_ADD (IP_FW_APPEND | (IP_FW_MASQ << IP_FW_SHIFT))
#define IP_FW_MASQ_DEL (IP_FW_DELETE | (IP_FW_MASQ << IP_FW_SHIFT))
#define IP_FW_MASQ_FLUSH (IP_FW_FLUSH | (IP_FW_MASQ << IP_FW_SHIFT))
struct ip_fwpkt
{
struct iphdr fwp_iph; /* IP header */
@ -177,6 +183,21 @@ struct ip_fwpkt
char fwp_vianame[IFNAMSIZ]; /* interface name */
};
#define IP_FW_MASQCTL_MAX 256
#define IP_MASQ_MOD_NMAX 32
struct ip_fw_masqctl
{
int mctl_action;
union {
struct {
char name[IP_MASQ_MOD_NMAX];
char data[1];
} mod;
} u;
};
/*
* timeouts for ip masquerading
*/

View File

@ -1,4 +1,5 @@
#define socket recv
#define __socket __libc_recv
#define NARGS 4
#include <socket.S>
strong_alias (__recv, __libc_recv)
weak_alias (__libc_recv, __recv)

View File

@ -1,4 +1,5 @@
#define socket recvfrom
#define __socket __libc_recvfrom
#define NARGS 6
#include <socket.S>
strong_alias (__recvfrom, __libc_recvfrom)
weak_alias (__libc_recvfrom, __recvfrom)

View File

@ -1,4 +1,5 @@
#define socket recvmsg
#define __socket __libc_recvmsg
#define NARGS 3
#include <socket.S>
strong_alias (__recvmsg, __libc_recvmsg)
weak_alias (__libc_recvmsg, __recvmsg)

View File

@ -1,4 +1,5 @@
#define socket send
#define __socket __libc_send
#define NARGS 4
#include <socket.S>
strong_alias (__send, __libc_send)
weak_alias (__libc_send, __send)

View File

@ -1,4 +1,5 @@
#define socket sendmsg
#define __socket __libc_sendmsg
#define NARGS 3
#include <socket.S>
strong_alias (__sendmsg, __libc_sendmsg)
weak_alias (__libc_sendmsg, __sendmsg)

View File

@ -1,4 +1,5 @@
#define socket sendto
#define __socket __libc_sendto
#define NARGS 6
#include <socket.S>
strong_alias (__sendto, __libc_sendto)
weak_alias (__libc_sendto, __sendto)

View File

@ -1,14 +1,14 @@
#include <stddef.h>
#include <signal.h>
const char * const __new_sys_siglist[NSIG] =
const char * const __new_sys_siglist[NSIG + 1] =
{
#define init_sig(sig, abbrev, desc) [sig] desc,
#include "siglist.h"
#undef init_sig
};
const char * const __new_sys_sigabbrev[NSIG] =
const char * const __new_sys_sigabbrev[NSIG + 1] =
{
#define init_sig(sig, abbrev, desc) [sig] abbrev,
#include "siglist.h"

View File

@ -39,8 +39,12 @@
The .S files for the other calls just #define socket and #include this. */
.globl P(__,socket)
ENTRY (P(__,socket))
#ifndef __socket
#define __socket P(__,socket)
#endif
.globl __socket
ENTRY (__socket)
/* Drop up to 6 arguments (recvfrom) into the memory allocated by
the caller for varargs, since that's really what we have. */
@ -71,6 +75,6 @@ ENTRY (P(__,socket))
1: SYSCALL_ERROR_HANDLER
END (P(__,socket))
END (__socket)
weak_alias (P(__,socket), socket)
weak_alias (__socket, socket)

View File

@ -14,19 +14,19 @@ mmap - mmap 6 __mmap mmap __mmap64 mmap64
# Override select.S in parent directory:
select - select 5 __select select
accept - accept 3 __accept accept
accept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
connect - connect 3 __connect connect
connect - connect 3 __libc_connect __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
recv - recv 4 __recv recv
recvfrom - recvfrom 6 __recvfrom recvfrom
recvmsg - recvmsg 3 __recvmsg recvmsg
send - send 4 __send send
sendmsg - sendmsg 3 __sendmsg sendmsg
sendto - sendto 6 __sendto sendto
recv - recv 4 __libc_recv __recv recv
recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
send - send 4 __libc_send __send send
sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socketpair - socketpair 4 __socketpair socketpair

View File

@ -1,4 +1,4 @@
# @(#)africa 7.22
# @(#)africa 7.23
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
@ -301,7 +301,7 @@ Zone Africa/Maseru 1:50:00 - LMT 1903 Mar
# Liberia
# From Paul Eggert <eggert@twinsun.com> (1993-11-18):
# In 1972 Liberia was the last country to switch
# from a GMT offset that was not a multiple of 15 minutes.
# from a UTC offset that was not a multiple of 15 minutes.
# Howse reports that it was in honor of their president's birthday.
# Shanks reports the date as May 1, whereas Howse reports Jan; go with Shanks.
# For Liberia before 1972, Shanks reports -0:44, whereas Howse and Whitman

View File

@ -1,9 +1,16 @@
# @(#)antarctica 7.10
# @(#)antarctica 7.12
# From Paul Eggert (1997-03-28):
# To keep things manageable, we list only locations occupied year-round;
# see <URL:http://earth.agu.org/amen/nations.html> (1996-05-24)
# and <URL:http://www.spri.cam.ac.uk/bob/periant.htm> (1996-09-05).
# see
# <a href="http://earth.agu.org/amen/nations.html">
# Antarctic Activities of Member Nations of the Antarctic Treaty (1996-05-24)
# </a>
# and
# <a href="http://www.spri.cam.ac.uk/bob/periant.htm">
# Summary of the Peri-Antarctic Islands (1996-09-05)
# </a>
# for information.
# Unless otherwise specified, we have no time zone information.
#
# Except for the French entries,
@ -43,8 +50,12 @@ Zone Antarctica/Casey 0 - ___ 1969
Zone Antarctica/Mawson 0 - ___ 1954 Feb 13
6:00 - MAWT # Mawson Time
# References:
# <URL:http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html> (1996-07-15)
# <URL:http://www.antdiv.gov.au/aad/exop/sfo/mawson/video.html> (1996-04-19)
# <a href="http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html">
# http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html (1996-07-15)
# </a>
# <a href="http://www.antdiv.gov.au/aad/exop/sfo/mawson/video.html">
# http://www.antdiv.gov.au/aad/exop/sfo/mawson/video.html (1996-04-19)
# </a>
# Brazil - year-round base
# Ferraz, King George Island, since 1983/4
@ -92,7 +103,9 @@ Zone Antarctica/DumontDUrville 0 - ___ 1947
0 - ___ 1956 Nov
10:00 - DDUT # Dumont-d'Urville Time
# Reference:
# <URL:http://www.icair.iac.org.nz/science/reports/fr/IFRTP.html> (1996-09-10)
# <a href="http://www.icair.iac.org.nz/science/reports/fr/IFRTP.html">
# Support and Development of Polar Research and Technology (1996-09-10)
# </a>
# Germany - year-round base
@ -198,8 +211,11 @@ Zone Antarctica/McMurdo 0 - ___ 1956
# which was on GMT+12 because New Zealand was on GMT+12 all year
# at that time (1957). (Source: Siple's book 90 degrees SOUTH.)
#
# From Susan Smith <URL:http://www.cybertours.com/whs/pole10.html>
# (1995-11-13 16:24:56 +1300): We use the same time as McMurdo does.
# From Susan Smith
# <a href="http://www.cybertours.com/whs/pole10.html">
# http://www.cybertours.com/whs/pole10.html (1995-11-13 16:24:56 +1300):
# </a>
# We use the same time as McMurdo does.
# And they use the same time as Christchurch, NZ does....
# One last quirk about South Pole time.
# All the electric clocks are usually wrong.

View File

@ -1,4 +1,4 @@
# @(#)asia 7.33
# @(#)asia 7.35
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
@ -352,8 +352,11 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov
# Iran
# From Paul Eggert (1996-12-17), following up a suggestion by Rich Wales:
# Ahmad Alavi <URL:http://tehran.stanford.edu/Iran_Lib/Calendar/taghveem.txt>
# (1993-08-04) writes ``Daylight saving time in Iran starts from the first day
# Ahmea Alavi in
# <a href="http://tehran.stanford.edu/Iran_Lib/Calendar/taghveem.txt">
# http://tehran.stanford.edu/Iran_Lib/Calendar/taghveem.txt (1993-08-04)
# </a>
# writes ``Daylight saving time in Iran starts from the first day
# of Farvardin and ends the first day of Mehr.'' This disagrees with the SSIM:
#
# DST start DST end
@ -503,7 +506,8 @@ Rule Zion 1987 only - Sep 13 0:00 0 S
Rule Zion 1988 only - Apr 9 0:00 1:00 D
Rule Zion 1988 only - Sep 3 0:00 0 S
# From Ephraim Silverberg (ephraim@cs.huji.ac.il), 1997-03-04:
# From Ephraim Silverberg <ephraim@cs.huji.ac.il>
# (1997-03-04 and 1997-12-31):
# According to the Office of the Secretary General of the Ministry of
# Interior, there is NO set rule for Daylight-Savings/Standard time changes.
@ -544,16 +548,18 @@ Rule Zion 1995 only - Sep 3 0:00 0 S
# The dates for 1996 were determined by the Minister of Interior of the
# time, Haim Ramon. The official announcement regarding 1996-1998
# (with the dates for 1997 no longer being relevant) can be viewed at:
# (with the dates for 1997-1998 no longer being relevant) can be viewed at:
#
# ftp://ftp.huji.ac.il/pub/tz/announcements/1996-1998.ramon.ps.gz
#
# The dates for 1997 were altered by his successor, Rabbi Eli Suissa.
# No changes have been made regarding 1998 as of yet.
#
# The dates for 1997-1998 were altered by his successor, Rabbi Eli Suissa.
# The official announcement for the year 1997 can be viewed at:
#
# ftp://ftp.huji.ac.il/pub/tz/announcements/1997.ps.gz
#
# According to the Office of the Spokeswoman for the Ministry of Interior,
# the dates for 1998 are tentative and are still subject to final approval
# (probably in late February/early March of 1998).
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Zion 1996 only - Mar 15 0:00 1:00 D
@ -561,14 +567,14 @@ Rule Zion 1996 only - Sep 16 0:00 0 S
Rule Zion 1997 only - Mar 21 0:00 1:00 D
Rule Zion 1997 only - Sep 14 0:00 0 S
Rule Zion 1998 only - Mar 20 0:00 1:00 D
Rule Zion 1998 only - Oct 18 0:00 0 S
Rule Zion 1998 only - Sep 6 0:00 0 S
# From Paul Eggert (1997-03-15):
# From Paul Eggert (1998-01-12):
# Here are guesses for rules after 1998.
# They are probably wrong, but they are more likely than no DST at all.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Zion 1999 max - Mar Fri>=15 0:00 1:00 D
Rule Zion 1999 max - Sep Sun>=15 0:00 0 S
Rule Zion 1999 max - Sep Sun>=1 0:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Jerusalem 2:20:56 - LMT 1880
@ -774,7 +780,9 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Male
# Mongolia
# Shanks says that Mongolia has three time zones, but usno1995 and
# <URL:http://www.odci.gov/cia/publications/95fact/802389h.gif> (1995)
# <a href="http://www.odci.gov/cia/publications/95fact/802389h.gif">
# http://www.odci.gov/cia/publications/95fact/802389h.gif (1995)
# </a>
# both say that it has just one.
# Let's comment out the western and eastern Mongolian time zones
# till we know what their principal towns are.
@ -881,13 +889,18 @@ Zone Asia/Singapore 6:55:24 - LMT 1880
# Sri Lanka
# From Paul Eggert (1996-09-03):
# <URL:http://www.virtual-pc.com/lankaweb/news/items/240596-2.html> (1996-05-24)
# <a href="http://www.virtual-pc.com/lankaweb/news/items/240596-2.html">
# http://www.virtual-pc.com/lankaweb/news/items/240596-2.html (1996-05-24)
# </a>
# reported ``the country's standard time will be put forward by one hour at
# midnight Friday (1830 GMT) `in the light of the present power crisis'.''
# Transitions before 1996 are from Shanks (1991).
#
# From Dharmasiri Senanayake, Sri Lanka Media Minister (1996-10-24), as quoted
# in <URL:news:54rka5$m5h@mtinsc01-mgt.ops.worldnet.att.net> (1996-10-26):
# in
# <a href="news:54rka5$m5h@mtinsc01-mgt.ops.worldnet.att.net">
# news:54rka5$m5h@mtinsc01-mgt.ops.worldnet.att.net (1996-10-26):
# </a>
# With effect from 12.30 a.m. on 26th October 1996
# Sri Lanka will be six (06) hours ahead of GMT.
@ -977,9 +990,13 @@ Zone Asia/Tashkent 4:37:12 - LMT 1924 May 2
5:00 - UZT # Uzbekistan Time
# Shanks has Tashkent using DST after 1991, but usno1995 says they don't.
# Guess no DST after 1991.
# <URL:http://www.odci.gov/cia/publications/95fact/802389h.gif> (1995)
# <a href="http://www.odci.gov/cia/publications/95fact/802389h.gif">
# http://www.odci.gov/cia/publications/95fact/802389h.gif (1995)
# </a>
# says that Uzbekistan has two time zones, but a cable
# <URL:http://www.itaiep.doc.gov/bisnis/cables/960510uz.html> (1996-05-10)
# <a href="http://www.itaiep.doc.gov/bisnis/cables/960510uz.html">
# http://www.itaiep.doc.gov/bisnis/cables/960510uz.html (1996-05-10)
# </a>
# from the American Embassy in Tashkent implies that they have just one.
# Vietnam

View File

@ -1,4 +1,4 @@
# @(#)australasia 7.37
# @(#)australasia 7.39
# This file also includes Pacific islands.
# Notes are at the end of this file
@ -303,7 +303,7 @@ Rule NZ 1928 only - Nov 4 2:00 0:30 HD
Rule NZ 1929 only - Oct 30 2:00 0:30 HD
Rule NZ 1930 1933 - Mar Sun>=15 2:00 0 S
Rule NZ 1930 1933 - Oct Sun>=8 2:00 0:30 HD
# Whitman says DST went on and off during war years, and the base GMT offset
# Whitman says DST went on and off during war years, and the base UT offset
# didn't change until 1945 Apr 30; go with Shanks.
Rule NZ 1934 1940 - Apr lastSun 2:00 0 S
Rule NZ 1934 1939 - Sep lastSun 2:00 0:30 HD
@ -509,6 +509,26 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# and perhaps the newspaper's `2:00' is referring to standard time.
# For now we'll continue to assume 2:00s for changes since 1960.
# From Eric Ulevik <eau@zip.com.au> (1998-01-05):
#
# Here are some URLs to Australian time legislation. These URLs are stable,
# and should probably be included in the data file. There are probably more
# relevant entries in this database.
#
# NSW (including LHI and Broken Hill):
# <a href="http://www.austlii.edu.au/au/legis/nsw/consol_act/sta1987137/index.html">
# http://www.austlii.edu.au/au/legis/nsw/consol_act/sta1987137/index.html
# </a>
# ACT
# <a href="http://www.austlii.edu.au/au/legis/act/consol_act/consol_act/stasta1972279/i">
# http://www.austlii.edu.au/au/legis/act/consol_act/consol_act/stasta1972279/i
# </a>
# ndex.html
# SA
# <a href="http://www.austlii.edu.au/au/legis/sa/consol_act/sta1898137/index.html">
# http://www.austlii.edu.au/au/legis/sa/consol_act/sta1898137/index.html
# </a>
# Northern Territory
# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06):

View File

@ -1,4 +1,4 @@
# @(#)etcetera 7.8
# @(#)etcetera 7.9
# These entries are mostly present for historical reasons, so that
# people in areas not otherwise covered by the tz files could "zic -l"
@ -20,7 +20,7 @@ Link Etc/GMT Etc/GMT0
# We use POSIX-style signedness in the names and output,
# internal-style signedness in the specifications.
# For example, TZ=Etc/GMT+4 corresponds to 4 hours _behind_ GMT;
# For example, TZ=Etc/GMT+4 corresponds to 4 hours _behind_ UTC;
# it is equivalent to TZ=GMT+4, which is implemented directly as per POSIX.
# Earlier incarnations of this package were not POSIX-compliant,

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
# @(#)leapseconds 7.9
# @(#)leapseconds 7.10
# Allowance for leapseconds added to each timezone file.
@ -17,7 +17,7 @@
# Leap YEAR MON DAY 23:59:59 - R/S
# If the leapsecond is Rolling (R) the given time is local time
# If the leapsecond is Stationary (S) the given time is GMT
# If the leapsecond is Stationary (S) the given time is UTC
# Leap YEAR MONTH DAY HH:MM:SS CORR R/S
Leap 1972 Jun 30 23:59:60 + S

View File

@ -1,4 +1,4 @@
# @(#)northamerica 7.35
# @(#)northamerica 7.39
# also includes Central America and the Caribbean
# This data is by no means authoritative; if you think you know better,
@ -651,6 +651,20 @@ Zone America/Glace_Bay -3:59:48 - LMT 1902 Jun 15
# Nipigon (EST) and Rainy River (CST) are the largest that we know of.
# Far west Ontario is like Winnipeg; far east Quebec is like Halifax.
# From Paul Eggert (1997-10-17):
# msb@sq.com writes that an article in the 1997-10-14 Toronto Star
# says that Atikokan, Ontario currently does not observe DST,
# but will vote on 11-10 whether to use EST/EDT.
# He also writes that the
# <a href="http://www.gov.on.ca/MBS/english/publications/statregs/conttext.html">
# Ontario Time Act (1990, Chapter T.9)
# </a>
# says that Ontario east of 90W uses EST/EDT, and west of 90W uses CST/CDT.
# Officially Atikokan is therefore on CST/CDT, and most likely this report
# concerns a non-official time observed as a matter of local practice.
# For what it's worth, Shanks (1995) says that Atikokan has agreed with
# Rainy River ever since standard time was introduced.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mont 1917 only - Mar 25 2:00 1:00 D
Rule Mont 1917 only - Apr 24 0:00 0 S
@ -893,7 +907,7 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# From Guy Harris:
# Rules are from the Official Airline Guide, Worldwide Edition, for 1987.
# Rules prior to 1987 are unknown.
# Rules [before] 1987 are unknown.
# The comments in the OAG say "Only Ensenada, Mexicale, San Felipe and Tijuana
# observe DST." This is presumably Baja California Norte, above 28th parallel,
# as listed there; [there is also] "Baja California Sur and N. Pacific
@ -971,9 +985,10 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
#
# -------------- End Forwarded Message --------------
# From Paul Eggert (1996-06-12):
# For an English translation of the decree,
# see ``Diario Oficial: Time Zone Changeover'',
# <URL:http://mexico-travel.com/extra/timezone_eng.html> (1996-01-04).
# For an English translation of the decree, see
# <a href="http://mexico-travel.com/extra/timezone_eng.html">
# ``Diario Oficial: Time Zone Changeover'' (1996-01-04).
# </a>
# From Shanks (1991):
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S

View File

@ -1,4 +1,4 @@
# @(#)southamerica 7.21
# @(#)southamerica 7.22
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
@ -189,7 +189,7 @@ Zone America/La_Paz -4:32:36 - LMT 1890
# ending dates, giving them as "estimated date(s) based on previous year". We
# infer a rule here from one example, always a dangerous practice.... Yes,
# they really do switch on Saturday, according to the OAG.
# "[America/Porto_Acre]" is for the Territory of Acre;
# "[America/Porto_Acre]" is for the [State] of Acre;
# "[America/Noronha]" is for Fernando De Noronha.
# From Paul Eggert <eggert@twinsun.com> (1993-11-18):
@ -242,6 +242,11 @@ Zone America/La_Paz -4:32:36 - LMT 1890
# Sao Paulo (UTC-3) and Cuiaba (UTC-4) always observed DST.
# Porto Acre (UTC-5) stopped observing DST in mid-1988.
# From Rodrigo Feher <feher@pobox.com> (1998-01-17):
# Reading "southamerica" file in timezone 7.55 I've found an
# error. Line 193 say "Territory of Acre". It is not a territory anymore
# but a state.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Brazil 1931 only - Oct 3 11:00 1:00 D
Rule Brazil 1932 1933 - Apr 1 0:00 0 S

View File

@ -21,7 +21,7 @@
#ifndef lint
#ifndef NOID
static char tzfilehid[] = "@(#)tzfile.h 7.13";
static char tzfilehid[] = "@(#)tzfile.h 7.14";
#endif /* !defined NOID */
#endif /* !defined lint */
@ -64,7 +64,7 @@ struct tzhead {
** tzh_timecnt (char [4])s coded transition times a la time(2)
** tzh_timecnt (unsigned char)s types of local time starting at above
** tzh_typecnt repetitions of
** one (char [4]) coded GMT offset in seconds
** one (char [4]) coded UTC offset in seconds
** one (unsigned char) used to set tm_isdst
** one (unsigned char) that's an abbreviation list index
** tzh_charcnt (char)s '\0'-terminated zone abbreviations
@ -77,7 +77,7 @@ struct tzhead {
** if absent, transition times are
** assumed to be wall clock time
** tzh_ttisgmtcnt (char)s indexed by type; if TRUE, transition
** time is GMT, if FALSE,
** time is UTC, if FALSE,
** transition time is local time
** if absent, transition times are
** assumed to be local time

View File

@ -1,6 +1,6 @@
#ifndef lint
#ifndef NOID
static char elsieid[] = "@(#)zdump.c 7.26";
static char elsieid[] = "@(#)zdump.c 7.27";
#endif /* !defined NOID */
#endif /* !defined lint */
@ -344,7 +344,7 @@ int v;
(void) printf("%-*s ", (int) longest, zone);
if (v)
(void) printf("%.24s GMT = ", asctime(gmtime(&t)));
(void) printf("%.24s UTC = ", asctime(gmtime(&t)));
tmp = localtime(&t);
(void) printf("%.24s", asctime(tmp));
if (*abbr(tmp) != '\0')

View File

@ -1,6 +1,6 @@
#ifndef lint
#ifndef NOID
static char elsieid[] = "@(#)zic.c 7.91";
static char elsieid[] = "@(#)zic.c 7.93";
#endif /* !defined NOID */
#endif /* !defined lint */
@ -601,10 +601,23 @@ const char * const tofile;
if (!itsdir(toname))
(void) remove(toname);
if (link(fromname, toname) != 0) {
if (mkdirs(toname) != 0)
(void) exit(EXIT_FAILURE);
if (link(fromname, toname) != 0) {
const char *e = strerror(errno);
int failure = errno;
if (failure == ENOENT)
if (mkdirs(toname) != 0)
failure = errno;
else if (link(fromname, toname) == 0)
failure = 0;
else
failure = errno;
#ifndef MISSING_SYMLINK
if (failure == EXDEV)
if (symlink(fromname, toname) != 0)
failure = errno;
else
failure = 0;
#endif
if (failure) {
const char *e = strerror(failure);
(void) fprintf(stderr,
_("%s: Can't link from %s to %s: %s\n"),
@ -1020,7 +1033,7 @@ const int iscont;
}
z.z_filename = filename;
z.z_linenum = linenum;
z.z_gmtoff = gethms(fields[i_gmtoff], _("invalid GMT offset"), TRUE);
z.z_gmtoff = gethms(fields[i_gmtoff], _("invalid UTC offset"), TRUE);
if ((cp = strchr(fields[i_format], '%')) != 0) {
if (*++cp != 's' || strchr(cp, '%') != 0) {
error(_("invalid abbreviation format"));
@ -1254,11 +1267,12 @@ const char * const timep;
} else if (sscanf(cp, scheck(cp, "%d"), &rp->r_loyear) != 1) {
error(_("invalid starting year"));
return;
} else if (noise)
} else if (noise) {
if (rp->r_loyear < min_year_representable)
warning(_("starting year too low to be represented"));
else if (rp->r_loyear > max_year_representable)
warning(_("starting year too high to be represented"));
}
cp = hiyearp;
if ((lp = byword(cp, end_years)) != NULL) switch ((int) lp->l_value) {
case YR_MINIMUM:
@ -1278,11 +1292,12 @@ const char * const timep;
} else if (sscanf(cp, scheck(cp, "%d"), &rp->r_hiyear) != 1) {
error(_("invalid ending year"));
return;
} else if (noise)
} else if (noise) {
if (rp->r_loyear < min_year_representable)
warning(_("starting year too low to be represented"));
else if (rp->r_loyear > max_year_representable)
warning(_("starting year too high to be represented"));
}
if (rp->r_loyear > rp->r_hiyear) {
error(_("starting year greater than ending year"));
return;
@ -1630,7 +1645,7 @@ const int zonecount;
INITIALIZE(ktime);
if (useuntil) {
/*
** Turn untiltime into GMT
** Turn untiltime into UTC
** assuming the current gmtoff and
** stdoff values.
*/
@ -1946,10 +1961,11 @@ register const struct lookup * const table;
*/
foundlp = NULL;
for (lp = table; lp->l_word != NULL; ++lp)
if (itsabbr(word, lp->l_word))
if (itsabbr(word, lp->l_word)) {
if (foundlp == NULL)
foundlp = lp;
else return NULL; /* multiple inexact matches */
}
return foundlp;
}