aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-03 07:02:10 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-03 07:02:10 +0000
commit37ba7d66637bd9c82cb00663b26f2839d4a54ec7 (patch)
tree06902ca12c5edf81b7d3cdb500a63041a97894b0 /include
parent6719f7a68f3e5a62103e64a4fe36a043f675a7d5 (diff)
downloadglibc-37ba7d66637bd9c82cb00663b26f2839d4a54ec7.tar
glibc-37ba7d66637bd9c82cb00663b26f2839d4a54ec7.tar.gz
glibc-37ba7d66637bd9c82cb00663b26f2839d4a54ec7.tar.bz2
glibc-37ba7d66637bd9c82cb00663b26f2839d4a54ec7.zip
Update.
2002-08-02 Ulrich Drepper <drepper@redhat.com> * configure.in (HAVE_BROKEN_ALIAS_ATTRIBUTE): Add check for broken alias attribute handling. * config.h.in (HAVE_BROKEN_ALIAS_ATTRIBUTE): Add. * assert/assert.c (__assert_fail): Fix typo in comment. * include/rpc/rpc.h: Declare __libc_tsd_RPC_VARS if USE_TLS && HAVE___THREAD. * sunrpc/rpc_thread.c: Don't define __libc_tsd_RPC_VARS as static if USE_TLS && HAVE___THREAD. * sunrpc/Versions [libc] (GLIBC_PRIVATE): Export __libc_tsd_RPC_VARS. 2002-08-02 Jakub Jelinek <jakub@redhat.com> * assert/assert.c (__assert_fail): Remove undef. Replace INTDEF with libc_hidden_def. * assert/__assert.c (__assert): Remove INTUSE. * elf/dl-minimal.c (__assert_fail): Replace INTDEF with libc_hidden_weak. * include/libc-symbols.h (hidden_proto, hidden_def, hidden_weak, hidden_ver, libc_hidden_proto, libc_hidden_def, libc_hidden_weak, libc_hidden_ver, rtld_hidden_proto, rtld_hidden_def, rtld_hidden_weak, rltd_hidden_ver, libm_hidden_proto, libm_hidden_def, libm_hidden_weak, libm_hiden_ver): Define. * include/assert.h (__assert_fail_internal): Remove. (__assert_fail): Add prototype. Add hidden_proto. * include/libc-internal.h (__libc_freeres, __profile_frequency): Add libc_hidden_proto. * include/wchar.h (__mbrtowc_internal, __mbrlen_internal): Remove. (__mbrtowc, __mbrlen): Use libc_hidden_proto. Remove macros. * include/string.h (__mempcpy, __stpncpy, __rawmemchr, __strcasecmp): Add libc_hidden_proto. * include/fcntl.h (__open64, __libc_open, __libc_fcntl, __open, __fcntl): Add libc_hidden_proto. Remove macros. (__open_internal, __fcntl_internal): Remove. * libio/iofdopen.c (_IO_fcntl): Remove INTUSE from __fcntl. * malloc/set-freeres.c (__libc_freeres): Add libc_hidden_def. * nss/nsswitch.h (__nss_database_lookup, __nss_next): Add libc_hiden_proto. * nss/nsswitch.c (__nss_database_lookup, __nss_next): Add libc_hidden_def. * sysdeps/generic/mempcpy.c (__mempcpy): Remove undef. Add libc_hidden_def. * sysdeps/generic/open64.c (__open64): Add libc_hidden_def. * sysdeps/generic/open.c (__open): Remove undef. Add libc_hidden_def. Remove INTDEF. * sysdeps/generic/fcntl.c (__fcntl): Remove undef. Add libc_hidden_def. * sysdeps/mach/hurd/fcntl.c (__fcntl): Likewise. * sysdeps/i386/i586/mempcpy.S (__mempcpy): Add libc_hidden_def. * sysdeps/i386/i686/mempcpy.S (__mempcpy): Likewise. * sysdeps/mach/hurd/fcntl.c (__libc_fcntl, __fcntl): Remove undef. (__fcntl): Remove INTDEF2. Add libc_hidden_weak. (__libc_fcntl): Add libc_hidden_def. * sysdeps/mach/hurd/open.c (__libc_open, __open): Remove undef. (__open): Remove INTDEF2. Add libc_hidden_weak. (__libc_open): Add libc_hidden_def. * sysdeps/posix/open64.c (__open64): Add libc_hidden_weak. * sysdeps/standalone/open.c (__open): Add libc_hidden_def. * sysdeps/unix/sysv/aix/fcntl.c (__libc_fcntl, __fcntl): Remove undef. Add libc_hidden_def. * sysdeps/unix/sysv/aix/open.c (__libc_open, __open): Remove undef. Add libc_hidden_def. * sysdeps/unix/sysv/linux/i386/fcntl.c (__libc_fcntl, __fcntl): Remove undef. (__fcntl): Remove INTDEF2. Add libc_hidden_weak. (__libc_fcntl): Add libc_hidden_def. * sysdeps/unix/sysv/linux/syscalls.list (__fcntl_internal, __getpgid_internal, __chown_internal): Remove. (__GI___fcntl, __GI___libc_fcntl, __GI___getpgid, __GI___pipe, __GI___sched_setscheduler, __GI___select, __GI___setpgid, __GI___chown): Add. * sysdeps/unix/syscalls.list (__close_internal, __dup2_internal, __getpid_internal, __open_internal, __write_internal): Remove. (__GI___fcntl, __GI___libc_fcntl, __GI___open, __GI___libc_open, __GI___chown, __GI___close, __GI___dup2, __GI___getpid, __GI___libc_open, __GI___open, __GI___read, __GI___libc_read, __GI___select, __GI___statfs, __GI___write, __GI___libc_write): Add. * wcsmbs/mbrlen.c (__mbrlen): Remove undef. Replace INTDEF with libc_hidden_def. * wcsmbs/mbrtowc.c (__mbrtowc): Likewise. * catgets/catgetsinfo.h (__open_catalog): Add libc_hidden_proto. * catgets/open_catalog.c (__open_catalog): Add libc_hidden_def. * elf/dl-profile.c (__profile_frequency): Add libc_hidden_proto. * include/rpc/rpc.h (__rpc_thread_svc_fdset, __rpc_thread_createerr): Add libc_hidden_proto. * include/sys/poll.h (__poll): Add libc_hidden_proto. * include/sys/select.h (__select): Likewise. * include/sys/socket.h (__send): Likewise. * include/sys/statfs.h (__statfs): Likewise. * include/unistd.h (__pwrite64, __libc_read, __pipe, __chown, __dup2, __getpid, __getpgid, __setpgid, __close, __read, __write, __getpagesize, __sbrk): Likewise. (__chown_internal, __dup2_internal, __getpid_internal, __getpgid_internal, __close_internal, __write_internal, __getpagesize_internal): Remove. (__close, __dup2, __getpagesize, __getpgid, __getpid, __libc_write): Remove macros. * include/printf.h (__printf_fp): Add libc_hidden_proto. * include/sched.h (__sched_setscheduler): Likewise. * include/resolv.h (__res_ninit, __res_randomid): Likewise. * include/stdlib.h (__secure_getenv): Likewise. * include/signal.h (__sigaction, __sigsuspend): Likewise. * inet/getaliasent_r.c (NSS_attribute_hidden): Remove. * inet/getaliasname_r.c (NSS_attribute_hidden): Remove. * inet/getnetbyad_r.c (NSS_attribute_hidden): Remove. * inet/getnetbynm_r.c (NSS_attribute_hidden): Remove. * inet/getnetent_r.c (NSS_attribute_hidden): Remove. * inet/getproto_r.c (NSS_attribute_hidden): Remove. * inet/getprtent_r.c (NSS_attribute_hidden): Remove. * inet/getprtname_r.c (NSS_attribute_hidden): Remove. * inet/getrpcbyname_r.c (NSS_attribute_hidden): Remove. * inet/getrpcbynumber_r.c (NSS_attribute_hidden): Remove. * inet/getrpcent_r.c (NSS_attribute_hidden): Remove. * inet/getservent_r.c (NSS_attribute_hidden): Remove. * inet/getsrvbynm_r.c (NSS_attribute_hidden): Remove. * inet/getsrvbypt_r.c (NSS_attribute_hidden): Remove. * inet/gethstbyad_r.c (DB_LOOKUP_FCT): Remove INTUSE. * inet/gethstbynm2_r.c (DB_LOOKUP_FCT): Likewise. * inet/gethstbynm_r.c (DB_LOOKUP_FCT): Likewise. * inet/gethstent_r.c (DB_LOOKUP_FCT): Likewise. * libio/genops.c (__overflow): Add libc_hidden_def. * libio/iovdprintf.c: Remove libio.h include. * libio/libioP.h (libc_hidden_proto, libc_hidden_def, libc_hidden_weak): Define to nothing if not defined. (__overflow, __woverflow): Add libc_hidden_proto. * libio/wgenops.c (__woverflow): Add libc_hidden_def. * nss/getXXent_r.c (NSS_attribute_hidden): Remove. (DB_LOOKUP_FCT): Add libc_hidden_proto. * nss/getXXbyYY_r.c (NSS_attribute_hidden): Remove. (DB_LOOKUP_FCT): Add libc_hidden_proto. * nss/XXX-lookup.c (DB_LOOKUP_FCT): Add libc_hidden_proto and libc_hidden_def. * nss/hosts-lookup.c (__nss_hosts_lookup): Remove INTDEF. * posix/bsd-getpgrp.c (__getpgid_internal): Remove. (__getpgid): Add libc_hidden_proto. (__bsd_getpgrp): Remove INTUSE. * resolv/res_init.c (__res_ninit, __res_randomid): Add libc_hidden_def. * shadow/getspent_r.c (NSS_attribute_hidden): Remove. * shadow/getspnam_r.c (NSS_attribute_hidden): Remove. * stdio-common/printf_fp.c (__printf_fp): Add libc_hidden_def. * stdlib/strfmon.c (__printf_fp): Add libc_hidden_proto. * stdlib/secure-getenv.c (__secure_getenv): Add libc_hidden_def. * sunrpc/rpc_thread.c (__rpc_thread_svc_fdset, __rpc_thread_createerr): Add libc_hidden_def. * sysdeps/alpha/alphaev67/rawmemchr.S (__rawmemchr): Add libc_hidden_def. * sysdeps/alpha/alphaev67/stpncpy.S (__stpncpy): Likewise. * sysdeps/alpha/rawmemchr.S (__rawmemchr): Likewise. * sysdeps/alpha/stpncpy.S (__stpncpy): Likewise. * sysdeps/generic/chown.c (__chown): Likewise. * sysdeps/generic/close.c (__close): Likewise. * sysdeps/generic/dup2.c (__dup2): Likewise. * sysdeps/generic/pipe.c (__pipe): Likewise. * sysdeps/generic/prof-freq.c (__profile_frequency): Likewise. * sysdeps/generic/pwrite64.c (__pwrite64): Likewise. * sysdeps/generic/rawmemchr.c (__rawmemchr): Likewise. * sysdeps/generic/read.c (__libc_read): Likewise. (__read): Add libc_hidden_weak. * sysdeps/generic/sbrk.c (__sbrk): Add libc_hidden_def. * sysdeps/generic/sched_sets.c (__sched_setscheduler): Likewise. * sysdeps/generic/select.c (__select): Likewise. * sysdeps/generic/send.c (__send): Likewise. * sysdeps/generic/setpgid.c (__setpgid): Likewise. * sysdeps/generic/sigaction.c (__sigaction): Likewise. * sysdeps/generic/sigsuspend.c (__sigsuspend): Likewise. * sysdeps/generic/statfs.c (__statfs): Likewise. * sysdeps/generic/stpncpy.c (__stpncpy): Likewise. * sysdeps/generic/strcasecmp.c (__strcasecmp): Likewise. * sysdeps/generic/getpagesize.c (__getpagesize): Likewise. Remove undef and INTDEF. * sysdeps/generic/getpgid.c (__getpgid): Likewise. * sysdeps/generic/getpid.c (__getpid): Likewise. * sysdeps/generic/write.c (__libc_write): Likewise. (__write): Add libc_hidden_weak. Remove undef and INTDEF. * sysdeps/i386/rawmemchr.S (__rawmemchr): Add libc_hidden_def. * sysdeps/i386/stpncpy.S (__stpncpy): Likewise. * sysdeps/m68k/rawmemchr.S (__rawmemchr): Likewise. * sysdeps/mach/hurd/chown.c (__chown): Likewise. Remove INTDEF. * sysdeps/mach/hurd/close.c (__close): Add libc_hidden_def. Remove undef and INTDEF. * sysdeps/mach/hurd/dup2.c (__dup2): Likewise. * sysdeps/mach/hurd/getpgid.c (__getpgid): Likewise. * sysdeps/mach/hurd/getpid.c (__getpid): Likewise. * sysdeps/mach/getpagesize.c (__getpagesize): Likewise. * sysdeps/mach/hurd/write.c (__libc_write): Likewise. (__write): Add libc_hidden_weak. Remove undef and INTDEF. * sysdeps/mach/hurd/pipe.c: Include unistd.h. (__pipe): Add libc_hidden_def. * sysdeps/mach/hurd/dl-sysdep.c (__libc_read, __libc_write): Add libc_hidden_weak. * sysdeps/mach/hurd/poll.c (__poll): Add libc_hidden_def. * sysdeps/mach/hurd/profil.c (__profile_frequency): Likewise. * sysdeps/mach/hurd/read.c (__libc_read): Likewise. (__read): Add libc_hidden_weak. * sysdeps/mach/hurd/pwrite64.c (__pwrite64): Likewise. (__libc_pwrite64): Add libc_hidden_def. * sysdeps/mach/hurd/sbrk.c (__sbrk): Likewise. * sysdeps/mach/hurd/select.c (__select): Likewise. * sysdeps/mach/hurd/send.c (__send): Likewise. * sysdeps/mach/hurd/setpgid.c (__setpgid): Likewise. * sysdeps/mach/hurd/sigaction.c (__sigaction): Likewise. * sysdeps/mach/hurd/sigsuspend.c (__sigsuspend): Likewise. * sysdeps/mach/hurd/statfs.c (__statfs): Likewise. * sysdeps/posix/dup2.c: Likewise. Remove undef and INTDEF. * sysdeps/posix/getpagesize.c (__getpagesize): Likewise. * sysdeps/posix/pwrite64.c (__libc_pwrite64): Add libc_hidden_def. (__pwrite64): Add libc_hidden_weak. * sysdeps/posix/sigsuspend.c (__sigsuspend): Add libc_hidden_def. * sysdeps/sparc/sparc64/rawmemchr.S (__rawmemchr): Likewise. * sysdeps/sparc/sparc64/stpncpy.S (__stpncpy): Likewise. * sysdeps/standalone/close.c (__close): Likewise. * sysdeps/standalone/write.c (__libc_write): Likewise. (__write): Add libc_hidden_weak. * sysdeps/standalone/read.c (__read): Likewise. (__libc_read): Add libc_hidden_def. * sysdeps/unix/grantpt.c (grantpt): Remove INTUSE. * sysdeps/unix/bsd/m68k/pipe.S (__pipe): Add libc_hidden_def. * sysdeps/unix/bsd/osf/alpha/pipe.S (__pipe): Likewise. * sysdeps/unix/bsd/vax/pipe.S (__pipe): Likewise. * sysdeps/unix/bsd/syscalls.list (__GI___getpagesize): Likewise. * sysdeps/unix/bsd/poll.c (__poll): Likewise. * sysdeps/unix/bsd/sigaction.c (__sigaction): Likewise. * sysdeps/unix/bsd/sigsuspend.c (__sigsuspend): Likewise. * sysdeps/unix/common/syscalls.list (__GI___getpgid, __GI___setpgid, __GI___sigaction): Add. * sysdeps/unix/i386/pipe.S (__pipe): Add libc_hidden_def. * sysdeps/unix/inet/syscalls.list (__GI___send): Add. * sysdeps/unix/mips/pipe.S (__pipe): Add libc_hidden_def. * sysdeps/unix/sparc/pipe.S (__pipe): Likewise. * sysdeps/unix/sysv/irix4/syscalls.list (__GI___getpgid, __GI___setpgid): Add. * sysdeps/unix/sysv/aix/chown.c (__chown): Add libc_hidden_def. Remove undef and INTDEF. * sysdeps/unix/sysv/aix/getpgid.c (__getpgid): Likewise. * sysdeps/unix/sysv/aix/write.c (__write, __libc_write): Likewise. * sysdeps/unix/sysv/aix/close.c (__close): Add libc_hidden_def. * sysdeps/unix/sysv/aix/getpid.c (__getpid): Likewise. * sysdeps/unix/sysv/aix/pipe.c (__pipe): Likewise. * sysdeps/unix/sysv/aix/read.c (__read, __libc_read): Likewise. * sysdeps/unix/sysv/aix/poll.c (__poll): Likewise. * sysdeps/unix/sysv/aix/sbrk.c (__sbrk): Likewise. * sysdeps/unix/sysv/aix/sigaction.c (__sigaction): Likewise. * sysdeps/unix/sysv/aix/sigsuspend.c (__sigsuspend): Likewise. * sysdeps/unix/sysv/aix/statfs.c (__statfs): Likewise. * sysdeps/unix/sysv/aix/select.c (__select): Likewise. * sysdeps/unix/sysv/aix/setpgid.c (__setpgid): Likewise. * sysdeps/unix/sysv/linux/alpha/pipe.S (__pipe): Likewise. * sysdeps/unix/sysv/linux/alpha/syscalls.list (__GI___pwrite64, __GI___statfs, __GI___send): Add. * sysdeps/unix/sysv/linux/alpha/select.S (__select): Add libc_hidden_ver resp. libc_hidden_def. * sysdeps/unix/sysv/linux/alpha/sigsuspend.S (__sigsuspend): Add libc_hidden_def. * sysdeps/unix/sysv/linux/ia64/getpagesize.c (__getpagesize): Likewise. Remove undef and INTDEF. * sysdeps/unix/sysv/linux/ia64/pipe.S (__pipe): Add libc_hidden_def. * sysdeps/unix/sysv/linux/ia64/syscalls.list (__GI___pwrite64, __GI___statfs, __GI___send): Add. * sysdeps/unix/sysv/linux/ia64/sigaction.c (__sigaction): Add libc_hidden_def. * sysdeps/unix/sysv/linux/ia64/sigsuspend.c (__sigsuspend): Likewise. * sysdeps/unix/sysv/linux/sh/pipe.S (__pipe): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/chown.c (__chown): Add libc_hidden_ver resp. libc_hidden_def. * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list (__GI___pwrite64, __GI___send): Add. * sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c (__sigaction): Add libc_hidden_weak. * sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c (__sigsuspend): Add libc_hidden_def. * sysdeps/unix/sysv/linux/hppa/syscalls.list (__GI___send): Add. * sysdeps/unix/sysv/linux/arm/sigaction.c (__sigaction): Add libc_hidden_weak. * sysdeps/unix/sysv/linux/i386/chown.c (__chown): Add libc_hidden_ver resp. libc_hidden_def. * sysdeps/unix/sysv/linux/i386/sigaction.c (__sigaction): Add libc_hidden_weak. * sysdeps/unix/sysv/linux/m68k/chown.c (__chown): Likewise. Remove INTDEF. * sysdeps/unix/sysv/linux/m68k/getpagesize.c (__getpagesize): Likewise. Remove undef. * sysdeps/unix/sysv/linux/mips/pwrite64.c (__pwrite64): Add libc_hidden_weak. * sysdeps/unix/sysv/linux/mips/syscalls.list (__GI___send): Add. * sysdeps/unix/sysv/linux/mips/sigaction.c (__sigaction): Add libc_hidden_weak. * sysdeps/unix/sysv/linux/powerpc/chown.c (__chown): Add libc_hidden_def. * sysdeps/unix/sysv/linux/powerpc/pwrite64.c (__pwrite64): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c (__getpagesize): Likewise. Remove undef and INTDEF. * sysdeps/unix/sysv/linux/sparc/sparc32/pipe.S (__pipe): Add libc_hidden_def. * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c (__sigaction): Add libc_hidden_weak. * sysdeps/unix/sysv/linux/sparc/sparc64/pipe.S (__pipe): Add libc_hidden_def. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (__GI___pwrite64, __GI___statfs, __GI___select, __GI___send): Add. * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c (__sigaction): Add libc_hidden_weak. * sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c (__sigsuspend): Add libc_hidden_def. * sysdeps/unix/sysv/linux/x86_64/syscalls.list (__GI___pwrite64, __GI___statfs): Add. * sysdeps/unix/sysv/linux/x86_64/send.c (__send): Add libc_hidden_weak. * sysdeps/unix/sysv/linux/x86_64/sigaction.c (__sigaction): Likewise. * sysdeps/unix/sysv/linux/getpagesize.c: Add libc_hidden_def. Remove undef and INTDEF. * sysdeps/unix/sysv/linux/poll.c (__poll): Add libc_hidden_def. * sysdeps/unix/sysv/linux/pwrite64.c (__pwrite64): Add libc_hidden_def. * sysdeps/unix/sysv/linux/send.S (__send): Likewise. * sysdeps/unix/sysv/linux/sigaction.c (__sigaction): Add libc_hidden_weak. * sysdeps/unix/sysv/linux/sigsuspend.c (__sigsuspend): Add libc_hidden_def. * sysdeps/unix/sysv/sco3.2.4/__setpgid.c (__setpgid): Likewise. * sysdeps/unix/sysv/sco3.2.4/sigaction.S (__sigaction): Likewise. * sysdeps/unix/sysv/sysv4/solaris2/syscalls.list (__GI___sigaction): Add. * sysdeps/unix/sysv/sysv4/__getpgid.c (__getpgid): Add libc_hidden_def. Remove undef and INTDEF. * sysdeps/unix/sysv/sysv4/getpgid.c (__getpgid): Likewise. * sysdeps/unix/sysv/sysv4/__setpgid.c (__setpgid): Add libc_hidden_def. * sysdeps/unix/sysv/sysv4/setpgid.c (__setpgid): Likewise. * sysdeps/unix/sysv/sysv4/sigaction.c (__sigaction): Likewise. * sysdeps/unix/sysv/sigaction.c (__sigaction): Likewise. * sysdeps/unix/getpagesize.c (__getpagesize): Add libc_hidden_def. Remove undef and INTDEF. * configure.in (HAVE_BROKEN_VISIBILITY_ATTRIBUTE): Add check for broken visibility attribute handling. * config.h.in (HAVE_BROKEN_VISIBILITY_ATTRIBUTE): Add. 2002-08-02 Ulrich Drepper <drepper@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/assert.h16
-rw-r--r--include/fcntl.h18
-rw-r--r--include/libc-internal.h2
-rw-r--r--include/libc-symbols.h182
-rw-r--r--include/printf.h1
-rw-r--r--include/resolv.h2
-rw-r--r--include/sched.h1
-rw-r--r--include/signal.h2
-rw-r--r--include/stdlib.h3
-rw-r--r--include/string.h5
-rw-r--r--include/sys/poll.h2
-rw-r--r--include/sys/select.h2
-rw-r--r--include/sys/socket.h1
-rw-r--r--include/sys/statfs.h1
-rw-r--r--include/unistd.h37
-rw-r--r--include/wchar.h13
16 files changed, 234 insertions, 54 deletions
diff --git a/include/assert.h b/include/assert.h
index 30afabf94d..780d7ae373 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -1,10 +1,12 @@
#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;
-#if defined SHARED && !defined NOT_IN_libc
-# define __assert_fail __assert_fail_internal
+/* This prints an "Assertion failed" message and aborts.
+ In installed assert.h this is only conditionally declared,
+ so it has to be repeated here. */
+extern void __assert_fail (__const char *__assertion, __const char *__file,
+ unsigned int __line, __const char *__function)
+ __THROW __attribute__ ((__noreturn__));
+
+#if !defined NOT_IN_libc || defined IS_IN_rtld
+hidden_proto (__assert_fail)
#endif
diff --git a/include/fcntl.h b/include/fcntl.h
index f14baf7ae5..897fd609bb 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -3,23 +3,15 @@
/* Now define the internal interfaces. */
extern int __open64 (__const char *__file, int __oflag, ...);
+libc_hidden_proto (__open64)
extern int __libc_open64 (const char *file, int oflag, ...);
extern int __libc_open (const char *file, int oflag, ...);
+libc_hidden_proto (__libc_open)
extern int __libc_fcntl (int fd, int cmd, ...);
+libc_hidden_proto (__libc_fcntl)
extern int __open (__const char *__file, int __oflag, ...);
-extern int __open_internal (__const char *__file, int __oflag, ...)
- attribute_hidden;
+libc_hidden_proto (__open)
extern int __fcntl (int __fd, int __cmd, ...);
-extern int __fcntl_internal (int __fd, int __cmd, ...) attribute_hidden;
-
-#ifndef NOT_IN_libc
-# define __fcntl(fd, cmd, args...) INTUSE(__fcntl) (fd, cmd, ##args)
-# define __open(file, oflag, args...) INTUSE(__open) (file, oflag, ##args)
-# ifdef SHARED
-# define __libc_fcntl(fd, cmd, args...) __fcntl_internal (fd, cmd, ##args)
-# define __libc_open(file, oflag, args...) \
- __open_internal (file, oflag, ##args)
-# endif
-#endif
+libc_hidden_proto (__fcntl)
#endif
diff --git a/include/libc-internal.h b/include/libc-internal.h
index 85afdc1b05..82eea8b6cc 100644
--- a/include/libc-internal.h
+++ b/include/libc-internal.h
@@ -15,6 +15,7 @@ extern void __libc_global_ctors (void);
/* Discover the tick frequency of the machine if something goes wrong,
we return 0, an impossible hertz. */
extern int __profile_frequency (void);
+libc_hidden_proto (__profile_frequency)
/* Hooks for the instrumenting functions. */
extern void __cyg_profile_func_enter (void *this_fn, void *call_site);
@@ -25,6 +26,7 @@ extern hp_timing_t __get_clockfreq (void);
/* Free all allocated resources. */
extern void __libc_freeres (void);
+libc_hidden_proto (__libc_freeres)
/* Define and initialize `__progname' et. al. */
extern void __init_misc (int, char **, char **);
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 901458a7b3..4734c50ed7 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -381,4 +381,186 @@
# define INTVARDEF2(name, newname)
#endif
+/* The following macros are used for PLT bypassing within libc.so
+ (and if needed other libraries similarly).
+ First of all, you need to have the function prototyped somewhere,
+ say in foo/foo.h:
+
+ int foo (int __bar);
+
+ If calls to foo within libc.so should always go to foo defined in libc.so,
+ then in include/foo.h you add:
+
+ libc_hidden_proto (foo)
+
+ line and after the foo function definition:
+
+ int foo (int __bar)
+ {
+ return __bar;
+ }
+ libc_hidden_def (foo)
+
+ or
+
+ int foo (int __bar)
+ {
+ return __bar;
+ }
+ libc_hidden_weak (foo)
+
+ If foo is normally just an alias (strong or weak) of some other function,
+ you should use the normal strong_alias first, then add libc_hidden_def
+ or libc_hidden_weak:
+
+ int baz (int __bar)
+ {
+ return __bar;
+ }
+ strong_alias (baz, foo)
+ libc_hidden_weak (foo)
+
+ If the function should be internal to multiple objects, say ld.so and
+ libc.so, the best way is to use:
+
+ #if !defined NOT_IN_libc || defined IS_IN_rtld
+ hidden_proto (foo)
+ #endif
+
+ in include/foo.h and the normal macros at all function definitions
+ depending on what DSO they belong to.
+
+ If versioned_symbol macro is used to define foo,
+ libc_hidden_ver macro should be used, as in:
+
+ int __real_foo (int __bar)
+ {
+ return __bar;
+ }
+ versioned_symbol (libc, __real_foo, foo, GLIBC_2_1);
+ libc_hidden_ver (__real_foo, foo) */
+
+#if defined SHARED && defined DO_VERSIONING \
+ && defined HAVE_BROKEN_ALIAS_ATTRIBUTE
+# ifndef __ASSEMBLER__
+# ifdef HAVE_BROKEN_VISIBILITY_ATTRIBUTE
+# define __hidden_proto_hiddenattr
+# else
+# define __hidden_proto_hiddenattr attribute_hidden
+# endif
+# ifndef HAVE_BROKEN_ALIAS_ATTRIBUTE
+# define hidden_proto(name) __hidden_proto (name, __GI_##name)
+# else
+# define hidden_proto(name)
+# endif
+# define __hidden_proto(name, internal) \
+ __typeof (name) internal; \
+ __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr;
+# define __hidden_asmname(name) \
+ __hidden_asmname1 (__USER_LABEL_PREFIX__, name)
+# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
+# define __hidden_asmname2(prefix, name) #prefix name
+# ifdef HAVE_ASM_SET_DIRECTIVE
+# define __hidden_def1(original, alias) \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
+# else
+# ifdef HAVE_ASM_GLOBAL_DOT_NAME
+# define __hidden_def1(original, alias) \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+ C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
+# else
+# define __hidden_def1(original, alias) \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
+# endif
+# endif
+# define __hidden_def2(...) #__VA_ARGS__
+# define __hidden_def3(...) __hidden_def2 (__VA_ARGS__)
+# define hidden_def(name) \
+ __asm__ (__hidden_def3 (__hidden_def1 (__GI_##name, name)));
+# define hidden_ver(local, name) \
+ __asm__ (__hidden_def3 (__hidden_def1 (local, __GI_##name)));
+# ifdef HAVE_WEAK_SYMBOLS
+# ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
+# define __hidden_weak1(original, alias) \
+ .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
+# else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
+# ifdef HAVE_ASM_GLOBAL_DOT_NAME
+# define __hidden_weak1(original, alias) \
+ .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+ C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
+# else
+# define __hidden_weak1(original, alias) \
+ .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
+# endif
+# endif
+# define hidden_weak(name) \
+ __asm__ (__hidden_def3 (__hidden_weak1 (__GI_##name, name)));
+# else
+# define hidden_weak(name) hidden_def (name)
+# endif
+# else
+/* For assembly, we need to do the opposite of what we do in C:
+ in assembly gcc __REDIRECT stuff is not in place, so functions
+ are defined by its normal name and we need to create the
+ __GI_* alias to it, in C __REDIRECT causes the function definition
+ to use __GI_* name and we need to add alias to the real name.
+ hidden_proto and hidden_weak don't make sense for assembly. */
+# define hidden_def(name) strong_alias (name, __GI_##name)
+# define hidden_ver(local, name) strong_alias (local, __GI_##name)
+# endif
+#else
+# ifndef __ASSEMBLY__
+# define hidden_proto(name)
+# define hidden_weak(name)
+# endif
+# define hidden_def(name)
+# define hidden_ver(local, name)
+#endif
+
+#if !defined NOT_IN_libc && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE
+# define libc_hidden_proto(name) hidden_proto (name)
+# define libc_hidden_def(name) hidden_def (name)
+# define libc_hidden_weak(name) hidden_weak (name)
+# define libc_hidden_ver(local, name) hidden_ver (local, name)
+#else
+# define libc_hidden_proto(name)
+# define libc_hidden_def(name)
+# define libc_hidden_weak(name)
+# define libc_hidden_ver(local, name)
+#endif
+
+#if defined NOT_IN_libc && defined IS_IN_rtld \
+ && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE
+# define rtld_hidden_proto(name) hidden_proto (name)
+# define rtld_hidden_def(name) hidden_def (name)
+# define rtld_hidden_weak(name) hidden_weak (name)
+# define rtld_hidden_ver(local, name) hidden_ver (local, name)
+#else
+# define rtld_hidden_proto(name)
+# define rtld_hidden_def(name)
+# define rtld_hidden_weak(name)
+# define rtld_hidden_ver(local, name)
+#endif
+
+#if defined NOT_IN_libc && defined IS_IN_libm \
+ && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE
+# define libm_hidden_proto(name) hidden_proto (name)
+# define libm_hidden_def(name) hidden_def (name)
+# define libm_hidden_weak(name) hidden_weak (name)
+# define libm_hidden_ver(local, name) hidden_ver (local, name)
+#else
+# define libm_hidden_proto(name)
+# define libm_hidden_def(name)
+# define libm_hidden_weak(name)
+# define libm_hidden_ver(local, name)
+#endif
+
#endif /* libc-symbols.h */
diff --git a/include/printf.h b/include/printf.h
index a025eac070..c0bd2d2d65 100644
--- a/include/printf.h
+++ b/include/printf.h
@@ -7,5 +7,6 @@ extern int __printf_fphex (FILE *, const struct printf_info *,
const void *const *);
extern int __printf_fp (FILE *, const struct printf_info *,
const void *const *);
+libc_hidden_proto (__printf_fp)
#endif
diff --git a/include/resolv.h b/include/resolv.h
index 6d7008b81a..8ad713e96c 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -40,6 +40,8 @@ extern void res_send_setqhook (res_send_qhook __hook);
extern void res_send_setrhook (res_send_rhook __hook);
extern int res_ourserver_p (const res_state __statp,
const struct sockaddr_in6 *__inp);
+libc_hidden_proto (__res_ninit)
+libc_hidden_proto (__res_randomid)
#endif
#endif
diff --git a/include/sched.h b/include/sched.h
index a7894c5ab1..26ff9c2be1 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -7,6 +7,7 @@ extern int __sched_setparam (__pid_t __pid,
extern int __sched_getparam (__pid_t __pid, struct sched_param *__param);
extern int __sched_setscheduler (__pid_t __pid, int __policy,
__const struct sched_param *__param);
+libc_hidden_proto (__sched_setscheduler)
extern int __sched_getscheduler (__pid_t __pid);
extern int __sched_yield (void);
extern int __sched_get_priority_max (int __algorithm);
diff --git a/include/signal.h b/include/signal.h
index 0f7eb851bf..c2f72fac76 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -9,11 +9,13 @@ extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler);
extern int __kill (__pid_t __pid, int __sig);
extern int __sigaction (int __sig, __const struct sigaction *__restrict __act,
struct sigaction *__restrict __oact);
+libc_hidden_proto (__sigaction)
extern int __sigblock (int __mask);
extern int __sigsetmask (int __mask);
extern int __sigprocmask (int __how,
__const sigset_t *__set, sigset_t *__oset);
extern int __sigsuspend (__const sigset_t *__set);
+libc_hidden_proto (__sigsuspend)
extern int __sigwait (__const sigset_t *__set, int *__sig);
extern int __sigwaitinfo (__const sigset_t *__set, siginfo_t *__info);
extern int __sigtimedwait (__const sigset_t *__set, siginfo_t *__info,
diff --git a/include/stdlib.h b/include/stdlib.h
index f4e6d30ca7..ad9ea8e0e7 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -8,6 +8,9 @@
/* Now define the internal interfaces. */
#ifndef __Need_M_And_C
+
+libc_hidden_proto (__secure_getenv)
+
extern long int __random (void);
extern void __srandom (unsigned int __seed);
extern char *__initstate (unsigned int __seed, char *__statebuf,
diff --git a/include/string.h b/include/string.h
index 8dda2f1b7e..d2062c7d61 100644
--- a/include/string.h
+++ b/include/string.h
@@ -60,3 +60,8 @@ extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen);
(char *) memcpy (__new, __old, __len); \
}))
#endif
+
+libc_hidden_proto (__mempcpy)
+libc_hidden_proto (__stpncpy)
+libc_hidden_proto (__rawmemchr)
+libc_hidden_proto (__strcasecmp)
diff --git a/include/sys/poll.h b/include/sys/poll.h
index d7d6e013a0..7d12e1c9be 100644
--- a/include/sys/poll.h
+++ b/include/sys/poll.h
@@ -3,4 +3,6 @@
extern int __poll (struct pollfd *__fds, unsigned long int __nfds,
int __timeout);
+libc_hidden_proto (__poll)
+
#endif
diff --git a/include/sys/select.h b/include/sys/select.h
index 583149c9ee..2e5901c13d 100644
--- a/include/sys/select.h
+++ b/include/sys/select.h
@@ -11,4 +11,6 @@ extern int __select (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
struct timeval *__restrict __timeout);
+libc_hidden_proto (__select)
+
#endif
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 9ea37c7fff..3aaaab5980 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -27,6 +27,7 @@ extern int __getpeername (int __fd, __SOCKADDR_ARG __addr,
/* Send N bytes of BUF to socket FD. Returns the number sent or -1. */
extern ssize_t __send (int __fd, __const void *__buf, size_t __n, int __flags);
+libc_hidden_proto (__send)
/* Send N bytes of BUF on socket FD to peer at address ADDR (which is
ADDR_LEN bytes long). Returns the number sent, or -1 for errors. */
diff --git a/include/sys/statfs.h b/include/sys/statfs.h
index 1df3d8c270..80786a71f8 100644
--- a/include/sys/statfs.h
+++ b/include/sys/statfs.h
@@ -3,6 +3,7 @@
/* Now define the internal interfaces. */
extern int __statfs (__const char *__file, struct statfs *__buf);
+libc_hidden_proto (__statfs)
extern int __fstatfs (int __fildes, struct statfs *__buf);
extern int __statfs64 (__const char *__file, struct statfs64 *__buf);
extern int __fstatfs64 (int __fildes, struct statfs64 *__buf);
diff --git a/include/unistd.h b/include/unistd.h
index 00fa95b02a..b25a3b808d 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -22,17 +22,19 @@ extern ssize_t __libc_pwrite (int __fd, __const void *__buf, size_t __n,
__off_t __offset);
extern ssize_t __pwrite64 (int __fd, __const void *__buf, size_t __n,
__off64_t __offset);
+libc_hidden_proto (__pwrite64)
extern ssize_t __libc_pwrite64 (int __fd, __const void *__buf, size_t __n,
__off64_t __offset);
extern ssize_t __libc_read (int __fd, void *__buf, size_t __n);
+libc_hidden_proto (__libc_read)
extern ssize_t __libc_write (int __fd, __const void *__buf, size_t __n);
+libc_hidden_proto (__libc_write)
extern int __pipe (int __pipedes[2]);
+libc_hidden_proto (__pipe)
extern unsigned int __sleep (unsigned int __seconds);
extern int __chown (__const char *__file,
__uid_t __owner, __gid_t __group);
-extern int __chown_internal (__const char *__file,
- __uid_t __owner, __gid_t __group)
- attribute_hidden;
+libc_hidden_proto (__chown)
extern int __fchown (int __fd,
__uid_t __owner, __gid_t __group);
extern int __lchown (__const char *__file, __uid_t __owner,
@@ -54,14 +56,14 @@ 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;
+libc_hidden_proto (__dup2)
extern int __execve (__const char *__path, char *__const __argv[],
char *__const __envp[]);
extern long int __pathconf (__const char *__path, int __name);
extern long int __fpathconf (int __fd, int __name);
extern long int __sysconf (int __name);
extern __pid_t __getpid (void);
-extern __pid_t __getpid_internal (void) attribute_hidden;
+libc_hidden_proto (__getpid)
extern __pid_t __getppid (void);
extern __pid_t __setsid (void);
extern __uid_t __getuid (void);
@@ -69,12 +71,13 @@ extern __uid_t __geteuid (void);
extern __gid_t __getgid (void);
extern __gid_t __getegid (void);
extern int __getgroups (int __size, __gid_t __list[]);
-extern __pid_t __getpgid_internal (__pid_t __pid) attribute_hidden;
+libc_hidden_proto (__getpgid)
extern int __group_member (__gid_t __gid);
extern int __setuid (__uid_t __uid);
extern int __setreuid (__uid_t __ruid, __uid_t __euid);
extern int __setgid (__gid_t __gid);
extern int __setpgid (__pid_t __pid, __pid_t __pgid);
+libc_hidden_proto (__setpgid)
extern int __setregid (__gid_t __rgid, __gid_t __egid);
extern __pid_t __vfork (void);
extern int __ttyname_r (int __fd, char *__buf, size_t __buflen);
@@ -89,18 +92,18 @@ 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;
+libc_hidden_proto (__close)
extern ssize_t __read (int __fd, void *__buf, size_t __nbytes);
+libc_hidden_proto (__read)
extern ssize_t __write (int __fd, __const void *__buf, size_t __n);
-extern ssize_t __write_internal (int __fd, __const void *__buf, size_t __n)
- attribute_hidden;
+libc_hidden_proto (__write)
extern __pid_t __fork (void);
extern int __getpagesize (void) __attribute__ ((__const__));
-extern int __getpagesize_internal (void)
- __attribute__ ((__const__)) attribute_hidden;
+libc_hidden_proto (__getpagesize)
extern int __ftruncate (int __fd, __off_t __length);
extern int __ftruncate64 (int __fd, __off64_t __length);
extern void *__sbrk (intptr_t __delta);
+libc_hidden_proto (__sbrk)
/* This variable is set nonzero at startup if the process's effective
@@ -118,16 +121,4 @@ extern int __libc_enable_secure_internal attribute_hidden;
/* Various internal function. */
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 __getpagesize() INTUSE(__getpagesize) ()
-# define __getpgid(pid) INTUSE(__getpgid) (pid)
-# define __getpid() INTUSE(__getpid) ()
-# ifdef SHARED
-# define __libc_write(fd, buf, n) INTUSE(__write) (fd, buf, n)
-# endif
-#endif
-
#endif
diff --git a/include/wchar.h b/include/wchar.h
index c5bdf4d222..461b7400b1 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -18,12 +18,8 @@ extern int __mbsinit (__const __mbstate_t *__ps);
extern size_t __mbrtowc (wchar_t *__restrict __pwc,
__const char *__restrict __s, size_t __n,
__mbstate_t *__restrict __p);
-extern size_t __mbrtowc_internal (wchar_t *__restrict __pwc,
- __const char *__restrict __s, size_t __n,
- __mbstate_t *__restrict __p)
- attribute_hidden;
-extern size_t __mbrlen_internal (__const char *__restrict __s, size_t __n,
- mbstate_t *__restrict __ps) attribute_hidden;
+libc_hidden_proto (__mbrtowc)
+libc_hidden_proto (__mbrlen)
extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc,
__mbstate_t *__restrict __ps);
extern size_t __mbsrtowcs (wchar_t *__restrict __dst,
@@ -68,10 +64,5 @@ extern int __vfwprintf (__FILE *__restrict __s,
__gnuc_va_list __arg)
/* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
-# ifndef NOT_IN_libc
-# define __mbrlen(s, n, ps) INTUSE(__mbrlen) (s, n, ps)
-# define __mbrtowc(pwc, s, n, p) INTUSE(__mbrtowc) (pwc, s, n, p)
-# endif
-
# endif
#endif