diff options
66 files changed, 352 insertions, 156 deletions
@@ -1,5 +1,106 @@ 2002-04-09 Ulrich Drepper <drepper@redhat.com> + * sysdeps/mach/hurd/chown.c: Use INTDEF for __chown. + * sysdeps/unix/sysv/aix/chown.c: Likewise. + * sysdeps/unix/grantpt.c: Use INTUSE for __chown calls. + * sysdeps/unix/sysv/linux/m68k/chown.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/chown.c: Likewise. + * sysdeps/unix/sysv/linux/i386/chown.c: Use INTDEF2 to define + __chown_internal. + * sysdeps/unix/sysv/linux/s390/s390-32//chown.c: Likewise. + + * intl/dcngettext.c [_LIBC]: Use INTUSE for __dcngettext. + * intl/dngettext.c [_LIBC] (DCNGETTEXT): Use INTUSE. + * intl/ngettext.c: Likewise. + + * include/sys/socket.h: Declare __connect_internal and define + __connect macro if not NOT_IN_libc. + * sysdeps/mach/hurd/connect.c: Use INTDEF for __connect. + * sysdeps/unix/sysv/aix/connect.c: Likewise. + * sysdeps/unix/sysv/linux/connect.S: Add __connect_internal alias. + + * include/unistd.h: Declare __close_internal and define __close macro + if not NOT_IN_libc. + * libio/libioP.h (JUMO0, JUMP1, JUMP2, JUMP3, WJUMP0, WJUMP1, WJUMP2, + WJUMP3): Add extra parenthesis to avoid expanding element names with + macors like __close. + * sysdeps/unix/syscalls.list: Add __close_internal alias. + + * include/unistd.h: Declare __dup2_internal and define __dup2 macro + if not NOT_IN_libc. + * sysdeps/mach/hurd/dup2.c: Use INTDEF for __dup2. + * sysdeps/posix/dup2.c: Use INTDEF for __dup2. + * sysdeps/unix/syscalls.list: Add __dup2_internal alias. + + * include/unistd.h: Declare __fork_internal and define __fork macro + if not NOT_IN_libc. + * sysdeps/mach/hurd/fork.c: Use INTDEF for __fork. + * sysdeps/unix/sysv/aix/fork.c: Likewise. + * sysdeps/unix/sysv/linux/syscalls.list: Add __fork_internal alias. + + * include/stdio_ext.h: Declare __fsetlocking_internal and define + __fsetlocking macro to use it if not NOT_IN_libc. + * libio/__fsetlocking.c: Use INTDEF for __fsetlocking. + + * libio/__fbufsize.c: Correct copyright. + * libio/__flbf.c: Likewise. + * libio/__fpending.c: Likewise. + * libio/__fpurge.c: Likewise. + * libio/__freadable.c: Likewise. + * libio/__freading.c: Likewise. + * libio/__fsetlocking.c: Likewise. + * libio/__fwritable.c: Likewise. + * libio/__fwriting.c: Likewise. + + * include/stdio.h: Declare __asprintf_internal and define __asprintf + macro to use it if not NOT_IN_libc. + * stdio-common/asprintf.c: Use INTDEF for __asprintf. + + * include/mntent.h: Declare __setmntent_internal, + __getmntent_r_internal, __endmntent_internal. Define __setmntent, + __getmntent_r, and __endmntent macros to use these functions if not + NOT_IN_libc. + * misc/mntent_r.c: Use INTDEF for __setmntent, __getmntent_r, and + __endmntent. + + * include/math.h: Declare __finite_internal, __finitef_internal, and + __finitel_internal. Redefine isfinite macro if in libc or libm using + these functions. + * sysdeps/generic/s_ldexp.c: Use INTUSE for __finite calls. + * sysdeps/generic/s_ldexpf.c: Use INTUSE for __finitef calls. + * sysdeps/generic/s_ldexpl.c: Use INTUSE for __finitel calls. + * sysdeps/i386/fpu/s_finite.S: Define _internal alias. + * sysdeps/i386/fpu/s_finitef.S: Likewise. + * sysdeps/i386/fpu/s_finitel.S: Likewise. + * sysdeps/ieee754/dbl-64/s_finite.c: Likewise. + * sysdeps/ieee754/flt-32/s_finitef.c: Likewise. + * sysdeps/ieee754/ldbl-128/s_finitel.c: Likewise. + * sysdeps/ieee754/ldbl-96/s_finitel.c: Likewise. + + * include/fcntl.h: Declare __fcntl_internal. Define __fcntl macro + to use this function if not NOT_IN_libc. + * libio/iofdopen.c (_IO_fcntl): Use INTUSE. + * sysdeps/generic/fcntl.c: Use INTDEF for __fcntl. + * sysdeps/mach/hurd/fcntl.c: Likewise. + * sysdeps/unix/sysv/aix/fcntl.c: Likewise. + * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. + + * include/argz.h: Declare __argz_count_internal and + __argz_stringify_internal. + * intl/l10nflist.c [_LIBC]: Use INTUSE for __argz_count and + __argz_stringify. + * string/argz-count.c: Use INTDEF for __argz_count. + * string/argz-stringify.c: Use INTDEF for __argz_stringify. + + * include/stdlib.h: Declare __cxa_atexit_internal and define + __cxa_atexit macro if not NOT_IN_libc. + * stdlib/cxa_atexit.c: Use INTDEF for __cxa_atexit. + * dlfcn/Makefile: Define NOT_IN_libc when compiling modcxaatexit.c. + + * assert/assert.c: Use INTDEF for __assert_fail. + * assert/__assert.c: Use INTUSE for call to __assert_fail. + * include/assert.h: Declare __assert_fail_internal. + * extra-lib.mk: Mark assignment to lib with override. 2002-04-08 Ulrich Drepper <drepper@redhat.com> @@ -1038,7 +1038,7 @@ check: tests ifneq (,$(tests)) cpp-srcs-left = $(tests) -lib = tests +lib := tests include $(patsubst %,$(..)cppflags-iterator.mk,$(tests)) endif diff --git a/assert/__assert.c b/assert/__assert.c index b72ea9f..94f34d1 100644 --- a/assert/__assert.c +++ b/assert/__assert.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -23,5 +23,5 @@ void __assert (const char *assertion, const char *file, int line) { - __assert_fail (assertion, file, line, (const char *) 0); + INTUSE(__assert_fail) (assertion, file, line, (const char *) 0); } diff --git a/assert/assert.c b/assert/assert.c index aa20f1f..453d2af 100644 --- a/assert/assert.c +++ b/assert/assert.c @@ -79,3 +79,4 @@ __assert_fail (const char *assertion, const char *file, unsigned int line, abort (); } +INTDEF(__assert_fail) diff --git a/dlfcn/Makefile b/dlfcn/Makefile index abe4096..9faee3e 100644 --- a/dlfcn/Makefile +++ b/dlfcn/Makefile @@ -83,6 +83,7 @@ $(objpfx)errmsg1.out: $(objpfx)errmsg1 $(objpfx)errmsg1mod.so $(objpfx)tstatexit: $(libdl) $(objpfx)tstatexit.out: $(objpfx)tstatexit $(objpfx)modatexit.so +CPPFLAGS-modcxaatexit.c = -DNOT_IN_libc $(objpfx)tstcxaatexit: $(libdl) $(objpfx)tstcxaatexit.out: $(objpfx)tstcxaatexit $(objpfx)modcxaatexit.so diff --git a/include/argz.h b/include/argz.h index 179e693..0b4f8a0 100644 --- a/include/argz.h +++ b/include/argz.h @@ -1 +1,10 @@ +f#ifndef _ARGZ_H + #include <string/argz.h> + +extern size_t __argz_count_internal (__const char *__argz, size_t __len) + __attribute_pure__ attribute_hidden; +extern void __argz_stringify_internal (char *__argz, size_t __len, int __sep) + attribute_hidden; + +#endif diff --git a/include/assert.h b/include/assert.h index e2fa702..e18d373 100644 --- a/include/assert.h +++ b/include/assert.h @@ -1 +1,7 @@ #include <assert/assert.h> + +extern void __assert_fail_internal (__const char *__assertion, + __const char *__file, + unsigned int __line, + __const char *__function) + __attribute__ ((__noreturn__)) attribute_hidden; diff --git a/include/fcntl.h b/include/fcntl.h index 748854a..7ac5feb 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -7,6 +7,11 @@ extern int __libc_open64 (const char *file, int oflag, ...); extern int __libc_open (const char *file, int oflag, ...); extern int __libc_fcntl (int fd, int cmd, ...); extern int __open (__const char *__file, int __oflag, ...); -extern int __fcntl (int __fd, int __cmd, ...) __THROW; +extern int __fcntl (int __fd, int __cmd, ...); +extern int __fcntl_internal (int __fd, int __cmd, ...); + +#ifndef NOT_IN_libc +# define __fcntl(fd, cmd, args...) INTUSE(__fcntl) (fd, cmd, ##args) +#endif #endif diff --git a/include/math.h b/include/math.h index 8759c28..2a69430 100644 --- a/include/math.h +++ b/include/math.h @@ -5,4 +5,27 @@ /* Now define the internal interfaces. */ extern int __matherr (struct exception *__exc); +extern int __finite_internal (double __value) + __attribute__ ((__const__)) attribute_hidden; +extern int __finitef_internal (float __value) + __attribute__ ((__const__)) attribute_hidden; +extern int __finitel_internal (long double __value) + __attribute__ ((__const__)) attribute_hidden; + +#if !defined NOT_IN_libc || defined IS_IN_libm +# undef isfinite +# ifdef __NO_LONG_DOUBLE_MATH +# define isfinite(x) \ + (sizeof (x) == (sizeof (float) \ + ? INTUSE(__finitef) (x) : INTUSE(__finite) (x))) +# else +# define isfinite(x) \ + (sizeof (x) == sizeof (float) \ + ? INTUSE(__finitef) (x) \ + : sizeof (x) == sizeof (double) \ + ? INTUSE(__finite) (x) : INTUSE(__finitel) (x)) +# endif +#endif + + #endif diff --git a/include/mntent.h b/include/mntent.h index 7035630..421f1df 100644 --- a/include/mntent.h +++ b/include/mntent.h @@ -3,11 +3,25 @@ /* Now define the internal interfaces. */ extern FILE *__setmntent (__const char *__file, __const char *__mode); +extern FILE *__setmntent_internal (__const char *__file, __const char *__mode); extern struct mntent *__getmntent_r (FILE *__stream, struct mntent *__result, char *__buffer, int __bufsize); +extern struct mntent *__getmntent_r_internal (FILE *__stream, + struct mntent *__result, + char *__buffer, int __bufsize) + attribute_hidden; extern int __addmntent (FILE *__stream, __const struct mntent *__mnt); extern int __endmntent (FILE *__stream); +extern int __endmntent_internal (FILE *__stream) attribute_hidden; extern char *__hasmntopt (__const struct mntent *__mnt, __const char *__opt); + +#ifndef NOT_IN_libc +# define __setmntent(file, mode) INTUSE(__setmntent) (file, mode) +# define __endmntent(stream) INTUSE(__endmntent) (stream) +# define __getmntent_r(stream, result, buffer, bufsize) \ + INTUSE(__getmntent_r) (stream, result, buffer, bufsize) +#endif + #endif diff --git a/include/stdio.h b/include/stdio.h index a72d1d7..0eddd7d 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -77,6 +77,14 @@ extern wint_t __getwc_unlocked (FILE *__fp); extern __const char *__const _sys_errlist_internal[] attribute_hidden; extern int _sys_nerr_internal attribute_hidden; +extern int __asprintf_internal (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + attribute_hidden __attribute__ ((__format__ (__printf__, 2, 3))); +# ifndef NOT_IN_libc +# define __asprintf(ptr, fmt, args...) \ + INTUSE(__asprintf) (ptr, fmt, ##args) +# endif + # endif #endif diff --git a/include/stdio_ext.h b/include/stdio_ext.h index 09db6f2..31c7a4e 100644 --- a/include/stdio_ext.h +++ b/include/stdio_ext.h @@ -2,4 +2,10 @@ # include <stdio-common/stdio_ext.h> +extern int __fsetlocking_internal (FILE *__fp, int __type) attribute_hidden; + +#ifndef NOT_IN_libc +# define __fsetlocking(fp, type) INTUSE(__fsetlocking) (fp, type) +#endif + #endif diff --git a/include/stdlib.h b/include/stdlib.h index 110a78c..f4e6d30 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -60,6 +60,8 @@ extern void _quicksort (void *const pbase, size_t total_elems, extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg); extern int __cxa_atexit (void (*func) (void *), void *arg, void *d); +extern int __cxa_atexit_internal (void (*func) (void *), void *arg, void *d) + attribute_hidden; extern void __cxa_finalize (void *d); @@ -150,6 +152,8 @@ __strtoull_l (__const char * __restrict __nptr, char **__restrict __endptr, # ifndef NOT_IN_libc # undef MB_CUR_MAX # define MB_CUR_MAX (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX)) + +# define __cxa_atexit(func, arg, d) INTUSE(__cxa_atexit) (func, arg, d) # endif #endif diff --git a/include/sys/socket.h b/include/sys/socket.h index 4ae7108..c09eac4 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -27,6 +27,8 @@ extern ssize_t __send (int __fd, __const void *__buf, size_t __n, int __flags); and the only address from which to accept transmissions. Return 0 on success, -1 for errors. */ extern int __connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len); +extern int __connect_internal (int __fd, __CONST_SOCKADDR_ARG __addr, + socklen_t __len) attribute_hidden; /* Return the length of a `sockaddr' structure. */ #ifdef _HAVE_SA_LEN @@ -36,4 +38,9 @@ extern int __connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len); extern int __libc_sa_len (sa_family_t __af) __THROW; #endif + +#ifndef NOT_IN_libc +# define __connect(fd, addr, len) INTUSE(__connect) (fd, addr, len) +#endif + #endif diff --git a/include/unistd.h b/include/unistd.h index 5cd4360..f2d31a1 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -51,6 +51,7 @@ char *__canonicalize_directory_name_internal (__const char *__thisdir, extern int __dup (int __fd); extern int __dup2 (int __fd, int __fd2); +extern int __dup2_internal (int __fd, int __fd2) attribute_hidden; extern int __execve (__const char *__path, char *__const __argv[], char *__const __envp[]); extern long int __pathconf (__const char *__path, int __name); @@ -83,9 +84,11 @@ extern int __profil (unsigned short int *__sample_buffer, size_t __size, extern int __getdtablesize (void); extern int __brk (void *__addr); extern int __close (int __fd); +extern int __close_internal (int __fd) attribute_hidden; extern ssize_t __read (int __fd, void *__buf, size_t __nbytes); extern ssize_t __write (int __fd, __const void *__buf, size_t __n); extern __pid_t __fork (void); +extern __pid_t __fork_internal (void) attribute_hidden; extern int __getpagesize (void) __attribute__ ((__const__)); extern int __ftruncate (int __fd, __off_t __length); extern int __ftruncate64 (int __fd, __off64_t __length); @@ -108,4 +111,10 @@ extern int __libc_enable_secure_internal attribute_hidden; extern void __libc_check_standard_fds (void); +#ifndef NOT_IN_libc +# define __close(fd) INTUSE(__close) (fd) +# define __dup2(fd, fd2) INTUSE(__dup2) (fd, fd2) +# define __fork() INTUSE(__fork) () +#endif + #endif diff --git a/intl/dcngettext.c b/intl/dcngettext.c index 068d5fa..6d360a1 100644 --- a/intl/dcngettext.c +++ b/intl/dcngettext.c @@ -1,5 +1,5 @@ /* Implementation of the dcngettext(3) function. - Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000, 2001, 2002 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 @@ -57,5 +57,6 @@ DCNGETTEXT (domainname, msgid1, msgid2, n, category) #ifdef _LIBC /* Alias for function name in GNU C Library. */ +INTDEF(__dcngettext) weak_alias (__dcngettext, dcngettext); #endif diff --git a/intl/dngettext.c b/intl/dngettext.c index 14f06c3..2f24f9c 100644 --- a/intl/dngettext.c +++ b/intl/dngettext.c @@ -1,5 +1,5 @@ /* Implementation of the dngettext(3) function. - Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995-1997, 2000, 2001, 2002 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,7 +38,7 @@ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DNGETTEXT __dngettext -# define DCNGETTEXT __dcngettext +# define DCNGETTEXT INTUSE(__dcngettext) #else # define DNGETTEXT dngettext__ # define DCNGETTEXT dcngettext__ diff --git a/intl/l10nflist.c b/intl/l10nflist.c index bb59000..80d8ace 100644 --- a/intl/l10nflist.c +++ b/intl/l10nflist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. @@ -86,6 +86,10 @@ argz_count__ (argz, len) } # undef __argz_count # define __argz_count(argz, len) argz_count__ (argz, len) +#else +# ifdef _LIBC +# define __argz_count(argz, len) INTUSE(__argz_count) (argz, len) +# endif #endif /* !_LIBC && !HAVE___ARGZ_COUNT */ #if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY @@ -110,6 +114,11 @@ argz_stringify__ (argz, len, sep) } # undef __argz_stringify # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) +#else +# ifdef _LIBC +# define __argz_stringify(argz, len, sep) \ + INTUSE(__argz_stringify) (argz, len, sep) +# endif #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ #if !defined _LIBC && !defined HAVE___ARGZ_NEXT diff --git a/intl/ngettext.c b/intl/ngettext.c index b58c564..7843d75 100644 --- a/intl/ngettext.c +++ b/intl/ngettext.c @@ -1,5 +1,5 @@ /* Implementation of ngettext(3) function. - Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 2000, 2001, 2002 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 @@ -45,7 +45,7 @@ prefix. So we have to make a difference here. */ #ifdef _LIBC # define NGETTEXT __ngettext -# define DCNGETTEXT __dcngettext +# define DCNGETTEXT INTUSE(__dcngettext) #else # define NGETTEXT ngettext__ # define DCNGETTEXT dcngettext__ diff --git a/libio/__fbufsize.c b/libio/__fbufsize.c index 67cf143..cd300f9 100644 --- a/libio/__fbufsize.c +++ b/libio/__fbufsize.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -14,16 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. - - As a special exception, if you link the code in this file with - files compiled with a GNU compiler to produce an executable, - that does not cause the resulting executable to be covered by - the GNU Lesser General Public License. This exception does not - however invalidate any other reasons why the executable file - might be covered by the GNU Lesser General Public License. - This exception applies to code released by its copyright holders - in files containing the exception. */ + 02111-1307 USA. */ #include <stdio_ext.h> diff --git a/libio/__flbf.c b/libio/__flbf.c index 9146bbb..70c6806 100644 --- a/libio/__flbf.c +++ b/libio/__flbf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -14,16 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. - - As a special exception, if you link the code in this file with - files compiled with a GNU compiler to produce an executable, - that does not cause the resulting executable to be covered by - the GNU Lesser General Public License. This exception does not - however invalidate any other reasons why the executable file - might be covered by the GNU Lesser General Public License. - This exception applies to code released by its copyright holders - in files containing the exception. */ + 02111-1307 USA. */ #include <stdio_ext.h> diff --git a/libio/__fpending.c b/libio/__fpending.c index 649b46d..c9be0f8 100644 --- a/libio/__fpending.c +++ b/libio/__fpending.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -14,16 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. - - As a special exception, if you link the code in this file with - files compiled with a GNU compiler to produce an executable, - that does not cause the resulting executable to be covered by - the GNU Lesser General Public License. This exception does not - however invalidate any other reasons why the executable file - might be covered by the GNU Lesser General Public License. - This exception applies to code released by its copyright holders - in files containing the exception. */ + 02111-1307 USA. */ #include <stdio_ext.h> diff --git a/libio/__fpurge.c b/libio/__fpurge.c index 50ba281..c02d8e9 100644 --- a/libio/__fpurge.c +++ b/libio/__fpurge.c @@ -14,16 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. - - As a special exception, if you link the code in this file with - files compiled with a GNU compiler to produce an executable, - that does not cause the resulting executable to be covered by - the GNU Lesser General Public License. This exception does not - however invalidate any other reasons why the executable file - might be covered by the GNU Lesser General Public License. - This exception applies to code released by its copyright holders - in files containing the exception. */ + 02111-1307 USA. */ #include <stdio_ext.h> #include "libioP.h" diff --git a/libio/__freadable.c b/libio/__freadable.c index 6ab6f27..ff14250 100644 --- a/libio/__freadable.c +++ b/libio/__freadable.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -14,16 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. - - As a special exception, if you link the code in this file with - files compiled with a GNU compiler to produce an executable, - that does not cause the resulting executable to be covered by - the GNU Lesser General Public License. This exception does not - however invalidate any other reasons why the executable file - might be covered by the GNU Lesser General Public License. - This exception applies to code released by its copyright holders - in files containing the exception. */ + 02111-1307 USA. */ #include <stdio_ext.h> diff --git a/libio/__freading.c b/libio/__freading.c index 51e5ee5..37200bb 100644 --- a/libio/__freading.c +++ b/libio/__freading.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -14,16 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. - - As a special exception, if you link the code in this file with - files compiled with a GNU compiler to produce an executable, - that does not cause the resulting executable to be covered by - the GNU Lesser General Public License. This exception does not - however invalidate any other reasons why the executable file - might be covered by the GNU Lesser General Public License. - This exception applies to code released by its copyright holders - in files containing the exception. */ + 02111-1307 USA. */ #include <stdio_ext.h> diff --git a/libio/__fsetlocking.c b/libio/__fsetlocking.c index b56128f..0542e08 100644 --- a/libio/__fsetlocking.c +++ b/libio/__fsetlocking.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -14,19 +14,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. - - As a special exception, if you link the code in this file with - files compiled with a GNU compiler to produce an executable, - that does not cause the resulting executable to be covered by - the GNU Lesser General Public License. This exception does not - however invalidate any other reasons why the executable file - might be covered by the GNU Lesser General Public License. - This exception applies to code released by its copyright holders - in files containing the exception. */ + 02111-1307 USA. */ #include <stdio_ext.h> +#undef __fsetlocking + int __fsetlocking (FILE *fp, int type) { @@ -42,3 +35,4 @@ __fsetlocking (FILE *fp, int type) return result; } +INTDEF(__fsetlocking) diff --git a/libio/__fwritable.c b/libio/__fwritable.c index 6885cc2..60ceeb5 100644 --- a/libio/__fwritable.c +++ b/libio/__fwritable.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -14,16 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. - - As a special exception, if you link the code in this file with - files compiled with a GNU compiler to produce an executable, - that does not cause the resulting executable to be covered by - the GNU Lesser General Public License. This exception does not - however invalidate any other reasons why the executable file - might be covered by the GNU Lesser General Public License. - This exception applies to code released by its copyright holders - in files containing the exception. */ + 02111-1307 USA. */ #include <stdio_ext.h> diff --git a/libio/__fwriting.c b/libio/__fwriting.c index f2ba6b9..c62884a 100644 --- a/libio/__fwriting.c +++ b/libio/__fwriting.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -14,16 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. - - As a special exception, if you link the code in this file with - files compiled with a GNU compiler to produce an executable, - that does not cause the resulting executable to be covered by - the GNU Lesser General Public License. This exception does not - however invalidate any other reasons why the executable file - might be covered by the GNU Lesser General Public License. - This exception applies to code released by its copyright holders - in files containing the exception. */ + 02111-1307 USA. */ #include <stdio_ext.h> diff --git a/libio/iofdopen.c b/libio/iofdopen.c index 1c76ba7..5167220 100644 --- a/libio/iofdopen.c +++ b/libio/iofdopen.c @@ -37,7 +37,7 @@ #ifndef _IO_fcntl #ifdef _LIBC -#define _IO_fcntl __fcntl +#define _IO_fcntl INTUSE(__fcntl) #else #define _IO_fcntl fcntl #endif diff --git a/libio/libioP.h b/libio/libioP.h index 1679e1f..553cfc9 100644 --- a/libio/libioP.h +++ b/libio/libioP.h @@ -97,17 +97,17 @@ extern "C" { #define _IO_WIDE_JUMPS_FUNC(THIS) _IO_WIDE_JUMPS(THIS) #ifdef _G_USING_THUNKS # define JUMP_FIELD(TYPE, NAME) TYPE NAME -# define JUMP0(FUNC, THIS) _IO_JUMPS_FUNC(THIS)->FUNC (THIS) -# define JUMP1(FUNC, THIS, X1) _IO_JUMPS_FUNC(THIS)->FUNC (THIS, X1) -# define JUMP2(FUNC, THIS, X1, X2) _IO_JUMPS_FUNC(THIS)->FUNC (THIS, X1, X2) -# define JUMP3(FUNC, THIS, X1,X2,X3) _IO_JUMPS_FUNC(THIS)->FUNC (THIS, X1,X2, X3) +# define JUMP0(FUNC, THIS) (_IO_JUMPS_FUNC(THIS)->FUNC) (THIS) +# define JUMP1(FUNC, THIS, X1) (_IO_JUMPS_FUNC(THIS)->FUNC) (THIS, X1) +# define JUMP2(FUNC, THIS, X1, X2) (_IO_JUMPS_FUNC(THIS)->FUNC) (THIS, X1, X2) +# define JUMP3(FUNC, THIS, X1,X2,X3) (_IO_JUMPS_FUNC(THIS)->FUNC) (THIS, X1,X2, X3) # define JUMP_INIT(NAME, VALUE) VALUE # define JUMP_INIT_DUMMY JUMP_INIT(dummy, 0), JUMP_INIT (dummy2, 0) -# define WJUMP0(FUNC, THIS) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC (THIS) -# define WJUMP1(FUNC, THIS, X1) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC (THIS, X1) -# define WJUMP2(FUNC, THIS, X1, X2) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC (THIS, X1, X2) -# define WJUMP3(FUNC, THIS, X1,X2,X3) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC (THIS, X1,X2, X3) +# define WJUMP0(FUNC, THIS) (_IO_WIDE_JUMPS_FUNC(THIS)->FUNC) (THIS) +# define WJUMP1(FUNC, THIS, X1) (_IO_WIDE_JUMPS_FUNC(THIS)->FUNC) (THIS, X1) +# define WJUMP2(FUNC, THIS, X1, X2) (_IO_WIDE_JUMPS_FUNC(THIS)->FUNC) (THIS, X1, X2) +# define WJUMP3(FUNC, THIS, X1,X2,X3) (_IO_WIDE_JUMPS_FUNC(THIS)->FUNC) (THIS, X1,X2, X3) #else /* These macros will change when we re-implement vtables to use "thunks"! */ # define JUMP_FIELD(TYPE, NAME) struct { short delta1, delta2; TYPE pfn; } NAME diff --git a/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h b/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h index 0a7c837..63de09a 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h +++ b/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. + Copyright (C) 1993,94,95,96,97,98,2000,2002 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 @@ -75,3 +75,6 @@ /* Maximum number of POSIX timers available. */ #define TIMER_MAX 256 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 diff --git a/misc/mntent_r.c b/misc/mntent_r.c index 1a87105..7a39418 100644 --- a/misc/mntent_r.c +++ b/misc/mntent_r.c @@ -1,5 +1,5 @@ /* Utilities for reading/writing fstab, mtab, etc. - Copyright (C) 1995-2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995-2000, 2001, 2002 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 @@ -29,6 +29,10 @@ # define funlockfile(s) _IO_funlockfile (s) #endif +#undef __setmntent +#undef __endmntent +#undef __getmntent_r + /* Prepare to begin reading and/or writing mount table entries from the beginning of FILE. MODE is as for `fopen'. */ FILE * @@ -42,6 +46,7 @@ __setmntent (const char *file, const char *mode) return result; } +INTDEF(__setmntent) weak_alias (__setmntent, setmntent) @@ -53,6 +58,7 @@ __endmntent (FILE *stream) fclose (stream); return 1; /* SunOS 4.x says to always return 1 */ } +INTDEF(__endmntent) weak_alias (__endmntent, endmntent) @@ -157,6 +163,7 @@ __getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz) return mp; } +INTDEF(__getmntent_r) weak_alias (__getmntent_r, getmntent_r) diff --git a/stdio-common/asprintf.c b/stdio-common/asprintf.c index 37b8879..3b211d6 100644 --- a/stdio-common/asprintf.c +++ b/stdio-common/asprintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995, 1997, 1998, 2002 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 @@ -23,6 +23,7 @@ # include <libio/libioP.h> # define vasprintf(s, f, a) _IO_vasprintf (s, f, a) #endif +#undef __asprintf /* Write formatted output from FORMAT to a string which is allocated with malloc and stored in *STRING_PTR. */ @@ -39,4 +40,5 @@ __asprintf (char **string_ptr, const char *format, ...) return done; } +INTDEF(__asprintf) weak_alias (__asprintf, asprintf) diff --git a/stdlib/cxa_atexit.c b/stdlib/cxa_atexit.c index 78acbbd..a3d4c50 100644 --- a/stdlib/cxa_atexit.c +++ b/stdlib/cxa_atexit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2002 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 @@ -20,6 +20,8 @@ #include <stdlib.h> #include "exit.h" +#undef __cxa_atexit + /* Register a function to be called by exit or when a shared library is unloaded. This function is only called from code generated by the C++ compiler. */ @@ -37,6 +39,7 @@ __cxa_atexit (void (*func) (void *), void *arg, void *d) new->func.cxa.dso_handle = d; return 0; } +INTDEF(__cxa_atexit) /* We change global data, so we need locking. */ diff --git a/string/argz-count.c b/string/argz-count.c index 58c797b..39282e8 100644 --- a/string/argz-count.c +++ b/string/argz-count.c @@ -1,5 +1,5 @@ /* Routines for dealing with '\0' separated arg vectors. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -35,4 +35,5 @@ __argz_count (const char *argz, size_t len) } return count; } +INTDEF(__argz_count) weak_alias (__argz_count, argz_count) diff --git a/string/argz-stringify.c b/string/argz-stringify.c index 9e1c0c7..46af889 100644 --- a/string/argz-stringify.c +++ b/string/argz-stringify.c @@ -1,5 +1,5 @@ /* Routines for dealing with '\0' separated arg vectors. - Copyright (C) 1995,96,97,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1995,96,97,2000,2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.org> @@ -37,4 +37,5 @@ __argz_stringify (char *argz, size_t len, int sep) *argz++ = sep; } } +INTDEF(__argz_stringify) weak_alias (__argz_stringify, argz_stringify) diff --git a/sysdeps/generic/fcntl.c b/sysdeps/generic/fcntl.c index 6bc216c..aff3e84 100644 --- a/sysdeps/generic/fcntl.c +++ b/sysdeps/generic/fcntl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995, 1996, 1997, 2002 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,6 +19,8 @@ #include <errno.h> #include <fcntl.h> +#undef __fcntl + /* Perform file control operations on FD. */ int __fcntl (fd, cmd) diff --git a/sysdeps/generic/s_ldexp.c b/sysdeps/generic/s_ldexp.c index 12c336f..20c444f 100644 --- a/sysdeps/generic/s_ldexp.c +++ b/sysdeps/generic/s_ldexp.c @@ -25,9 +25,9 @@ static char rcsid[] = "$NetBSD: s_ldexp.c,v 1.6 1995/05/10 20:47:40 jtc Exp $"; double value; int exp; #endif { - if(!__finite(value)||value==0.0) return value; + if(!INTUSE(__finite)(value)||value==0.0) return value; value = __scalbn(value,exp); - if(!__finite(value)||value==0.0) __set_errno (ERANGE); + if(!INTUSE(__finite)(value)||value==0.0) __set_errno (ERANGE); return value; } weak_alias (__ldexp, ldexp) diff --git a/sysdeps/generic/s_ldexpf.c b/sysdeps/generic/s_ldexpf.c index 1ecbe83..07f0c9e 100644 --- a/sysdeps/generic/s_ldexpf.c +++ b/sysdeps/generic/s_ldexpf.c @@ -28,9 +28,10 @@ static char rcsid[] = "$NetBSD: s_ldexpf.c,v 1.3 1995/05/10 20:47:42 jtc Exp $"; float value; int exp; #endif { - if(!__finitef(value)||value==(float)0.0) return value; + if(!INTUSE(__finitef)(value)||value==(float)0.0) return value; value = __scalbnf(value,exp); - if(!__finitef(value)||value==(float)0.0) __set_errno (ERANGE); + if(!INTUSE(__finitef)(value)||value==(float)0.0) __set_errno (ERANGE); return value; } +INTDEF(__ldexpf) weak_alias (__ldexpf, ldexpf) diff --git a/sysdeps/generic/s_ldexpl.c b/sysdeps/generic/s_ldexpl.c index 123a6b3..a560398 100644 --- a/sysdeps/generic/s_ldexpl.c +++ b/sysdeps/generic/s_ldexpl.c @@ -29,9 +29,9 @@ static char rcsid[] = "$NetBSD: $"; long double value; int exp; #endif { - if(!__finitel(value)||value==0.0) return value; + if(!INTUSE(__finitel)(value)||value==0.0) return value; value = __scalbnl(value,exp); - if(!__finitel(value)||value==0.0) __set_errno (ERANGE); + if(!INTUSE(__finitel)(value)||value==0.0) __set_errno (ERANGE); return value; } weak_alias (__ldexpl, ldexpl) diff --git a/sysdeps/i386/fpu/s_finite.S b/sysdeps/i386/fpu/s_finite.S index 63c766a..52359ac 100644 --- a/sysdeps/i386/fpu/s_finite.S +++ b/sysdeps/i386/fpu/s_finite.S @@ -12,4 +12,5 @@ ENTRY(__finite) shrl $31, %eax ret END (__finite) +strong_alias(__finite, __finite_internal) weak_alias (__finite, finite) diff --git a/sysdeps/i386/fpu/s_finitef.S b/sysdeps/i386/fpu/s_finitef.S index dabb71a..98c6c59 100644 --- a/sysdeps/i386/fpu/s_finitef.S +++ b/sysdeps/i386/fpu/s_finitef.S @@ -12,4 +12,5 @@ ENTRY(__finitef) shrl $31,%eax ret END (__finitef) +strong_alias(__finitef, __finitef_internal) weak_alias (__finitef, finitef) diff --git a/sysdeps/i386/fpu/s_finitel.S b/sysdeps/i386/fpu/s_finitel.S index acc5ad4..b473443 100644 --- a/sysdeps/i386/fpu/s_finitel.S +++ b/sysdeps/i386/fpu/s_finitel.S @@ -11,4 +11,5 @@ ENTRY(__finitel) shrl $31, %eax ret END (__finitel) +strong_alias(__finitel, __finitel_internal) weak_alias (__finitel, finitel) diff --git a/sysdeps/ieee754/dbl-64/s_finite.c b/sysdeps/ieee754/dbl-64/s_finite.c index b12ff42..2317f4a 100644 --- a/sysdeps/ieee754/dbl-64/s_finite.c +++ b/sysdeps/ieee754/dbl-64/s_finite.c @@ -22,6 +22,8 @@ static char rcsid[] = "$NetBSD: s_finite.c,v 1.8 1995/05/10 20:47:17 jtc Exp $"; #include "math.h" #include "math_private.h" +#undef __finite + #ifdef __STDC__ int __finite(double x) #else @@ -33,6 +35,7 @@ static char rcsid[] = "$NetBSD: s_finite.c,v 1.8 1995/05/10 20:47:17 jtc Exp $"; GET_HIGH_WORD(hx,x); return (int)((u_int32_t)((hx&0x7fffffff)-0x7ff00000)>>31); } +INTDEF(__finite) weak_alias (__finite, finite) #ifdef NO_LONG_DOUBLE strong_alias (__finite, __finitel) diff --git a/sysdeps/ieee754/flt-32/s_finitef.c b/sysdeps/ieee754/flt-32/s_finitef.c index baafc31..74019c7 100644 --- a/sysdeps/ieee754/flt-32/s_finitef.c +++ b/sysdeps/ieee754/flt-32/s_finitef.c @@ -8,7 +8,7 @@ * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice + * software is freely granted, provided that this notice * is preserved. * ==================================================== */ @@ -25,6 +25,8 @@ static char rcsid[] = "$NetBSD: s_finitef.c,v 1.4 1995/05/10 20:47:18 jtc Exp $" #include "math.h" #include "math_private.h" +#undef __finitef + #ifdef __STDC__ int __finitef(float x) #else @@ -36,4 +38,5 @@ static char rcsid[] = "$NetBSD: s_finitef.c,v 1.4 1995/05/10 20:47:18 jtc Exp $" GET_FLOAT_WORD(ix,x); return (int)((u_int32_t)((ix&0x7fffffff)-0x7f800000)>>31); } +INTDEF(__finitef) weak_alias (__finitef, finitef) diff --git a/sysdeps/ieee754/ldbl-128/s_finitel.c b/sysdeps/ieee754/ldbl-128/s_finitel.c index dd176c1..a2372dc 100644 --- a/sysdeps/ieee754/ldbl-128/s_finitel.c +++ b/sysdeps/ieee754/ldbl-128/s_finitel.c @@ -25,6 +25,8 @@ static char rcsid[] = "$NetBSD: $"; #include "math.h" #include "math_private.h" +#undef __finitel + #ifdef __STDC__ int __finitel(long double x) #else @@ -37,4 +39,5 @@ static char rcsid[] = "$NetBSD: $"; return (int)((u_int64_t)((hx&0x7fffffffffffffffLL) -0x7fff000000000000LL)>>63); } +INTDEF(__finitel) weak_alias (__finitel, finitel) diff --git a/sysdeps/ieee754/ldbl-96/s_finitel.c b/sysdeps/ieee754/ldbl-96/s_finitel.c index 6e444e9..3bbb21a 100644 --- a/sysdeps/ieee754/ldbl-96/s_finitel.c +++ b/sysdeps/ieee754/ldbl-96/s_finitel.c @@ -26,6 +26,8 @@ static char rcsid[] = "$NetBSD: $"; #include "math.h" #include "math_private.h" +#undef __finitel + #ifdef __STDC__ int __finitel(long double x) #else @@ -37,4 +39,5 @@ static char rcsid[] = "$NetBSD: $"; GET_LDOUBLE_EXP(exp,x); return (int)((u_int32_t)((exp&0x7fff)-0x7fff)>>31); } +INTDEF(__finitel) weak_alias (__finitel, finitel) diff --git a/sysdeps/mach/hurd/chown.c b/sysdeps/mach/hurd/chown.c index 5c0d8a0..cab26fc 100644 --- a/sysdeps/mach/hurd/chown.c +++ b/sysdeps/mach/hurd/chown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1994,1995,1997,2002 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 @@ -39,4 +39,5 @@ __chown (file, owner, group) return 0; } +INTDEF(__chown) weak_alias (__chown, chown) diff --git a/sysdeps/mach/hurd/connect.c b/sysdeps/mach/hurd/connect.c index 178e335..30883f6 100644 --- a/sysdeps/mach/hurd/connect.c +++ b/sysdeps/mach/hurd/connect.c @@ -24,6 +24,8 @@ #include <sys/un.h> #include <hurd/ifsock.h> +#undef __connect + /* Open a connection on socket FD to peer at ADDR (which LEN bytes long). For connectionless socket types, just set the default address to send to and the only address from which to accept transmissions. @@ -72,4 +74,5 @@ __connect (int fd, __CONST_SOCKADDR_ARG addrarg, socklen_t len) return err ? __hurd_dfail (fd, err) : 0; } +INTDEF(__connect) weak_alias (__connect, connect) diff --git a/sysdeps/mach/hurd/dup2.c b/sysdeps/mach/hurd/dup2.c index 6038e87..64d69d9 100644 --- a/sysdeps/mach/hurd/dup2.c +++ b/sysdeps/mach/hurd/dup2.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 93, 94, 95, 97, 2002 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 @@ -22,6 +22,8 @@ #include <hurd.h> #include <hurd/fd.h> +#undef __dup2 + /* Duplicate FD to FD2, closing the old FD2 and making FD2 be open on the same file as FD is. Return FD2 or -1. */ @@ -132,4 +134,5 @@ __dup2 (fd, fd2) return fd2; } +INTDEF(__dup2) weak_alias (__dup2, dup2) diff --git a/sysdeps/mach/hurd/fcntl.c b/sysdeps/mach/hurd/fcntl.c index 3b4a037..9c03b3c 100644 --- a/sysdeps/mach/hurd/fcntl.c +++ b/sysdeps/mach/hurd/fcntl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,93,94,95,96,97,99,2000 Free Software Foundation, Inc. +/* Copyright (C) 1992-1997,1999,2000,2002 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 @@ -23,6 +23,8 @@ #include <stdarg.h> #include <sys/file.h> /* XXX for LOCK_* */ +#undef __fcntl + /* Perform file control operations on FD. */ int diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c index 635110a..b730b34 100644 --- a/sysdeps/mach/hurd/fork.c +++ b/sysdeps/mach/hurd/fork.c @@ -27,6 +27,8 @@ #include <assert.h> #include "hurdmalloc.h" /* XXX */ +#undef __fork + /* Things that want to be locked while forking. */ symbol_set_declare (_hurd_fork_locks) @@ -675,4 +677,5 @@ __fork (void) return err ? __hurd_fail (err) : pid; } +INTDEF(__fork) weak_alias (__fork, fork) diff --git a/sysdeps/posix/dup2.c b/sysdeps/posix/dup2.c index 49a8e57..bc8d422 100644 --- a/sysdeps/posix/dup2.c +++ b/sysdeps/posix/dup2.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 93, 95, 96, 97, 2002 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 @@ -21,6 +21,8 @@ #include <limits.h> #include <unistd.h> +#undef __dup2 + /* Duplicate FD to FD2, closing the old FD2 and making FD2 be open the same file as FD is. Return FD2 or -1. */ @@ -57,4 +59,5 @@ __dup2 (fd, fd2) return fcntl (fd, F_DUPFD, fd2); } +INTDEF(__dup2) weak_alias (__dup2, dup2) diff --git a/sysdeps/unix/grantpt.c b/sysdeps/unix/grantpt.c index dad7d16..f24932b 100644 --- a/sysdeps/unix/grantpt.c +++ b/sysdeps/unix/grantpt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Zack Weinberg <zack@rabi.phys.columbia.edu>, 1998. @@ -116,7 +116,7 @@ grantpt (int fd) uid = __getuid (); if (st.st_uid != uid) { - if (__chown (buf, uid, st.st_gid) < 0) + if (INTUSE(__chown) (buf, uid, st.st_gid) < 0) goto helper; } @@ -132,7 +132,7 @@ grantpt (int fd) /* Make sure the group of the device is that special group. */ if (st.st_gid != gid) { - if (__chown (buf, uid, gid) < 0) + if (INTUSE(__chown) (buf, uid, gid) < 0) goto helper; } diff --git a/sysdeps/unix/syscalls.list b/sysdeps/unix/syscalls.list index 3c60597..f13cfd4 100644 --- a/sysdeps/unix/syscalls.list +++ b/sysdeps/unix/syscalls.list @@ -6,9 +6,9 @@ chdir - chdir i:s __chdir chdir chmod - chmod i:si __chmod chmod chown - chown i:sii __chown chown chroot - chroot i:s chroot -close - close i:i __libc_close __close close +close - close i:i __libc_close __close close __close_internal dup - dup i:i __dup dup -dup2 - dup2 i:ii __dup2 dup2 +dup2 - dup2 i:ii __dup2 dup2 __dup2_internal fchdir - fchdir i:i __fchdir fchdir fcntl - fcntl i:iiF __libc_fcntl __fcntl fcntl fstatfs - fstatfs i:ip __fstatfs fstatfs diff --git a/sysdeps/unix/sysv/aix/chown.c b/sysdeps/unix/sysv/aix/chown.c index 568c26a..037b14b 100644 --- a/sysdeps/unix/sysv/aix/chown.c +++ b/sysdeps/unix/sysv/aix/chown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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,8 +18,11 @@ #include <unistd.h> +#undef __chown + int __chown (const char *file, uid_t owner, gid_t group) { return chown (file, owner, group); } +INTDEF(__chown) diff --git a/sysdeps/unix/sysv/aix/connect.c b/sysdeps/unix/sysv/aix/connect.c index 7fb636d..2f58be1 100644 --- a/sysdeps/unix/sysv/aix/connect.c +++ b/sysdeps/unix/sysv/aix/connect.c @@ -1,8 +1,11 @@ /* This is a system call. We only have to provide the wrapper. */ #include <sys/socket.h> +#undef __connect + int __connect (int fd, __CONST_SOCKADDR_ARG addr, socklen_t len) { return connect (fd, addr, len); } +INTDEF(__connect) diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c index 8c5ba15..43f21b6 100644 --- a/sysdeps/unix/sysv/aix/fcntl.c +++ b/sysdeps/unix/sysv/aix/fcntl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2002 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,6 +19,8 @@ #include <fcntl.h> #include <stdarg.h> +#undef __fcntl + extern int kfcntl (int fdes, int cmd, unsigned long int arg); int diff --git a/sysdeps/unix/sysv/aix/fork.c b/sysdeps/unix/sysv/aix/fork.c index f31f342..085342b 100644 --- a/sysdeps/unix/sysv/aix/fork.c +++ b/sysdeps/unix/sysv/aix/fork.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 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,10 +18,12 @@ #include <unistd.h> +#undef __fork pid_t __fork (void) { return kfork (); } +INTDEF(__fork) strong_alias (__fork, fork) diff --git a/sysdeps/unix/sysv/linux/connect.S b/sysdeps/unix/sysv/linux/connect.S index d1dd69a..2de3518 100644 --- a/sysdeps/unix/sysv/linux/connect.S +++ b/sysdeps/unix/sysv/linux/connect.S @@ -2,4 +2,5 @@ #define __socket __libc_connect #define NARGS 3 #include <socket.S> +strong_alias (__libc_connect, __connect_internal) weak_alias (__libc_connect, __connect) diff --git a/sysdeps/unix/sysv/linux/i386/chown.c b/sysdeps/unix/sysv/linux/i386/chown.c index 025e58d..a54f2b5 100644 --- a/sysdeps/unix/sysv/linux/i386/chown.c +++ b/sysdeps/unix/sysv/linux/i386/chown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2002 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 @@ -154,10 +154,12 @@ compat_symbol (libc, _chown_is_lchown, chown, GLIBC_2_0); #endif #ifdef __NR_lchown +INTDEF2(__real_chown, __chown) strong_alias (__real_chown, _real_chown) versioned_symbol (libc, __real_chown, __chown, GLIBC_2_1); versioned_symbol (libc, _real_chown, chown, GLIBC_2_1); #else +INTDEF2(__chown_is_lchown, __chown) strong_alias (__chown_is_lchown, __chown_is_lchown21) strong_alias (__chown_is_lchown, _chown_is_lchown21) versioned_symbol (libc, __chown_is_lchown21, __chown, GLIBC_2_1); diff --git a/sysdeps/unix/sysv/linux/i386/fcntl.c b/sysdeps/unix/sysv/linux/i386/fcntl.c index 6e4d591..3c013cc 100644 --- a/sysdeps/unix/sysv/linux/i386/fcntl.c +++ b/sysdeps/unix/sysv/linux/i386/fcntl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -25,6 +25,8 @@ #include <sys/syscall.h> #include "../kernel-features.h" +#undef __fcntl + extern int __syscall_fcntl (int __fd, int __cmd, ...); #ifdef __NR_fcntl64 extern int __syscall_fcntl64 (int __fd, int __cmd, ...); @@ -130,6 +132,7 @@ __libc_fcntl (int fd, int cmd, ...) return -1; #endif /* __ASSUME_FCNTL64 */ } +INTDEF2(__libc_fcntl, __fcntl); weak_alias (__libc_fcntl, __fcntl) weak_alias (__libc_fcntl, fcntl) diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c index 50e11c1..f8f4b5c 100644 --- a/sysdeps/unix/sysv/linux/m68k/chown.c +++ b/sysdeps/unix/sysv/linux/m68k/chown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2002 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 @@ -71,4 +71,5 @@ __chown (const char *file, uid_t owner, gid_t group) return INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group); #endif } +INTDEF(__chown) weak_alias (__chown, chown) diff --git a/sysdeps/unix/sysv/linux/powerpc/chown.c b/sysdeps/unix/sysv/linux/powerpc/chown.c index a446277..23eaefa 100644 --- a/sysdeps/unix/sysv/linux/powerpc/chown.c +++ b/sysdeps/unix/sysv/linux/powerpc/chown.c @@ -1,5 +1,5 @@ /* chown() compatibility. - Copyright (C) 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 2000, 2002 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 @@ __chown (const char *file, uid_t owner, gid_t group) int loopct; int filelen; static int libc_old_chown = 0 /* -1=old linux, 1=new linux, 0=unknown */; - + if (libc_old_chown == 1) return __syscall_chown (file, owner, group); @@ -62,7 +62,7 @@ __chown (const char *file, uid_t owner, gid_t group) libc_old_chown = -1; } #endif - + err = __readlink (file, link, PATH_MAX+1); if (err == -1) { @@ -83,7 +83,7 @@ __chown (const char *file, uid_t owner, gid_t group) for (loopct = 0; loopct < 128; loopct++) { int linklen; - + if (err >= PATH_MAX+1) { errno = ENAMETOOLONG; @@ -93,13 +93,13 @@ __chown (const char *file, uid_t owner, gid_t group) link[err] = 0; /* Null-terminate string, just-in-case. */ linklen = strlen (link) + 1; - + if (link[0] == '/') memcpy (path, link, linklen); else { filelen = strlen (path); - + while (filelen > 1 && path[filelen-1] == '/') filelen--; while (filelen > 0 && path[filelen-1] != '/') @@ -113,9 +113,9 @@ __chown (const char *file, uid_t owner, gid_t group) } err = __readlink(path, link, PATH_MAX+1); - + if (err == -1) - { + { errno = old_errno; return __lchown(path, owner, group); } @@ -123,6 +123,7 @@ __chown (const char *file, uid_t owner, gid_t group) errno = ELOOP; return -1; } +INTDEF(__chown) #include <shlib-compat.h> versioned_symbol (libc, __chown, chown, GLIBC_2_1); diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/chown.c b/sysdeps/unix/sysv/linux/s390/s390-32/chown.c index 1ccf578..64d7285 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/chown.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/chown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2002 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 @@ -109,10 +109,12 @@ strong_alias (__chown_is_lchown, _chown_is_lchown) compat_symbol (libc, __chown_is_lchown, __chown, GLIBC_2_0); compat_symbol (libc, _chown_is_lchown, chown, GLIBC_2_0); +INTDEF2(__real_chown, __chown) strong_alias (__real_chown, _real_chown) versioned_symbol (libc, __real_chown, __chown, GLIBC_2_1); versioned_symbol (libc, _real_chown, chown, GLIBC_2_1); #else +INTDEF2(__real_chown, __chown) strong_alias (__real_chown, __chown) weak_alias (__real_chown, chown) #endif diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 7ca6e48..e443ca6 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -8,7 +8,7 @@ create_module EXTRA create_module 3 create_module delete_module EXTRA delete_module 3 delete_module fdatasync - fdatasync i:i fdatasync flock - flock i:ii __flock flock -fork - fork i: __libc_fork __fork fork +fork - fork i: __libc_fork __fork fork __fork_internal get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms getegid - getegid i: __getegid getegid geteuid - geteuid i: __geteuid geteuid |