aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /include
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.zip
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.bz2
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'include')
-rw-r--r--include/aio.h8
-rw-r--r--include/alloca.h2
-rw-r--r--include/arpa/nameser.h45
-rw-r--r--include/atomic.h82
-rw-r--r--include/bits/socket2.h1
-rw-r--r--include/bits/stdlib-ldbl.h1
-rw-r--r--include/bits/stdlib.h1
-rw-r--r--include/bits/syslog.h1
-rw-r--r--include/bits/unistd.h1
-rw-r--r--include/bits/wchar-ldbl.h1
-rw-r--r--include/bits/wchar2.h1
-rw-r--r--include/dirent.h6
-rw-r--r--include/dlfcn.h33
-rw-r--r--include/errno.h2
-rw-r--r--include/execinfo.h2
-rw-r--r--include/fcntl.h18
-rw-r--r--include/features.h43
-rw-r--r--include/fenv.h2
-rw-r--r--include/ifaddrs.h15
-rw-r--r--include/libc-symbols.h233
-rw-r--r--include/libintl.h10
-rw-r--r--include/limits.h23
-rw-r--r--include/link.h149
-rw-r--r--include/locale.h3
-rw-r--r--include/malloc.h1
-rw-r--r--include/netinet/in.h1
-rw-r--r--include/regex.h49
-rw-r--r--include/resolv.h3
-rw-r--r--include/rpc/auth.h6
-rw-r--r--include/rpc/key_prot.h22
-rw-r--r--include/rpc/pmap_clnt.h4
-rw-r--r--include/rpc/pmap_prot.h6
-rw-r--r--include/rpc/pmap_rmt.h6
-rw-r--r--include/rpc/xdr.h62
-rw-r--r--include/rpcsvc/nis_callback.h7
-rw-r--r--include/rpcsvc/nislib.h2
-rw-r--r--include/rpcsvc/yp.h8
-rw-r--r--include/rpcsvc/ypupd.h2
-rw-r--r--include/sched.h1
-rw-r--r--include/signal.h6
-rw-r--r--include/stdio.h5
-rw-r--r--include/stdlib.h64
-rw-r--r--include/string.h1
-rw-r--r--include/stub-tag.h7
-rw-r--r--include/stubs-biarch.h12
-rw-r--r--include/sys/cdefs.h6
-rw-r--r--include/sys/mman.h5
-rw-r--r--include/sys/msg.h4
-rw-r--r--include/sys/sendfile.h1
-rw-r--r--include/sys/socket.h8
-rw-r--r--include/sys/stat.h4
-rw-r--r--include/sys/sysinfo.h3
-rw-r--r--include/sys/syslog.h5
-rw-r--r--include/sys/time.h1
-rw-r--r--include/sys/xattr.h1
-rw-r--r--include/time.h17
-rw-r--r--include/unistd.h11
-rw-r--r--include/wchar.h17
58 files changed, 375 insertions, 666 deletions
diff --git a/include/aio.h b/include/aio.h
index be40c0b..e3dc86f 100644
--- a/include/aio.h
+++ b/include/aio.h
@@ -1,12 +1,6 @@
#ifndef _AIO_H
#include <rt/aio.h>
-/* Now define the internal interfaces. */
+/* Now define the internal interfaces. */
extern void __aio_init (__const struct aioinit *__init);
-
-/* Flag to signal we need to be compatible with glibc < 2.4 in
- lio_listio and we do not issue events for each individual list
- element. */
-#define LIO_NO_INDIVIDUAL_EVENT 128
-
#endif
diff --git a/include/alloca.h b/include/alloca.h
index 563d786..de541f4 100644
--- a/include/alloca.h
+++ b/include/alloca.h
@@ -42,7 +42,7 @@ extern int __libc_alloca_cutoff (size_t size) __attribute__ ((const));
len = __newlen; \
__newbuf; })
#else
-# define extend_alloca(buf, len, newlen) \
+# define extern_alloca(buf, len, newlen) \
__alloca (((len) = (newlen)))
#endif
diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h
index efbe956..944fe73 100644
--- a/include/arpa/nameser.h
+++ b/include/arpa/nameser.h
@@ -1,46 +1 @@
#include <resolv/arpa/nameser.h>
-
-/* If the machine allows unaligned access we can do better than using
- the NS_GET16, NS_GET32, NS_PUT16, and NS_PUT32 macros from the
- installed header. */
-#include <string.h>
-#include <stdint.h>
-#include <netinet/in.h>
-
-extern struct _ns_flagdata _ns_flagdata[] attribute_hidden;
-
-#if _STRING_ARCH_unaligned
-
-# undef NS_GET16
-# define NS_GET16(s, cp) \
- do { \
- uint16_t *t_cp = (uint16_t *) (cp); \
- (s) = ntohs (*t_cp); \
- (cp) += NS_INT16SZ; \
- } while (0)
-
-# undef NS_GET32
-# define NS_GET32(l, cp) \
- do { \
- uint32_t *t_cp = (uint32_t *) (cp); \
- (l) = ntohl (*t_cp); \
- (cp) += NS_INT32SZ; \
- } while (0)
-
-# undef NS_PUT16
-# define NS_PUT16(s, cp) \
- do { \
- uint16_t *t_cp = (uint16_t *) (cp); \
- *t_cp = htons (s); \
- (cp) += NS_INT16SZ; \
- } while (0)
-
-# undef NS_PUT32
-# define NS_PUT32(l, cp) \
- do { \
- uint32_t *t_cp = (uint32_t *) (cp); \
- *t_cp = htonl (l); \
- (cp) += NS_INT32SZ; \
- } while (0)
-
-#endif
diff --git a/include/atomic.h b/include/atomic.h
index d44728b..8a23f6e 100644
--- a/include/atomic.h
+++ b/include/atomic.h
@@ -1,5 +1,5 @@
/* Internal macros for atomic operations for GNU C Library.
- Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -108,7 +108,7 @@
__typeof (*(mem)) __value = (newvalue); \
\
do \
- __oldval = *__memp; \
+ __oldval = (*__memp); \
while (__builtin_expect (atomic_compare_and_exchange_bool_acq (__memp, \
__value, \
__oldval),\
@@ -130,7 +130,7 @@
__typeof (*(mem)) __value = (value); \
\
do \
- __oldval = *__memp; \
+ __oldval = (*__memp); \
while (__builtin_expect (atomic_compare_and_exchange_bool_acq (__memp, \
__oldval \
+ __value,\
@@ -141,41 +141,6 @@
#endif
-
-#ifndef atomic_max
-# define atomic_max(mem, value) \
- do { \
- __typeof (*(mem)) __oldval; \
- __typeof (mem) __memp = (mem); \
- __typeof (*(mem)) __value = (value); \
- do { \
- __oldval = *__memp; \
- if (__oldval >= __value) \
- break; \
- } while (__builtin_expect (atomic_compare_and_exchange_bool_acq (__memp, \
- __value, \
- __oldval),\
- 0)); \
- } while (0)
-#endif
-
-#ifndef atomic_min
-# define atomic_min(mem, value) \
- do { \
- __typeof (*(mem)) __oldval; \
- __typeof (mem) __memp = (mem); \
- __typeof (*(mem)) __value = (value); \
- do { \
- __oldval = *__memp; \
- if (__oldval <= __value) \
- break; \
- } while (__builtin_expect (atomic_compare_and_exchange_bool_acq (__memp, \
- __value, \
- __oldval),\
- 0)); \
- } while (0)
-#endif
-
#ifndef atomic_add
# define atomic_add(mem, value) (void) atomic_exchange_and_add ((mem), (value))
#endif
@@ -273,41 +238,6 @@
__oldval & __mask; })
#endif
-/* Atomically *mem &= mask and return the old value of *mem. */
-#ifndef atomic_and
-# define atomic_and(mem, mask) \
- ({ __typeof (*(mem)) __oldval; \
- __typeof (mem) __memp = (mem); \
- __typeof (*(mem)) __mask = (mask); \
- \
- do \
- __oldval = (*__memp); \
- while (__builtin_expect (atomic_compare_and_exchange_bool_acq (__memp, \
- __oldval \
- & __mask, \
- __oldval),\
- 0)); \
- \
- __oldval; })
-#endif
-
-/* Atomically *mem |= mask and return the old value of *mem. */
-#ifndef atomic_or
-# define atomic_or(mem, mask) \
- ({ __typeof (*(mem)) __oldval; \
- __typeof (mem) __memp = (mem); \
- __typeof (*(mem)) __mask = (mask); \
- \
- do \
- __oldval = (*__memp); \
- while (__builtin_expect (atomic_compare_and_exchange_bool_acq (__memp, \
- __oldval \
- | __mask, \
- __oldval),\
- 0)); \
- \
- __oldval; })
-#endif
#ifndef atomic_full_barrier
# define atomic_full_barrier() __asm ("" ::: "memory")
@@ -324,12 +254,6 @@
#endif
-#ifndef atomic_forced_read
-# define atomic_forced_read(x) \
- ({ __typeof (x) __x; __asm ("" : "=r" (__x) : "0" (x)); __x; })
-#endif
-
-
#ifndef atomic_delay
# define atomic_delay() do { /* nothing */ } while (0)
#endif
diff --git a/include/bits/socket2.h b/include/bits/socket2.h
deleted file mode 100644
index a81fd9f..0000000
--- a/include/bits/socket2.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <socket/bits/socket2.h>
diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 6250949..0000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/include/bits/stdlib.h b/include/bits/stdlib.h
deleted file mode 100644
index 8541e27..0000000
--- a/include/bits/stdlib.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib.h>
diff --git a/include/bits/syslog.h b/include/bits/syslog.h
deleted file mode 100644
index 060b893..0000000
--- a/include/bits/syslog.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <misc/bits/syslog.h>
diff --git a/include/bits/unistd.h b/include/bits/unistd.h
deleted file mode 100644
index 1a91dcc..0000000
--- a/include/bits/unistd.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <posix/bits/unistd.h>
diff --git a/include/bits/wchar-ldbl.h b/include/bits/wchar-ldbl.h
deleted file mode 100644
index 29baa2f..0000000
--- a/include/bits/wchar-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <wcsmbs/bits/wchar-ldbl.h>
diff --git a/include/bits/wchar2.h b/include/bits/wchar2.h
deleted file mode 100644
index a18dccf..0000000
--- a/include/bits/wchar2.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <wcsmbs/bits/wchar2.h>
diff --git a/include/dirent.h b/include/dirent.h
index 8f23aee..f09a88f 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -1,12 +1,9 @@
#ifndef _DIRENT_H
# include <dirstream.h>
# include <dirent/dirent.h>
-# include <sys/stat.h>
-# include <stdbool.h>
/* Now define the internal interfaces. */
extern DIR *__opendir (__const char *__name);
-extern DIR *__fdopendir (int __fd);
extern int __closedir (DIR *__dirp);
extern struct dirent *__readdir (DIR *__dirp);
extern struct dirent64 *__readdir64 (DIR *__dirp);
@@ -26,7 +23,4 @@ extern int __alphasort64 (const void *a, const void *b)
__attribute_pure__;
extern int __versionsort64 (const void *a, const void *b)
__attribute_pure__;
-extern DIR *__alloc_dir (int fd, bool close_fd, const struct stat64 *statp)
- internal_function;
-
#endif
diff --git a/include/dlfcn.h b/include/dlfcn.h
index 9144dd2..bfa1b90 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -1,31 +1,15 @@
#ifndef _DLFCN_H
#include <dlfcn/dlfcn.h>
#include <link.h> /* For ElfW. */
-#include <stdbool.h>
/* Internally used flag. */
#define __RTLD_DLOPEN 0x80000000
#define __RTLD_SPROF 0x40000000
#define __RTLD_OPENEXEC 0x20000000
#define __RTLD_CALLMAP 0x10000000
-#define __RTLD_AUDIT 0x08000000
#define __LM_ID_CALLER -2
-#ifdef SHARED
-/* Locally stored program arguments. */
-extern int __dlfcn_argc attribute_hidden;
-extern char **__dlfcn_argv attribute_hidden;
-#else
-/* These variables are defined and initialized in the startup code. */
-extern int __libc_argc attribute_hidden;
-extern char **__libc_argv attribute_hidden;
-
-# define __dlfcn_argc __libc_argc
-# define __dlfcn_argv __libc_argv
-#endif
-
-
/* Now define the internal interfaces. */
#define __libc_dlopen(name) \
@@ -45,8 +29,18 @@ extern int _dl_addr (const void *address, Dl_info *info,
libc_hidden_proto (_dl_addr)
#endif
+/* Open the shared object NAME, relocate it, and run its initializer if it
+ hasn't already been run. MODE is as for `dlopen' (see <dlfcn.h>). If
+ the object is already opened, returns its existing map. */
+extern void *_dl_open (const char *name, int mode, const void *caller,
+ Lmid_t nsid)
+ internal_function;
+libc_hidden_proto (_dl_open)
+
/* Close an object previously opened by _dl_open. */
-extern void _dl_close (void *map) attribute_hidden;
+extern void _dl_close (void *map)
+ internal_function;
+libc_hidden_proto (_dl_close)
/* Look up NAME in shared object HANDLE (which may be RTLD_DEFAULT or
RTLD_NEXT). WHO is the calling function, for RTLD_NEXT. Returns
@@ -68,10 +62,9 @@ extern void *_dl_vsym (void *handle, const char *name, const char *version,
and the error code passed is the return value and *OBJNAME is set to
the object name which experienced the problems. ERRSTRING if nonzero
points to a malloc'ed string which the caller has to free after use.
- ARGS is passed as argument to OPERATE. MALLOCEDP is set to true only
- if the returned string is allocated using the libc's malloc. */
+ ARGS is passed as argument to OPERATE. */
extern int _dl_catch_error (const char **objname, const char **errstring,
- bool *mallocedp, void (*operate) (void *),
+ void (*operate) (void *),
void *args)
internal_function;
diff --git a/include/errno.h b/include/errno.h
index fe8bca4..9865903 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -2,7 +2,7 @@
#include <stdlib/errno.h>
-#if defined _ERRNO_H && !defined _ISOMAC && !defined __cplusplus
+#if defined _ERRNO_H && !defined _ISOMAC
# ifdef IS_IN_rtld
# include <dl-sysdep.h>
diff --git a/include/execinfo.h b/include/execinfo.h
index 840a081..143a9cc 100644
--- a/include/execinfo.h
+++ b/include/execinfo.h
@@ -2,12 +2,10 @@
#include <debug/execinfo.h>
extern int __backtrace (void **__array, int __size);
-libc_hidden_proto (__backtrace)
extern char **__backtrace_symbols (void *__const *__array, int __size);
extern void __backtrace_symbols_fd (void *__const *__array, int __size,
int __fd);
-libc_hidden_proto (__backtrace_symbols_fd)
#endif
diff --git a/include/fcntl.h b/include/fcntl.h
index e23af1c..7764f1c 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -17,23 +17,5 @@ extern int __open (__const char *__file, int __oflag, ...);
libc_hidden_proto (__open)
extern int __fcntl (int __fd, int __cmd, ...);
libc_hidden_proto (__fcntl)
-extern int __openat (int __fd, __const char *__file, int __oflag, ...)
- __nonnull ((2));
-libc_hidden_proto (__openat)
-extern int __openat64 (int __fd, __const char *__file, int __oflag, ...)
- __nonnull ((2));
-libc_hidden_proto (__openat64)
-
-
-/* Helper functions for the various *at functions. For Linux. */
-extern void __atfct_seterrno (int errval, int fd, const char *buf)
- attribute_hidden;
-extern void __atfct_seterrno_2 (int errval, int fd1, const char *buf1,
- int fd2, const char *buf2)
- attribute_hidden;
-
-
-/* Flag determining whether the *at system calls are available. */
-extern int __have_atfcts attribute_hidden;
#endif
diff --git a/include/features.h b/include/features.h
index 4eb49a9..e9227bf 100644
--- a/include/features.h
+++ b/include/features.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991,1992,1993,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006
- Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993,1995-2003, 2004 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,7 +38,6 @@
_FILE_OFFSET_BITS=N Select default filesystem interface.
_BSD_SOURCE ISO C, POSIX, and 4.3BSD things.
_SVID_SOURCE ISO C, POSIX, and SVID things.
- _ATFILE_SOURCE Additional *at interfaces.
_GNU_SOURCE All of the above, plus GNU extensions.
_REENTRANT Select additionally reentrant object.
_THREAD_SAFE Same as _REENTRANT, often used by other systems.
@@ -49,7 +47,7 @@
The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__.
If none of these are defined, the default is to have _SVID_SOURCE,
_BSD_SOURCE, and _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
- 200112L. If more than one of these are defined, they accumulate.
+ 199506L. If more than one of these are defined, they accumulate.
For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE
together give you ISO C, 1003.1, and 1003.2, but nothing else.
@@ -71,7 +69,6 @@
__USE_BSD Define 4.3BSD things.
__USE_SVID Define SVID things.
__USE_MISC Define things common to BSD and System V Unix.
- __USE_ATFILE Define *at interfaces and AT_* constants for them.
__USE_GNU Define GNU extensions.
__USE_REENTRANT Define reentrant/thread-safe *_r functions.
__USE_FORTIFY_LEVEL Additional security measures used, according to level.
@@ -105,7 +102,6 @@
#undef __USE_BSD
#undef __USE_SVID
#undef __USE_MISC
-#undef __USE_ATFILE
#undef __USE_GNU
#undef __USE_REENTRANT
#undef __USE_FORTIFY_LEVEL
@@ -151,7 +147,7 @@
# undef _POSIX_SOURCE
# define _POSIX_SOURCE 1
# undef _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 200112L
+# define _POSIX_C_SOURCE 199506L
# undef _XOPEN_SOURCE
# define _XOPEN_SOURCE 600
# undef _XOPEN_SOURCE_EXTENDED
@@ -162,8 +158,6 @@
# define _BSD_SOURCE 1
# undef _SVID_SOURCE
# define _SVID_SOURCE 1
-# undef _ATFILE_SOURCE
-# define _ATFILE_SOURCE 1
#endif
/* If nothing (other than _GNU_SOURCE) is defined,
@@ -187,15 +181,13 @@
/* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2
(and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined). */
-#if ((!defined __STRICT_ANSI__ || (_XOPEN_SOURCE - 0) >= 500) && \
- !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE)
+#if (!defined __STRICT_ANSI__ && !defined _POSIX_SOURCE && \
+ !defined _POSIX_C_SOURCE)
# define _POSIX_SOURCE 1
# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500
# define _POSIX_C_SOURCE 2
-# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600
-# define _POSIX_C_SOURCE 199506L
# else
-# define _POSIX_C_SOURCE 200112L
+# define _POSIX_C_SOURCE 199506L
# endif
#endif
@@ -262,10 +254,6 @@
# define __USE_SVID 1
#endif
-#ifdef _ATFILE_SOURCE
-# define __USE_ATFILE 1
-#endif
-
#ifdef _GNU_SOURCE
# define __USE_GNU 1
#endif
@@ -274,21 +262,12 @@
# define __USE_REENTRANT 1
#endif
-#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
- && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 \
- && (__GNUC_PREREQ (4, 1) \
- || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
- || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
- && __GNUC_MINOR__ == 4 \
- && (__GNUC_PATCHLEVEL__ > 2 \
- || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
-# if _FORTIFY_SOURCE > 1
-# define __USE_FORTIFY_LEVEL 2
-# else
+#if _FORTIFY_SOURCE > 0 && __GNUC_PREREQ (4, 1) && __OPTIMIZE__ > 0
+# if _FORTIFY_SOURCE == 1
# define __USE_FORTIFY_LEVEL 1
+# elif _FORTIFY_SOURCE > 1
+# define __USE_FORTIFY_LEVEL 2
# endif
-#else
-# define __USE_FORTIFY_LEVEL 0
#endif
/* We do support the IEC 559 math functionality, real and complex. */
@@ -310,7 +289,7 @@
/* Major and minor version number of the GNU C library package. Use
these macros to test for features in specific releases. */
#define __GLIBC__ 2
-#define __GLIBC_MINOR__ 5
+#define __GLIBC_MINOR__ 4
#define __GLIBC_PREREQ(maj, min) \
((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
diff --git a/include/fenv.h b/include/fenv.h
index 673eb4b..2063091 100644
--- a/include/fenv.h
+++ b/include/fenv.h
@@ -13,7 +13,5 @@ extern int __feupdateenv (__const fenv_t *__envp);
libm_hidden_proto (feraiseexcept)
libm_hidden_proto (fesetenv)
-libm_hidden_proto (fesetround)
-libm_hidden_proto (feholdexcept)
#endif
diff --git a/include/ifaddrs.h b/include/ifaddrs.h
index 71bdaeb..aa20c35 100644
--- a/include/ifaddrs.h
+++ b/include/ifaddrs.h
@@ -1,23 +1,10 @@
#ifndef _IFADDRS_H
#include <inet/ifaddrs.h>
#include <stdbool.h>
-#include <stdint.h>
libc_hidden_proto (getifaddrs)
libc_hidden_proto (freeifaddrs)
-struct in6addrinfo
-{
- enum {
- in6ai_deprecated = 1,
- in6ai_temporary = 2,
- in6ai_homeaddress = 4
- } flags;
- uint32_t addr[4];
-};
-
-extern void __check_pf (bool *seen_ipv4, bool *seen_ipv6,
- struct in6addrinfo **in6ai, size_t *in6ailen)
- attribute_hidden;
+extern void __check_pf (bool *seen_ipv4, bool *seen_ipv6) attribute_hidden;
#endif /* ifaddrs.h */
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index da46f5e..dcc46cc 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -1,7 +1,6 @@
/* Support macros for making weak and strong aliases for symbols,
and for using symbol sets and linker warnings with GNU ld.
- Copyright (C) 1995-1998,2000-2003,2004,2005,2006
- Free Software Foundation, Inc.
+ Copyright (C) 1995-1998,2000-2003,2004 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
@@ -32,6 +31,8 @@
* ASM_GLOBAL_DIRECTIVE with `.globl' or `.global'.
* ASM_TYPE_DIRECTIVE_PREFIX with `@' or `#' or whatever for .type,
or leave it undefined if there is no .type directive.
+ * HAVE_GNU_LD if using GNU ld, with support for weak symbols in a.out,
+ and for symbol set and warning messages extensions in a.out and ELF.
* HAVE_ELF if using ELF, which supports weak symbols using `.weak'.
* HAVE_ASM_WEAK_DIRECTIVE if we have weak symbols using `.weak'.
* HAVE_ASM_WEAKEXT_DIRECTIVE if we have weak symbols using `.weakext'.
@@ -55,7 +56,7 @@
#include <config.h>
/* The symbols in all the user (non-_) macros are C symbols.
- NO HAVE_ELF implies a.out. */
+ HAVE_GNU_LD without HAVE_ELF implies a.out. */
#if defined HAVE_ASM_WEAK_DIRECTIVE || defined HAVE_ASM_WEAKEXT_DIRECTIVE
# define HAVE_WEAK_SYMBOLS
@@ -219,48 +220,55 @@
/* When a reference to SYMBOL is encountered, the linker will emit a
warning message MSG. */
-#ifdef HAVE_ELF
+#ifdef HAVE_GNU_LD
+# ifdef HAVE_ELF
/* We want the .gnu.warning.SYMBOL section to be unallocated. */
-# ifdef HAVE_ASM_PREVIOUS_DIRECTIVE
-# define __make_section_unallocated(section_string) \
+# ifdef HAVE_ASM_PREVIOUS_DIRECTIVE
+# define __make_section_unallocated(section_string) \
asm (".section " section_string "\n\t.previous");
-# elif defined HAVE_ASM_POPSECTION_DIRECTIVE
-# define __make_section_unallocated(section_string) \
+# elif defined HAVE_ASM_POPSECTION_DIRECTIVE
+# define __make_section_unallocated(section_string) \
asm (".pushsection " section_string "\n\t.popsection");
-# else
-# define __make_section_unallocated(section_string)
-# endif
+# else
+# define __make_section_unallocated(section_string)
+# endif
/* Tacking on "\n\t#" to the section name makes gcc put it's bogus
section attributes on what looks like a comment to the assembler. */
-# ifdef HAVE_SECTION_QUOTES
-# define __sec_comment "\"\n\t#\""
-# else
-# define __sec_comment "\n\t#"
-# endif
-# define link_warning(symbol, msg) \
+# ifdef HAVE_SECTION_QUOTES
+# define __sec_comment "\"\n\t#\""
+# else
+# define __sec_comment "\n\t#"
+# endif
+# define link_warning(symbol, msg) \
__make_section_unallocated (".gnu.warning." #symbol) \
static const char __evoke_link_warning_##symbol[] \
__attribute__ ((used, section (".gnu.warning." #symbol __sec_comment))) \
= msg;
-# define libc_freeres_ptr(decl) \
+# define libc_freeres_ptr(decl) \
__make_section_unallocated ("__libc_freeres_ptrs, \"aw\", %nobits") \
decl __attribute__ ((section ("__libc_freeres_ptrs" __sec_comment)))
-# define __libc_freeres_fn_section \
+# define __libc_freeres_fn_section \
__attribute__ ((section ("__libc_freeres_fn")))
-#else /* Not ELF: a.out */
-# ifdef HAVE_XCOFF
+# else /* Not ELF: a.out */
+# ifdef HAVE_XCOFF
/* XCOFF does not support .stabs.
The native aix linker will remove the .stab and .stabstr sections
The gnu linker will have a fatal error if there is a relocation for
symbol in the .stab section. Silently disable this macro. */
-# define link_warning(symbol, msg)
-# else
-# define link_warning(symbol, msg) \
+# define link_warning(symbol, msg)
+# else
+# define link_warning(symbol, msg) \
asm (".stabs \"" msg "\",30,0,0,0\n\t" \
".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
-# endif /* XCOFF */
+# endif /* XCOFF */
+# define libc_freeres_ptr(decl) decl
+# define __libc_freeres_fn_section
+# endif
+#else
+/* We will never be heard; they will all die horribly. */
+# define link_warning(symbol, msg)
# define libc_freeres_ptr(decl) decl
# define __libc_freeres_fn_section
#endif
@@ -271,7 +279,6 @@
/* A canned warning for sysdeps/stub functions. */
#define stub_warning(name) \
- __make_section_unallocated (".gnu.glibc-stub." #name) \
link_warning (name, \
"warning: " #name " is not implemented and will always fail")
@@ -317,79 +324,92 @@ for linking")
*/
+#ifdef HAVE_GNU_LD
+
/* Symbol set support macros. */
-#ifdef HAVE_ELF
+# ifdef HAVE_ELF
/* Make SYMBOL, which is in the text segment, an element of SET. */
-# define text_set_element(set, symbol) _elf_set_element(set, symbol)
+# define text_set_element(set, symbol) _elf_set_element(set, symbol)
/* Make SYMBOL, which is in the data segment, an element of SET. */
-# define data_set_element(set, symbol) _elf_set_element(set, symbol)
+# define data_set_element(set, symbol) _elf_set_element(set, symbol)
/* Make SYMBOL, which is in the bss segment, an element of SET. */
-# define bss_set_element(set, symbol) _elf_set_element(set, symbol)
+# define bss_set_element(set, symbol) _elf_set_element(set, symbol)
/* These are all done the same way in ELF.
There is a new section created for each set. */
-# ifdef SHARED
+# ifdef SHARED
/* When building a shared library, make the set section writable,
because it will need to be relocated at run time anyway. */
-# define _elf_set_element(set, symbol) \
+# define _elf_set_element(set, symbol) \
static const void *__elf_set_##set##_element_##symbol##__ \
__attribute__ ((used, section (#set))) = &(symbol)
-# else
-# define _elf_set_element(set, symbol) \
+# else
+# define _elf_set_element(set, symbol) \
static const void *const __elf_set_##set##_element_##symbol##__ \
__attribute__ ((used, section (#set))) = &(symbol)
-# endif
+# endif
/* Define SET as a symbol set. This may be required (it is in a.out) to
be able to use the set's contents. */
-# define symbol_set_define(set) symbol_set_declare(set)
+# define symbol_set_define(set) symbol_set_declare(set)
/* Declare SET for use in this module, if defined in another module.
In a shared library, this is always local to that shared object.
For static linking, the set might be wholly absent and so we use
weak references. */
-# define symbol_set_declare(set) \
+# define symbol_set_declare(set) \
extern char const __start_##set[] __symbol_set_attribute; \
extern char const __stop_##set[] __symbol_set_attribute;
-# ifdef SHARED
-# define __symbol_set_attribute attribute_hidden
-# else
-# define __symbol_set_attribute __attribute__ ((weak))
-# endif
+# ifdef SHARED
+# define __symbol_set_attribute attribute_hidden
+# else
+# define __symbol_set_attribute __attribute__ ((weak))
+# endif
/* Return a pointer (void *const *) to the first element of SET. */
-# define symbol_set_first_element(set) ((void *const *) (&__start_##set))
+# define symbol_set_first_element(set) ((void *const *) (&__start_##set))
/* Return true iff PTR (a void *const *) has been incremented
past the last element in SET. */
-# define symbol_set_end_p(set, ptr) ((ptr) >= (void *const *) &__stop_##set)
+# define symbol_set_end_p(set, ptr) ((ptr) >= (void *const *) &__stop_##set)
-#else /* Not ELF: a.out. */
+# else /* Not ELF: a.out. */
-# ifdef HAVE_XCOFF
+# ifdef HAVE_XCOFF
/* XCOFF does not support .stabs.
The native aix linker will remove the .stab and .stabstr sections
The gnu linker will have a fatal error if there is a relocation for
symbol in the .stab section. Silently disable these macros. */
-# define text_set_element(set, symbol)
-# define data_set_element(set, symbol)
-# define bss_set_element(set, symbol)
-# else
-# define text_set_element(set, symbol) \
+# define text_set_element(set, symbol)
+# define data_set_element(set, symbol)
+# define bss_set_element(set, symbol)
+# else
+# define text_set_element(set, symbol) \
asm (".stabs \"" __SYMBOL_PREFIX #set "\",23,0,0," __SYMBOL_PREFIX #symbol)
-# define data_set_element(set, symbol) \
+# define data_set_element(set, symbol) \
asm (".stabs \"" __SYMBOL_PREFIX #set "\",25,0,0," __SYMBOL_PREFIX #symbol)
-# define bss_set_element(set, symbol) ?error Must use initialized data.
-# endif /* XCOFF */
-# define symbol_set_define(set) void *const (set)[1];
+# define bss_set_element(set, symbol) ?error Must use initialized data.
+# endif /* XCOFF */
+# define symbol_set_define(set) void *const (set)[1];
+# define symbol_set_declare(set) extern void *const (set)[1];
+
+# define symbol_set_first_element(set) &(set)[1]
+# define symbol_set_end_p(set, ptr) (*(ptr) == 0)
+
+# endif /* ELF. */
+#else
+/* We cannot do anything in generial. */
+# define text_set_element(set, symbol) asm ("")
+# define data_set_element(set, symbol) asm ("")
+# define bss_set_element(set, symbol) asm ("")
+# define symbol_set_define(set) void *const (set)[1];
# define symbol_set_declare(set) extern void *const (set)[1];
# define symbol_set_first_element(set) &(set)[1]
# define symbol_set_end_p(set, ptr) (*(ptr) == 0)
-
-#endif /* ELF. */
+#endif /* Have GNU ld. */
#if DO_VERSIONING
# define symbol_version(real, name, version) \
@@ -503,7 +523,7 @@ for linking")
}
libc_hidden_weak (foo)
- Similarly for global data. If references to foo within libc.so should
+ Simularly for global data. If references 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)
@@ -518,7 +538,7 @@ for linking")
int foo = INITIAL_FOO_VALUE;
libc_hidden_data_weak (foo)
- If foo is normally just an alias (strong or weak) to some other function,
+ 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:
@@ -562,23 +582,78 @@ for linking")
# define hidden_proto(name, attrs...) \
__hidden_proto (name, __GI_##name, ##attrs)
# define __hidden_proto(name, internal, attrs...) \
+ extern __typeof (name) internal; \
extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
# 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
-# define __hidden_ver1(local, internal, name) \
- extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \
- extern __typeof (name) __EI_##name \
- __attribute__((alias (__hidden_asmname (#local))))
-# define hidden_ver(local, name) __hidden_ver1(local, __GI_##name, name);
-# define hidden_data_ver(local, name) hidden_ver(local, name)
-# define hidden_def(name) __hidden_ver1(__GI_##name, name, name);
-# define hidden_data_def(name) hidden_def(name)
-# define hidden_weak(name) \
- __hidden_ver1(__GI_##name, name, name) __attribute__((weak));
-# define hidden_data_weak(name) hidden_weak(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)
+# ifdef HAVE_ASM_GLOBAL_DOT_NAME
+# define __hidden_dot_def1(original, alias) ASM_LINE_SEP \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+ .set C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
+# else
+# define __hidden_dot_def1(original, alias)
+# endif
+# else
+# define __hidden_def1(original, alias) \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
+# ifdef HAVE_ASM_GLOBAL_DOT_NAME
+# define __hidden_dot_def1(original, alias) 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_dot_def1(original, alias)
+# 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) \
+ __hidden_dot_def1 (__GI_##name, name)));
+# define hidden_data_def(name) \
+ __asm__ (__hidden_def3 (__hidden_def1 (__GI_##name, name)));
+# define hidden_ver(local, name) \
+ __asm__ (__hidden_def3 (__hidden_def1 (local, __GI_##name) \
+ __hidden_dot_def1 (local, __GI_##name)));
+# define hidden_data_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)
+# ifdef HAVE_ASM_GLOBAL_DOT_NAME
+# define __hidden_dot_weak1(original, alias) ASM_LINE_SEP \
+ .weakext C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
+# else
+# define __hidden_dot_weak1(original, alias)
+# endif
+# else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
+# define __hidden_weak1(original, alias) \
+ .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
+# ifdef HAVE_ASM_GLOBAL_DOT_NAME
+# define __hidden_dot_weak1(original, alias) ASM_LINE_SEP \
+ .weak C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+ C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
+# else
+# define __hidden_dot_weak1(original, alias)
+# endif
+# endif
+# define hidden_weak(name) \
+ __asm__ (__hidden_def3 (__hidden_weak1 (__GI_##name, name) \
+ __hidden_dot_weak1 (__GI_##name, name)));
+# define hidden_data_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
@@ -687,24 +762,6 @@ for linking")
# define libresolv_hidden_data_ver(local, name)
#endif
-#if defined NOT_IN_libc && defined IS_IN_librt
-# define librt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
-# define librt_hidden_def(name) hidden_def (name)
-# define librt_hidden_weak(name) hidden_weak (name)
-# define librt_hidden_ver(local, name) hidden_ver (local, name)
-# define librt_hidden_data_def(name) hidden_data_def (name)
-# define librt_hidden_data_weak(name) hidden_data_weak (name)
-# define librt_hidden_data_ver(local, name) hidden_data_ver (local, name)
-#else
-# define librt_hidden_proto(name, attrs...)
-# define librt_hidden_def(name)
-# define librt_hidden_weak(name)
-# define librt_hidden_ver(local, name)
-# define librt_hidden_data_def(name)
-# define librt_hidden_data_weak(name)
-# define librt_hidden_data_ver(local, name)
-#endif
-
#if defined NOT_IN_libc && defined IS_IN_libdl
# define libdl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
# define libdl_hidden_def(name) hidden_def (name)
diff --git a/include/libintl.h b/include/libintl.h
index 8875c94..8f312f1 100644
--- a/include/libintl.h
+++ b/include/libintl.h
@@ -11,7 +11,6 @@ extern char *__dgettext (__const char *__domainname,
extern char *__dcgettext (__const char *__domainname,
__const char *__msgid, int __category)
__attribute_format_arg__ (2);
-libc_hidden_proto (__dcgettext)
extern char *__dcgettext_internal (__const char *__domainname,
__const char *__msgid, int __category)
__attribute_format_arg__ (2)
@@ -42,7 +41,7 @@ extern char *__bind_textdomain_codeset (__const char *__domainname,
__const char *__codeset);
extern const char _libc_intl_domainname[];
-libc_hidden_proto (_libc_intl_domainname)
+extern const char _libc_intl_domainname_internal[] attribute_hidden;
/* Define the macros `_' and `N_' for conveniently marking translatable
strings in the libc source code. We have to make sure we get the
@@ -53,7 +52,12 @@ libc_hidden_proto (_libc_intl_domainname)
# undef _
/* This is defined as an optimizing macro, so use it. */
-# define _(msgid) \
+# if !defined NOT_IN_libc && defined SHARED
+# define _(msgid) \
+ __dcgettext_internal (_libc_intl_domainname_internal, msgid, LC_MESSAGES)
+# else
+# define _(msgid) \
__dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
+#endif
#endif
diff --git a/include/limits.h b/include/limits.h
index 3e9a5df..45cd6f2 100644
--- a/include/limits.h
+++ b/include/limits.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2005
- Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 96, 97, 98, 99, 2000 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
@@ -123,20 +122,20 @@
#if defined __GNUC__ && !defined _GCC_LIMITS_H_
/* `_GCC_LIMITS_H_' is what GCC's file defines. */
# include_next <limits.h>
-#endif
/* The <limits.h> files in some gcc versions don't define LLONG_MIN,
LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for
ages are available. */
-#if defined __USE_ISOC99 && defined __GNUC__
-# ifndef LLONG_MIN
-# define LLONG_MIN (-LLONG_MAX-1)
-# endif
-# ifndef LLONG_MAX
-# define LLONG_MAX __LONG_LONG_MAX__
-# endif
-# ifndef ULLONG_MAX
-# define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
+# ifdef __USE_ISOC99
+# ifndef LLONG_MIN
+# define LLONG_MIN LONG_LONG_MIN
+# endif
+# ifndef LLONG_MAX
+# define LLONG_MAX LONG_LONG_MAX
+# endif
+# ifndef ULLONG_MAX
+# define ULLONG_MAX ULONG_LONG_MAX
+# endif
# endif
#endif
diff --git a/include/link.h b/include/link.h
index 9311256..3078b72 100644
--- a/include/link.h
+++ b/include/link.h
@@ -1,6 +1,6 @@
/* Data structure for communication from the run-time dynamic linker for
loaded ELF shared objects.
- Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002, 2003, 2004 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,32 +18,65 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _PRIVATE_LINK_H
-#define _PRIVATE_LINK_H 1
+#ifndef _LINK_H
+#define _LINK_H 1
-#ifdef _LINK_H
-# error this should be impossible
-#endif
+#include <elf.h>
+#include <dlfcn.h>
+#include <stddef.h>
+#include <sys/types.h>
-/* Get most of the contents from the public header, but we define a
- different `struct link_map' type for private use. The la_objopen
- prototype uses the type, so we have to declare it separately. */
-#define link_map link_map_public
-#define la_objopen la_objopen_wrongproto
-#include <elf/link.h>
-#undef link_map
-#undef la_objopen
+/* We use this macro to refer to ELF types independent of the native wordsize.
+ `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */
+#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type)
+#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t)
+#define _ElfW_1(e,w,t) e##w##t
-struct link_map;
-extern unsigned int la_objopen (struct link_map *__map, Lmid_t __lmid,
- uintptr_t *__cookie);
+#include <bits/elfclass.h> /* Defines __ELF_NATIVE_CLASS. */
+#include <bits/link.h>
+#include <dl-lookupcfg.h>
+#include <tls.h> /* Defines USE_TLS. */
+/* Rendezvous structure used by the run-time dynamic linker to communicate
+ details of shared object loading to the debugger. If the executable's
+ dynamic section has a DT_DEBUG element, the run-time linker sets that
+ element's value to the address where this structure can be found. */
-#include <stddef.h>
-#include <bits/linkmap.h>
-#include <dl-lookupcfg.h>
-#include <tls.h>
-#include <bits/libc-lock.h>
+struct r_debug
+ {
+ int r_version; /* Version number for this protocol. */
+
+ struct link_map *r_map; /* Head of the chain of loaded objects. */
+
+ /* This is the address of a function internal to the run-time linker,
+ that will always be called when the linker begins to map in a
+ library or unmap it, and again when the mapping change is complete.
+ The debugger can set a breakpoint at this address if it wants to
+ notice shared object mapping changes. */
+ ElfW(Addr) r_brk;
+ enum
+ {
+ /* This state value describes the mapping change taking place when
+ the `r_brk' address is called. */
+ RT_CONSISTENT, /* Mapping change is complete. */
+ RT_ADD, /* Beginning to add a new object. */
+ RT_DELETE /* Beginning to remove an object mapping. */
+ } r_state;
+
+ ElfW(Addr) r_ldbase; /* Base address the linker is loaded at. */
+ };
+
+/* This is the instance of that structure used by the dynamic linker. */
+extern struct r_debug _r_debug;
+
+/* This symbol refers to the "dynamic structure" in the `.dynamic' section
+ of whatever module refers to `_DYNAMIC'. So, to find its own
+ `struct r_debug', a program could do:
+ for (dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn)
+ if (dyn->d_tag == DT_DEBUG)
+ r_debug = (struct r_debug *) dyn->d_un.d_ptr;
+ */
+extern ElfW(Dyn) _DYNAMIC[];
/* Some internal data structures of the dynamic linker used in the
@@ -125,7 +158,7 @@ struct link_map
const ElfW(Phdr) *l_phdr; /* Pointer to program header table in core. */
ElfW(Addr) l_entry; /* Entry point location. */
ElfW(Half) l_phnum; /* Number of program header entries. */
- ElfW(Half) l_ldnum; /* Number of dynamic segment entries. */
+ ElfW(Half) l_ldnum; /* Number of dynamic segment entries. */
/* Array of DT_NEEDED dependencies and their dependencies, in
dependency order for symbol lookup (with and without
@@ -142,20 +175,9 @@ struct link_map
/* Symbol hash table. */
Elf_Symndx l_nbuckets;
- Elf32_Word l_gnu_bitmask_idxbits;
- Elf32_Word l_gnu_shift;
- const ElfW(Addr) *l_gnu_bitmask;
- union
- {
- const Elf32_Word *l_gnu_buckets;
- const Elf_Symndx *l_chain;
- };
- union
- {
- const Elf32_Word *l_gnu_chain_zero;
- const Elf_Symndx *l_buckets;
- };
+ const Elf_Symndx *l_buckets, *l_chain;
+ unsigned int l_opencount; /* Counter for direct and indirect usage. */
unsigned int l_direct_opencount; /* Reference count for dlopen/dlclose. */
enum /* Where this object came from. */
{
@@ -177,15 +199,6 @@ struct link_map
should be called on this link map
when relocation finishes. */
unsigned int l_used:1; /* Nonzero if the DSO is used. */
- unsigned int l_auditing:1; /* Nonzero if the DSO is used in auditing. */
- unsigned int l_audit_any_plt:1; /* Nonzero if at least one audit module
- is interested in the PLT interception.*/
- unsigned int l_removed:1; /* Nozero if the object cannot be used anymore
- since it is removed. */
- unsigned int l_contiguous:1; /* Nonzero if inter-segment holes are
- mprotected or if no holes are present at
- all. */
-
/* Array with version names. */
unsigned int l_nversions;
struct r_found_version *l_versions;
@@ -194,14 +207,7 @@ struct link_map
struct r_search_path_struct l_rpath_dirs;
/* Collected results of relocation while profiling. */
- struct reloc_result
- {
- DL_FIXUP_VALUE_TYPE addr;
- struct link_map *bound;
- unsigned int boundndx;
- uint32_t enterexit;
- unsigned int flags;
- } *l_reloc_result;
+ ElfW(Addr) *l_reloc_result;
/* Pointer to the version information if available. */
ElfW(Versym) *l_versyms;
@@ -220,7 +226,7 @@ struct link_map
/* Size of array allocated for 'l_scope'. */
size_t l_scope_max;
/* This is an array defining the lookup scope for this link map.
- There are initially at most three different scope lists. */
+ There are at most three different scope lists. */
struct r_scope_elem **l_scope;
/* A similar array, this time only with the local scope. This is
@@ -249,7 +255,7 @@ struct link_map
ElfW(Word) l_flags;
/* Temporarily used in `dl_close'. */
- int l_idx;
+ unsigned int l_idx;
struct link_map_machine l_mach;
@@ -257,7 +263,11 @@ struct link_map
{
const ElfW(Sym) *sym;
int type_class;
+#ifdef DL_LOOKUP_RETURNS_MAP
struct link_map *value;
+#else
+ ElfW(Addr) value;
+#endif
const ElfW(Sym) *ret;
} l_lookup_cache;
@@ -287,27 +297,24 @@ struct link_map
done. */
ElfW(Addr) l_relro_addr;
size_t l_relro_size;
-
- /* Audit information. This array apparent must be the last in the
- structure. Never add something after it. */
- struct auditstate
- {
- uintptr_t cookie;
- unsigned int bindflags;
- } l_audit[0];
};
+struct dl_phdr_info
+ {
+ ElfW(Addr) dlpi_addr;
+ const char *dlpi_name;
+ const ElfW(Phdr) *dlpi_phdr;
+ ElfW(Half) dlpi_phnum;
-#if __ELF_NATIVE_CLASS == 32
-# define symbind symbind32
-#elif __ELF_NATIVE_CLASS == 64
-# define symbind symbind64
-#else
-# error "__ELF_NATIVE_CLASS must be defined"
-#endif
+ unsigned long long int dlpi_adds;
+ unsigned long long int dlpi_subs;
+ };
+extern int dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
+ size_t size, void *data),
+ void *data);
extern int __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
size_t size, void *data),
void *data);
-#endif /* include/link.h */
+#endif /* link.h */
diff --git a/include/locale.h b/include/locale.h
index 5226001..22770b9 100644
--- a/include/locale.h
+++ b/include/locale.h
@@ -11,8 +11,7 @@ libc_hidden_proto (setlocale)
extern struct loaded_l10nfile *_nl_locale_file_list[] attribute_hidden;
/* Locale object for C locale. */
-extern const struct __locale_struct _nl_C_locobj attribute_hidden;
-#define _nl_C_locobj_ptr ((struct __locale_struct *) &_nl_C_locobj)
+extern struct __locale_struct _nl_C_locobj attribute_hidden;
/* Now define the internal interfaces. */
extern struct lconv *__localeconv (void);
diff --git a/include/malloc.h b/include/malloc.h
index 1a20248..f0164a6 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -12,6 +12,7 @@ extern int __malloc_initialized attribute_hidden;
struct malloc_state;
typedef struct malloc_state *mstate;
+extern mstate _int_new_arena (size_t __ini_size) attribute_hidden;
extern __malloc_ptr_t _int_malloc (mstate __m, size_t __size) attribute_hidden;
extern void _int_free (mstate __m, __malloc_ptr_t __ptr)
attribute_hidden;
diff --git a/include/netinet/in.h b/include/netinet/in.h
index 876f1a4..2018ed2 100644
--- a/include/netinet/in.h
+++ b/include/netinet/in.h
@@ -5,5 +5,6 @@
libc_hidden_proto (bindresvport)
libc_hidden_proto (in6addr_loopback)
libc_hidden_proto (in6addr_any)
+libc_hidden_proto (inet6_option_alloc)
#endif
diff --git a/include/regex.h b/include/regex.h
index a7606c5..81789be 100644
--- a/include/regex.h
+++ b/include/regex.h
@@ -2,42 +2,45 @@
#include <posix/regex.h>
/* Document internal interfaces. */
-extern reg_syntax_t __re_set_syntax (reg_syntax_t syntax);
+extern reg_syntax_t __re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
-extern const char *__re_compile_pattern (const char *pattern, size_t length,
- struct re_pattern_buffer *buffer);
+extern const char *__re_compile_pattern
+ _RE_ARGS ((const char *pattern, size_t length,
+ struct re_pattern_buffer *buffer));
-extern int __re_compile_fastmap (struct re_pattern_buffer *buffer);
+extern int __re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
-extern int __re_search (struct re_pattern_buffer *buffer, const char *string,
- int length, int start, int range,
- struct re_registers *regs);
+extern int __re_search
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
+ int length, int start, int range, struct re_registers *regs));
extern int __re_search_2
- (struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, int range, struct re_registers *regs, int stop);
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2,
+ int start, int range, struct re_registers *regs, int stop));
extern int __re_match
- (struct re_pattern_buffer *buffer, const char *string,
- int length, int start, struct re_registers *regs);
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
+ int length, int start, struct re_registers *regs));
extern int __re_match_2
- (struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, struct re_registers *regs, int stop);
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2,
+ int start, struct re_registers *regs, int stop));
extern void __re_set_registers
- (struct re_pattern_buffer *buffer, struct re_registers *regs,
- unsigned num_regs, regoff_t *starts, regoff_t *ends);
+ _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
+ unsigned num_regs, regoff_t *starts, regoff_t *ends));
-extern int __regcomp (regex_t *__preg, const char *__pattern, int __cflags);
+extern int __regcomp _RE_ARGS ((regex_t *__preg, const char *__pattern,
+ int __cflags));
-extern int __regexec (const regex_t *__preg, const char *__string,
- size_t __nmatch, regmatch_t __pmatch[], int __eflags);
+extern int __regexec _RE_ARGS ((const regex_t *__preg,
+ const char *__string, size_t __nmatch,
+ regmatch_t __pmatch[], int __eflags));
-extern size_t __regerror (int __errcode, const regex_t *__preg,
- char *__errbuf, size_t __errbuf_size);
+extern size_t __regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
+ char *__errbuf, size_t __errbuf_size));
-extern void __regfree (regex_t *__preg);
+extern void __regfree _RE_ARGS ((regex_t *__preg));
#endif
diff --git a/include/resolv.h b/include/resolv.h
index 189e4fb..9c24bd3 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -8,7 +8,6 @@
} \
while (0)
-#include <stdbool.h>
#include <resolv/resolv.h>
#ifdef _RESOLV_H_
@@ -47,11 +46,9 @@ 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);
-extern void __res_iclose (res_state statp, bool free_addr);
libc_hidden_proto (__res_ninit)
libc_hidden_proto (__res_maybe_init)
libc_hidden_proto (__res_nclose)
-libc_hidden_proto (__res_iclose)
libc_hidden_proto (__res_randomid)
libc_hidden_proto (__res_state)
diff --git a/include/rpc/auth.h b/include/rpc/auth.h
index bc433b5..a5e290b 100644
--- a/include/rpc/auth.h
+++ b/include/rpc/auth.h
@@ -22,10 +22,8 @@ DECLARE_NSS_PROTOTYPES (nisplus)
#undef DECLARE_NSS_PROTOTYPES
-extern bool_t xdr_des_block_internal (XDR *__xdrs, des_block *__blkp)
- attribute_hidden;
-extern bool_t xdr_opaque_auth_internal (XDR *, struct opaque_auth *)
- attribute_hidden;
+extern bool_t xdr_des_block_internal (XDR *__xdrs, des_block *__blkp);
+extern bool_t xdr_opaque_auth_internal (XDR *, struct opaque_auth *);
extern AUTH *authunix_create_internal (char *__machname, __uid_t __uid,
__gid_t __gid, int __len,
diff --git a/include/rpc/key_prot.h b/include/rpc/key_prot.h
index 2da5de7..ee30c65 100644
--- a/include/rpc/key_prot.h
+++ b/include/rpc/key_prot.h
@@ -1,15 +1,11 @@
#include <sunrpc/rpc/key_prot.h>
-extern bool_t xdr_cryptkeyres_internal (XDR *xdrs, cryptkeyres *objp)
- attribute_hidden;
-extern bool_t xdr_keystatus_internal (XDR *, keystatus*) attribute_hidden;
-extern bool_t xdr_keybuf_internal (XDR *, keybuf) attribute_hidden;
-extern bool_t xdr_cryptkeyarg_internal (XDR *, cryptkeyarg*) attribute_hidden;
-extern bool_t xdr_cryptkeyarg2_internal (XDR *, cryptkeyarg2*)
- attribute_hidden;
-extern bool_t xdr_key_netstres_internal (XDR *, key_netstres*)
- attribute_hidden;
-extern bool_t xdr_key_netstarg_internal (XDR *, key_netstarg*)
- attribute_hidden;
-extern bool_t xdr_netnamestr_internal (XDR *, netnamestr*) attribute_hidden;
-extern bool_t xdr_unixcred_internal (XDR *, unixcred*) attribute_hidden;
+extern bool_t xdr_cryptkeyres_internal (XDR *xdrs, cryptkeyres *objp);
+extern bool_t xdr_keystatus_internal (XDR *, keystatus*);
+extern bool_t xdr_keybuf_internal (XDR *, keybuf);
+extern bool_t xdr_cryptkeyarg_internal (XDR *, cryptkeyarg*);
+extern bool_t xdr_cryptkeyarg2_internal (XDR *, cryptkeyarg2*);
+extern bool_t xdr_key_netstres_internal (XDR *, key_netstres*);
+extern bool_t xdr_key_netstarg_internal (XDR *, key_netstarg*);
+extern bool_t xdr_netnamestr_internal (XDR *, netnamestr*);
+extern bool_t xdr_unixcred_internal (XDR *, unixcred*);
diff --git a/include/rpc/pmap_clnt.h b/include/rpc/pmap_clnt.h
index 9a22082..2d02ff2 100644
--- a/include/rpc/pmap_clnt.h
+++ b/include/rpc/pmap_clnt.h
@@ -5,8 +5,4 @@ libc_hidden_proto (pmap_getport)
libc_hidden_proto (pmap_set)
libc_hidden_proto (pmap_unset)
-/* Defined in pm_getport.c. */
-extern int __get_socket (struct sockaddr_in *saddr)
- attribute_hidden internal_function;
-
#endif
diff --git a/include/rpc/pmap_prot.h b/include/rpc/pmap_prot.h
index 902faba..e50d5e0 100644
--- a/include/rpc/pmap_prot.h
+++ b/include/rpc/pmap_prot.h
@@ -1,7 +1,5 @@
#include <sunrpc/rpc/pmap_prot.h>
-extern bool_t xdr_pmap_internal (XDR *__xdrs, struct pmap *__regs)
- attribute_hidden;
-extern bool_t xdr_pmaplist_internal (XDR *__xdrs, struct pmaplist **__rp)
- attribute_hidden;
+extern bool_t xdr_pmap_internal (XDR *__xdrs, struct pmap *__regs);
+extern bool_t xdr_pmaplist_internal (XDR *__xdrs, struct pmaplist **__rp);
diff --git a/include/rpc/pmap_rmt.h b/include/rpc/pmap_rmt.h
index 63e41ca..f8e586c 100644
--- a/include/rpc/pmap_rmt.h
+++ b/include/rpc/pmap_rmt.h
@@ -1,7 +1,5 @@
#include <sunrpc/rpc/pmap_rmt.h>
extern bool_t xdr_rmtcall_args_internal (XDR *__xdrs,
- struct rmtcallargs *__crp)
- attribute_hidden;
-extern bool_t xdr_rmtcallres_internal (XDR *__xdrs, struct rmtcallres *__crp)
- attribute_hidden;
+ struct rmtcallargs *__crp);
+extern bool_t xdr_rmtcallres_internal (XDR *__xdrs, struct rmtcallres *__crp);
diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h
index e10d53e..ab43f83 100644
--- a/include/rpc/xdr.h
+++ b/include/rpc/xdr.h
@@ -1,54 +1,36 @@
#include <sunrpc/rpc/xdr.h>
-extern bool_t xdr_void_internal (void) attribute_hidden;
-extern bool_t xdr_bool_internal (XDR *__xdrs, bool_t *__bp) attribute_hidden;
-extern bool_t xdr_u_hyper_internal (XDR *__xdrs, u_quad_t *__ullp)
- attribute_hidden;
-extern bool_t xdr_u_long_internal (XDR *__xdrs, u_long *__ulp)
- attribute_hidden;
-extern bool_t xdr_u_int_internal (XDR *__xdrs, u_int *__up)
- attribute_hidden;
-extern bool_t xdr_u_short_internal (XDR *__xdrs, u_short *__usp)
- attribute_hidden;
-extern bool_t xdr_hyper_internal (XDR *__xdrs, quad_t *__ullp)
- attribute_hidden;
-extern bool_t xdr_long_internal (XDR *__xdrs, long *__ulp)
- attribute_hidden;
-extern bool_t xdr_int_internal (XDR *__xdrs, int *__up)
- attribute_hidden;
-extern bool_t xdr_short_internal (XDR *__xdrs, short *__usp)
- attribute_hidden;
-extern bool_t xdr_enum_internal (XDR *__xdrs, enum_t *__ep)
- attribute_hidden;
+extern bool_t xdr_void_internal (void);
+extern bool_t xdr_bool_internal (XDR *__xdrs, bool_t *__bp);
+extern bool_t xdr_u_hyper_internal (XDR *__xdrs, u_quad_t *__ullp);
+extern bool_t xdr_u_long_internal (XDR *__xdrs, u_long *__ulp);
+extern bool_t xdr_u_int_internal (XDR *__xdrs, u_int *__up);
+extern bool_t xdr_u_short_internal (XDR *__xdrs, u_short *__usp);
+extern bool_t xdr_hyper_internal (XDR *__xdrs, quad_t *__ullp);
+extern bool_t xdr_long_internal (XDR *__xdrs, long *__ulp);
+extern bool_t xdr_int_internal (XDR *__xdrs, int *__up);
+extern bool_t xdr_short_internal (XDR *__xdrs, short *__usp);
+extern bool_t xdr_enum_internal (XDR *__xdrs, enum_t *__ep);
extern bool_t xdr_union_internal (XDR *__xdrs, enum_t *__dscmp, char *__unp,
const struct xdr_discrim *choices,
- xdrproc_t dfault) attribute_hidden;
+ xdrproc_t dfault);
extern bool_t xdr_string_internal (XDR *__xdrs, char **__cpp, u_int __maxsize);
extern bool_t xdr_array_internal (XDR * _xdrs, caddr_t *__addrp,
u_int *__sizep, u_int __maxsize,
- u_int __elsize, xdrproc_t __elproc)
- attribute_hidden;
+ u_int __elsize, xdrproc_t __elproc);
extern bool_t xdr_reference_internal (XDR *__xdrs, caddr_t *__xpp,
- u_int __size, xdrproc_t __proc)
- attribute_hidden;
+ u_int __size, xdrproc_t __proc);
extern bool_t xdr_bytes_internal (XDR *xdrs, char **cpp, u_int *sizep,
- u_int maxsize) attribute_hidden;
-extern bool_t xdr_netobj_internal (XDR *__xdrs, struct netobj *__np)
- attribute_hidden;
-extern bool_t xdr_opaque_internal (XDR *__xdrs, caddr_t __cp, u_int __cnt)
- attribute_hidden;
+ u_int maxsize);
+extern bool_t xdr_netobj_internal (XDR *__xdrs, struct netobj *__np);
+extern bool_t xdr_opaque_internal (XDR *__xdrs, caddr_t __cp, u_int __cnt);
extern void xdrrec_create_internal (XDR *__xdrs, u_int __sendsize,
u_int __recvsize, caddr_t __tcp_handle,
int (*__readit) (char *, char *, int),
- int (*__writeit) (char *, char *, int))
- attribute_hidden;
-extern void xdrmem_create_internal (XDR *, const caddr_t, u_int, enum xdr_op)
- attribute_hidden;
-extern bool_t xdrrec_endofrecord_internal (XDR *__xdrs, bool_t __sendnow)
- attribute_hidden;
-extern bool_t xdrrec_skiprecord_internal (XDR *__xdrs)
- attribute_hidden;
-extern bool_t xdrrec_eof_internal (XDR *__xdrs)
- attribute_hidden;
+ int (*__writeit) (char *, char *, int));
+extern void xdrmem_create_internal (XDR *, const caddr_t, u_int, enum xdr_op);
+extern bool_t xdrrec_endofrecord_internal (XDR *__xdrs, bool_t __sendnow);
+extern bool_t xdrrec_skiprecord_internal (XDR *__xdrs);
+extern bool_t xdrrec_eof_internal (XDR *__xdrs);
libc_hidden_proto (xdrstdio_create)
diff --git a/include/rpcsvc/nis_callback.h b/include/rpcsvc/nis_callback.h
deleted file mode 100644
index dfa9cd3..0000000
--- a/include/rpcsvc/nis_callback.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _RPCSVC_NIS_CALLBACK_H
-#include <nis/rpcsvc/nis_callback.h>
-
-libnsl_hidden_proto (xdr_obj_p)
-libnsl_hidden_proto (xdr_cback_data)
-
-#endif
diff --git a/include/rpcsvc/nislib.h b/include/rpcsvc/nislib.h
index 635c513..9c2be0e 100644
--- a/include/rpcsvc/nislib.h
+++ b/include/rpcsvc/nislib.h
@@ -42,6 +42,4 @@ libnsl_hidden_proto (__nis_default_group)
libnsl_hidden_proto (__nis_default_access)
libnsl_hidden_proto (nis_clone_object)
-extern const_nis_name __nis_domain_of (const_nis_name) __THROW;
-
#endif
diff --git a/include/rpcsvc/yp.h b/include/rpcsvc/yp.h
index 04a973e..cc4e00f 100644
--- a/include/rpcsvc/yp.h
+++ b/include/rpcsvc/yp.h
@@ -14,13 +14,5 @@ libnsl_hidden_proto (xdr_ypresp_all)
libnsl_hidden_proto (xdr_yppush_status)
libnsl_hidden_proto (xdr_ypbind_resptype)
libnsl_hidden_proto (xdr_ypbind_binding)
-libnsl_hidden_proto (xdr_ypreq_nokey)
-libnsl_hidden_proto (xdr_ypmaplist)
-libnsl_hidden_proto (xdr_ypreq_key)
-libnsl_hidden_proto (xdr_ypresp_val)
-libnsl_hidden_proto (xdr_ypresp_maplist)
-libnsl_hidden_proto (xdr_ypresp_order)
-libnsl_hidden_proto (xdr_ypbind_resp)
-libnsl_hidden_proto (xdr_ypresp_master)
#endif
diff --git a/include/rpcsvc/ypupd.h b/include/rpcsvc/ypupd.h
index 7601971..68116e6 100644
--- a/include/rpcsvc/ypupd.h
+++ b/include/rpcsvc/ypupd.h
@@ -2,7 +2,5 @@
#include <nis/rpcsvc/ypupd.h>
libnsl_hidden_proto (xdr_yp_buf)
-libnsl_hidden_proto (xdr_ypdelete_args)
-libnsl_hidden_proto (xdr_ypupdate_args)
#endif
diff --git a/include/sched.h b/include/sched.h
index 7b057ea..4a142c6 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -10,7 +10,6 @@ extern int __sched_setscheduler (__pid_t __pid, int __policy,
libc_hidden_proto (__sched_setscheduler)
extern int __sched_getscheduler (__pid_t __pid);
extern int __sched_yield (void);
-libc_hidden_proto (__sched_yield)
extern int __sched_get_priority_max (int __algorithm);
extern int __sched_get_priority_min (int __algorithm);
extern int __sched_rr_get_interval (__pid_t __pid, struct timespec *__t);
diff --git a/include/signal.h b/include/signal.h
index 6bbfbcf..104ea8f 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -26,9 +26,6 @@ extern int __sigprocmask (int __how,
__const sigset_t *__set, sigset_t *__oset);
extern int __sigsuspend (__const sigset_t *__set);
libc_hidden_proto (__sigsuspend)
-#ifndef NO_CANCELLATION
-extern int __sigsuspend_nocancel (__const sigset_t *__set) attribute_hidden;
-#endif
extern int __sigwait (__const sigset_t *__set, int *__sig);
libc_hidden_proto (__sigwait)
extern int __sigwaitinfo (__const sigset_t *__set, siginfo_t *__info);
@@ -51,9 +48,6 @@ extern int __sigpause (int sig_or_mask, int is_sig);
extern int __default_sigpause (int mask);
extern int __xpg_sigpause (int sig);
-/* Simplified sigemptyset() implementation without the parameter checking. */
-#undef __sigemptyset
-#define __sigemptyset(ss) (__builtin_memset (ss, '\0', sizeof (sigset_t)), 0)
/* Allocate real-time signal with highest/lowest available priority. */
diff --git a/include/stdio.h b/include/stdio.h
index e040380..0c1e8fc 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -38,8 +38,6 @@ extern int __printf_chk (int, const char *, ...);
extern int __fprintf_chk (FILE *, int, const char *, ...);
extern int __vprintf_chk (int, const char *, _G_va_list);
extern int __vfprintf_chk (FILE *, int, const char *, _G_va_list);
-extern char *__fgets_unlocked_chk (char *buf, size_t size, int n, FILE *fp);
-extern char *__fgets_chk (char *buf, size_t size, int n, FILE *fp);
/* Prototypes for compatibility functions. */
extern FILE *__new_tmpfile (void);
@@ -79,8 +77,6 @@ extern int __ftrylockfile (FILE *__stream);
extern int __getc_unlocked (FILE *__fp);
extern wint_t __getwc_unlocked (FILE *__fp);
-extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
extern __const char *__const _sys_errlist_internal[] attribute_hidden;
extern int _sys_nerr_internal attribute_hidden;
@@ -128,7 +124,6 @@ libc_hidden_proto (open_memstream)
libc_hidden_proto (__libc_fatal)
libc_hidden_proto (__vsprintf_chk)
libc_hidden_proto (__vsnprintf_chk)
-libc_hidden_proto (__vfprintf_chk)
# if !defined NOT_IN_libc && defined SHARED && defined DO_VERSIONING \
&& defined HAVE_VISIBILITY_ATTRIBUTE && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE\
diff --git a/include/stdlib.h b/include/stdlib.h
index 27111b8..7723bf6 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -10,8 +10,6 @@
/* Now define the internal interfaces. */
#ifndef __Need_M_And_C
-__BEGIN_DECLS
-
extern __typeof (strtol_l) __strtol_l;
extern __typeof (strtoul_l) __strtoul_l;
extern __typeof (strtoll_l) __strtoll_l;
@@ -25,6 +23,10 @@ libc_hidden_proto (abort)
libc_hidden_proto (getenv)
libc_hidden_proto (bsearch)
libc_hidden_proto (qsort)
+libc_hidden_proto (ecvt_r)
+libc_hidden_proto (fcvt_r)
+libc_hidden_proto (qecvt_r)
+libc_hidden_proto (qfcvt_r)
libc_hidden_proto (lrand48_r)
libc_hidden_proto (wctomb)
libc_hidden_proto (__secure_getenv)
@@ -93,8 +95,8 @@ extern int __cxa_atexit_internal (void (*func) (void *), void *arg, void *d)
extern void __cxa_finalize (void *d);
-extern int __posix_memalign (void **memptr, size_t alignment, size_t size);
-
+extern int __posix_memalign (void **memptr, size_t alignment, size_t size)
+ __attribute_malloc__;
extern void *__libc_memalign (size_t alignment, size_t size)
__attribute_malloc__;
@@ -140,70 +142,48 @@ libc_hidden_proto (____strtoul_l_internal)
libc_hidden_proto (____strtoull_l_internal)
extern __inline double
-__NTH (__strtod_l (__const char *__restrict __nptr, char **__restrict __endptr,
- __locale_t __loc))
+__strtod_l (__const char *__restrict __nptr, char **__restrict __endptr,
+ __locale_t __loc)
{
return ____strtod_l_internal (__nptr, __endptr, 0, __loc);
}
extern __inline long int
-__NTH (__strtol_l (__const char *__restrict __nptr, char **__restrict __endptr,
- int __base, __locale_t __loc))
+__strtol_l (__const char *__restrict __nptr, char **__restrict __endptr,
+ int __base, __locale_t __loc)
{
return ____strtol_l_internal (__nptr, __endptr, __base, 0, __loc);
}
extern __inline unsigned long int
-__NTH (__strtoul_l (__const char *__restrict __nptr,
- char **__restrict __endptr, int __base, __locale_t __loc))
+__strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr,
+ int __base, __locale_t __loc)
{
return ____strtoul_l_internal (__nptr, __endptr, __base, 0, __loc);
}
extern __inline float
-__NTH (__strtof_l (__const char *__restrict __nptr, char **__restrict __endptr,
- __locale_t __loc))
+__strtof_l (__const char *__restrict __nptr, char **__restrict __endptr,
+ __locale_t __loc)
{
return ____strtof_l_internal (__nptr, __endptr, 0, __loc);
}
extern __inline long double
-__NTH (__strtold_l (__const char *__restrict __nptr,
- char **__restrict __endptr, __locale_t __loc))
+__strtold_l (__const char *__restrict __nptr, char **__restrict __endptr,
+ __locale_t __loc)
{
return ____strtold_l_internal (__nptr, __endptr, 0, __loc);
}
__extension__ extern __inline long long int
-__NTH (__strtoll_l (__const char *__restrict __nptr,
- char **__restrict __endptr, int __base, __locale_t __loc))
+__strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr,
+ int __base, __locale_t __loc)
{
return ____strtoll_l_internal (__nptr, __endptr, __base, 0, __loc);
}
__extension__ extern __inline unsigned long long int
-__NTH (__strtoull_l (__const char * __restrict __nptr,
- char **__restrict __endptr, int __base, __locale_t __loc))
+__strtoull_l (__const char * __restrict __nptr, char **__restrict __endptr,
+ int __base, __locale_t __loc)
{
return ____strtoull_l_internal (__nptr, __endptr, __base, 0, __loc);
}
-extern char *__ecvt (double __value, int __ndigit, int *__restrict __decpt,
- int *__restrict __sign);
-extern char *__fcvt (double __value, int __ndigit, int *__restrict __decpt,
- int *__restrict __sign);
-extern char *__gcvt (double __value, int __ndigit, char *__buf);
-extern int __ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
- int *__restrict __sign, char *__restrict __buf,
- size_t __len);
-extern int __fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
- int *__restrict __sign, char *__restrict __buf,
- size_t __len);
-extern char *__qecvt (long double __value, int __ndigit,
- int *__restrict __decpt, int *__restrict __sign);
-extern char *__qfcvt (long double __value, int __ndigit,
- int *__restrict __decpt, int *__restrict __sign);
-extern char *__qgcvt (long double __value, int __ndigit, char *__buf);
-extern int __qecvt_r (long double __value, int __ndigit,
- int *__restrict __decpt, int *__restrict __sign,
- char *__restrict __buf, size_t __len);
-extern int __qfcvt_r (long double __value, int __ndigit,
- int *__restrict __decpt, int *__restrict __sign,
- char *__restrict __buf, size_t __len);
# ifndef NOT_IN_libc
# undef MB_CUR_MAX
@@ -214,11 +194,9 @@ extern int __qfcvt_r (long double __value, int __ndigit,
#endif
-extern void *__default_morecore (ptrdiff_t) __THROW;
+extern void * __default_morecore (ptrdiff_t);
libc_hidden_proto (__default_morecore)
-__END_DECLS
-
#undef __Need_M_And_C
#endif /* include/stdlib.h */
diff --git a/include/string.h b/include/string.h
index c196007..738dd8e 100644
--- a/include/string.h
+++ b/include/string.h
@@ -83,7 +83,6 @@ libc_hidden_proto (__strxfrm_l)
libc_hidden_proto (__strtok_r)
extern char *__strsep_g (char **__stringp, __const char *__delim);
libc_hidden_proto (__strsep_g)
-libc_hidden_proto (strnlen)
libc_hidden_builtin_proto (memchr)
libc_hidden_builtin_proto (memcpy)
diff --git a/include/stub-tag.h b/include/stub-tag.h
index d4d10c8..3004d6f 100644
--- a/include/stub-tag.h
+++ b/include/stub-tag.h
@@ -1,4 +1,5 @@
/* This header is included into every file that declares a stub function.
- It is obsolete now, but hasn't died to avoid removing all those
- #include's. Every such file should use the `stub_warning' macro for
- each of its functions, and that is sufficient. */
+ * The build process looks for this header in .d files to decide whether
+ * or not it needs to scan the corresponding .c file for entries to add to
+ * <gnu/stubs.h>.
+ */
diff --git a/include/stubs-biarch.h b/include/stubs-biarch.h
deleted file mode 100644
index fc086bd..0000000
--- a/include/stubs-biarch.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* This file selects the right generated file of `__stub_FUNCTION' macros
- based on the architecture being compiled for. */
-
-#include <bits/wordsize.h>
-
-#if __WORDSIZE == 32
-# include <gnu/stubs-32.h>
-#elif __WORDSIZE == 64
-# include <gnu/stubs-64.h>
-#else
-# error "unexpected value for __WORDSIZE macro"
-#endif
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
index cd0750b..8ba9804 100644
--- a/include/sys/cdefs.h
+++ b/include/sys/cdefs.h
@@ -2,12 +2,6 @@
#include <misc/sys/cdefs.h>
-/* The compiler will optimize based on the knowledge the parameter is
- not NULL. This will omit tests. A robust implementation cannot allow
- this so when compiling glibc itself we ignore this attribute. */
-#undef __nonnull
-#define __nonnull(params)
-
extern void __chk_fail (void) __attribute__ ((__noreturn__));
libc_hidden_proto (__chk_fail)
rtld_hidden_proto (__chk_fail)
diff --git a/include/sys/mman.h b/include/sys/mman.h
index a4687b3..14e7578 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -11,8 +11,5 @@ extern int __mprotect (void *__addr, size_t __len, int __prot);
/* This one is Linux specific. */
extern void *__mremap (void *__addr, size_t __old_len,
- size_t __new_len, int __flags, ...);
-
-libc_hidden_proto (madvise);
-
+ size_t __new_len, int __may_move);
#endif
diff --git a/include/sys/msg.h b/include/sys/msg.h
index 03e17f9..02bb9ae 100644
--- a/include/sys/msg.h
+++ b/include/sys/msg.h
@@ -1,8 +1,8 @@
#ifndef _SYS_MSG_H
#include <sysvipc/sys/msg.h>
-extern ssize_t __libc_msgrcv (int msqid, void *msgp, size_t msgsz,
- long int msgtyp, int msgflg);
+extern int __libc_msgrcv (int msqid, void *msgp, size_t msgsz, long int msgtyp,
+ int msgflg);
extern int __libc_msgsnd (int msqid, const void *msgp, size_t msgsz,
int msgflg);
diff --git a/include/sys/sendfile.h b/include/sys/sendfile.h
deleted file mode 100644
index abe0976..0000000
--- a/include/sys/sendfile.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <io/sys/sendfile.h>
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 0a22672..937909a 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -59,14 +59,6 @@ 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;
-/* Read N bytes into BUF from socket FD.
- Returns the number read or -1 for errors.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
-extern ssize_t __recv (int __fd, void *__buf, size_t __n, int __flags)
- attribute_hidden;
-
/* 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. */
extern ssize_t __libc_sendto (int __fd, __const void *__buf, size_t __n,
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 66898b1..2e2566d 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -29,10 +29,6 @@ extern __inline__ int __mknod (__const char *__path, __mode_t __mode,
{
return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
}
-libc_hidden_proto (__xmknodat)
-
-libc_hidden_proto (__fxstatat)
-libc_hidden_proto (__fxstatat64)
/* The `stat', `fstat', `lstat' functions have to be handled special since
diff --git a/include/sys/sysinfo.h b/include/sys/sysinfo.h
index d33055a..e126bcb 100644
--- a/include/sys/sysinfo.h
+++ b/include/sys/sysinfo.h
@@ -15,7 +15,4 @@ extern long int __get_phys_pages (void);
/* Return number of available physical pages of memory in the system. */
extern long int __get_avphys_pages (void);
-/* Return maximum number of processes this real user ID can have. */
-extern long int __get_child_max (void);
-
#endif /* sys/sysinfo.h */
diff --git a/include/sys/syslog.h b/include/sys/syslog.h
index 8b0d59d..e018225 100644
--- a/include/sys/syslog.h
+++ b/include/sys/syslog.h
@@ -2,8 +2,3 @@
libc_hidden_proto (syslog)
libc_hidden_proto (vsyslog)
-
-extern void __vsyslog_chk (int __pri, int __flag, __const char *__fmt,
- __gnuc_va_list __ap)
- __attribute__ ((__format__ (__printf__, 3, 0)));
-libc_hidden_proto (__vsyslog_chk)
diff --git a/include/sys/time.h b/include/sys/time.h
index ec40552..c70396f 100644
--- a/include/sys/time.h
+++ b/include/sys/time.h
@@ -20,7 +20,6 @@ extern int __setitimer (enum __itimer_which __which,
attribute_hidden;
extern int __utimes (__const char *__file, const struct timeval __tvp[2])
attribute_hidden;
-extern int __futimes (int fd, __const struct timeval tvp[2]) attribute_hidden;
#ifndef NOT_IN_libc
# define __gettimeofday(tv, tz) INTUSE(__gettimeofday) (tv, tz)
diff --git a/include/sys/xattr.h b/include/sys/xattr.h
deleted file mode 100644
index 64f8f56..0000000
--- a/include/sys/xattr.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <misc/sys/xattr.h>
diff --git a/include/time.h b/include/time.h
index d71f985..795eb5f 100644
--- a/include/time.h
+++ b/include/time.h
@@ -5,8 +5,6 @@
# include <time/time.h>
# include <xlocale.h>
-__BEGIN_DECLS
-
extern __typeof (strftime_l) __strftime_l;
libc_hidden_proto (__strftime_l)
extern __typeof (strptime_l) __strptime_l;
@@ -19,8 +17,6 @@ libc_hidden_proto (localtime)
libc_hidden_proto (strftime)
libc_hidden_proto (strptime)
-librt_hidden_proto (clock_gettime)
-
/* Now define the internal interfaces. */
struct tm;
@@ -81,10 +77,7 @@ extern long int __tzname_max (void);
extern int __nanosleep (__const struct timespec *__requested_time,
struct timespec *__remaining);
-libc_hidden_proto (__nanosleep)
-extern int __nanosleep_nocancel (__const struct timespec *__requested_time,
- struct timespec *__remaining)
- attribute_hidden;
+libc_hidden_proto(__nanosleep)
extern int __getdate_r (__const char *__string, struct tm *__resbufp);
@@ -94,16 +87,13 @@ extern int __getclktck (void);
/* strptime support. */
/* Status of lookup: do we use the locale data or the raw data? */
-#ifndef __cplusplus
-/* C++ cannot deal with using 'not'. */
enum ptime_locale_status { not, loc, raw };
extern char * __strptime_internal (const char *rp, const char *fmt,
struct tm *tm,
enum ptime_locale_status *decided,
- int era_cnt, __locale_t locparam)
+ int era_cnt, __locale_t loc)
internal_function;
-#endif
extern double __difftime (time_t time1, time_t time0);
@@ -113,8 +103,5 @@ extern double __difftime (time_t time1, time_t time0);
#ifndef _ISOMAC
# define CLOCK_IDFIELD_SIZE 3
#endif
-
-__END_DECLS
-
#endif
#endif
diff --git a/include/unistd.h b/include/unistd.h
index f34d53f..f4d6cad 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -15,7 +15,6 @@ libc_hidden_proto (getlogin_r)
libc_hidden_proto (seteuid)
libc_hidden_proto (setegid)
libc_hidden_proto (tcgetpgrp)
-libc_hidden_proto (readlinkat)
/* Now define the internal interfaces. */
extern int __access (__const char *__name, int __type);
@@ -97,10 +96,10 @@ 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 int __getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid);
-extern int __getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid);
-extern int __setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid);
-extern int __setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid);
+extern int __getresuid (__uid_t *__euid, __uid_t *__ruid, __uid_t *__suid);
+extern int __getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid);
+extern int __setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid);
+extern int __setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid);
libc_hidden_proto (__getresuid)
libc_hidden_proto (__getresgid)
libc_hidden_proto (__setresuid)
@@ -162,7 +161,5 @@ extern __pid_t __libc_fork (void);
/* Suspend the process until a signal arrives.
This always returns -1 and sets `errno' to EINTR. */
extern int __libc_pause (void);
-/* Not cancelable variant. */
-extern int __pause_nocancel (void) attribute_hidden;
#endif
diff --git a/include/wchar.h b/include/wchar.h
index 89e9a4f..73bd4a8 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -56,6 +56,7 @@ extern int __wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2)
extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
size_t __n)
__attribute_pure__;
+extern int __wcscoll (__const wchar_t *__s1, __const wchar_t *__s2);
extern size_t __wcslen (__const wchar_t *__s) __attribute_pure__;
extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen)
__attribute_pure__;
@@ -82,8 +83,6 @@ extern size_t __wcsnrtombs (char *__restrict __dst,
__const wchar_t **__restrict __src,
size_t __nwc, size_t __len,
__mbstate_t *__restrict __ps);
-extern wchar_t *__wcsncpy (wchar_t *__restrict __dest,
- __const wchar_t *__restrict __src, size_t __n);
extern wchar_t *__wcpcpy (wchar_t *__dest, __const wchar_t *__src);
extern wchar_t *__wcpncpy (wchar_t *__dest, __const wchar_t *__src,
size_t __n);
@@ -107,22 +106,12 @@ extern int __vswprintf (wchar_t *__restrict __s, size_t __n,
/* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
extern int __fwprintf (__FILE *__restrict __s,
__const wchar_t *__restrict __format, ...)
- /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
+ /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
extern int __vfwprintf (__FILE *__restrict __s,
__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
- /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
-extern int __vfwprintf_chk (FILE *__restrict __s, int __flag,
- const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
/* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
-extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
- int __flag, size_t __s_len,
- __const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
- /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */;
-libc_hidden_proto (__vfwprintf_chk)
-libc_hidden_proto (__vswprintf_chk)
+
/* Internal functions. */
extern size_t __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len,