summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2012-07-22 19:58:41 +0200
committerThomas Schwinge <thomas@codesourcery.com>2012-07-22 19:58:41 +0200
commitef724a37cdb3012efb5b7233eb8b450ad91d3d69 (patch)
tree2334455220f417223cc1a75aebe76302cdffdf5a /include
parent6f276c2517990f6569b961b4d4919cbce570ac45 (diff)
parent47e5dcdf349a1aea5c8997104ef785412f0d34fa (diff)
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Conflicts: configure configure.in elf/rtld.c misc/syslog.c sysdeps/gnu/configure sysdeps/gnu/configure.in sysdeps/mach/hurd/accept4.c sysdeps/mach/hurd/bits/posix_opt.h sysdeps/mach/hurd/dup3.c sysdeps/mach/hurd/i386/init-first.c sysdeps/mach/hurd/kernel-features.h sysdeps/mach/hurd/readlinkat.c
Diffstat (limited to 'include')
-rw-r--r--include/argz.h7
-rw-r--r--include/features.h14
-rw-r--r--include/libc-symbols.h7
-rw-r--r--include/libintl.h10
-rw-r--r--include/libio.h7
-rw-r--r--include/link.h8
-rw-r--r--include/mntent.h15
-rw-r--r--include/shlib-compat.h10
-rw-r--r--include/signal.h1
-rw-r--r--include/stap-probe.h80
-rw-r--r--include/stdc-predef.h8
-rw-r--r--include/stdio.h9
-rw-r--r--include/stdio_ext.h2
-rw-r--r--include/stubs-biarch.h12
-rw-r--r--include/sys/socket.h16
-rw-r--r--include/sys/time.h9
-rw-r--r--include/sys/uio.h8
17 files changed, 140 insertions, 83 deletions
diff --git a/include/argz.h b/include/argz.h
index 4f45b0bf17..4eab0b680b 100644
--- a/include/argz.h
+++ b/include/argz.h
@@ -3,10 +3,7 @@
#include <string/argz.h>
libc_hidden_proto (argz_delete)
-
-extern size_t __argz_count_internal (const char *__argz, size_t __len)
- __attribute_pure__ attribute_hidden;
-extern void __argz_stringify_internal (char *__argz, size_t __len, int __sep)
- attribute_hidden;
+libc_hidden_proto (__argz_count)
+libc_hidden_proto (__argz_stringify)
#endif
diff --git a/include/features.h b/include/features.h
index c347555ead..c69fc2da24 100644
--- a/include/features.h
+++ b/include/features.h
@@ -325,14 +325,18 @@
# define __USE_REENTRANT 1
#endif
-#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
- && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
-# if _FORTIFY_SOURCE > 1
+#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0
+# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
+# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
+# elif !__GNUC_PREREQ (4, 1)
+# warning _FORTIFY_SOURCE requires GCC 4.1 or later
+# elif _FORTIFY_SOURCE > 1
# define __USE_FORTIFY_LEVEL 2
# else
# define __USE_FORTIFY_LEVEL 1
# endif
-#else
+#endif
+#ifndef __USE_FORTIFY_LEVEL
# define __USE_FORTIFY_LEVEL 0
#endif
@@ -352,7 +356,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__ 15
+#define __GLIBC_MINOR__ 16
#define __GLIBC_PREREQ(maj, min) \
((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 44b4d80a55..12b3639647 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -556,7 +556,12 @@ for linking")
# define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
# define libc_hidden_def(name) hidden_def (name)
# define libc_hidden_weak(name) hidden_weak (name)
-# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
+# ifdef LINK_OBSOLETE_RPC
+ /* libc_hidden_nolink_sunrpc should only get used in sunrpc code. */
+# define libc_hidden_nolink_sunrpc(name, version) hidden_def (name)
+# else
+# define libc_hidden_nolink_sunrpc(name, version) hidden_nolink (name, libc, version)
+# endif
# define libc_hidden_ver(local, name) hidden_ver (local, name)
# define libc_hidden_data_def(name) hidden_data_def (name)
# define libc_hidden_data_weak(name) hidden_data_weak (name)
diff --git a/include/libintl.h b/include/libintl.h
index d15a6c0a05..0551a04084 100644
--- a/include/libintl.h
+++ b/include/libintl.h
@@ -12,10 +12,6 @@ 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)
- attribute_hidden;
extern char *__ngettext (const char *__msgid1, const char *__msgid2,
unsigned long int __n)
@@ -28,12 +24,6 @@ extern char *__dcngettext (const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category)
__attribute_format_arg__ (2) __attribute_format_arg__ (3);
-extern char *__dcngettext_internal (const char *__domainname,
- const char *__msgid1,
- const char *__msgid2,
- unsigned long int __n, int __category)
- __attribute_format_arg__ (2) __attribute_format_arg__ (3)
- attribute_hidden;
extern char *__textdomain (const char *__domainname);
extern char *__bindtextdomain (const char *__domainname,
diff --git a/include/libio.h b/include/libio.h
index aca7000f8e..735941d230 100644
--- a/include/libio.h
+++ b/include/libio.h
@@ -10,6 +10,13 @@ libc_hidden_proto (__uflow)
libc_hidden_proto (__woverflow)
libc_hidden_proto (__wunderflow)
libc_hidden_proto (__wuflow)
+libc_hidden_proto (_IO_free_backup_area)
+libc_hidden_proto (_IO_free_wbackup_area)
+libc_hidden_proto (_IO_padn)
+libc_hidden_proto (_IO_putc)
+libc_hidden_proto (_IO_sgetn)
+libc_hidden_proto (_IO_vfprintf)
+libc_hidden_proto (_IO_vfscanf)
#if defined _IO_MTSAFE_IO && _IO_lock_inexpensive
# undef _IO_flockfile
diff --git a/include/link.h b/include/link.h
index 2eb3179475..f0c8ad521f 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, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 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
@@ -191,6 +191,9 @@ struct link_map
during LD_TRACE_PRELINKING=1
contains any DT_SYMBOLIC
libraries. */
+ unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
+ freed, ie. not allocated with
+ the dummy malloc in ld.so. */
/* Collected information about own RPATH directories. */
struct r_search_path_struct l_rpath_dirs;
@@ -239,9 +242,6 @@ struct link_map
/* List of object in order of the init and fini calls. */
struct link_map **l_initfini;
- /* The init and fini list generated at startup, saved when the
- object is also loaded dynamically. */
- struct link_map **l_orig_initfini;
/* List of the dependencies introduced through symbol binding. */
struct link_map_reldeps
diff --git a/include/mntent.h b/include/mntent.h
index 3a75f0ddfd..b34674aa3e 100644
--- a/include/mntent.h
+++ b/include/mntent.h
@@ -3,24 +3,15 @@
/* Now define the internal interfaces. */
extern FILE *__setmntent (const char *__file, const char *__mode);
-extern FILE *__setmntent_internal (const char *__file, const char *__mode);
extern struct mntent *__getmntent_r (FILE *__stream,
struct mntent *__result,
char *__buffer, int __bufsize);
-extern struct mntent *__getmntent_r_internal (FILE *__stream,
- struct mntent *__result,
- char *__buffer, int __bufsize)
- attribute_hidden;
extern int __addmntent (FILE *__stream, const struct mntent *__mnt);
extern int __endmntent (FILE *__stream);
-extern int __endmntent_internal (FILE *__stream) attribute_hidden;
extern char *__hasmntopt (const struct mntent *__mnt, const char *__opt);
-#ifndef NOT_IN_libc
-# define __setmntent(file, mode) INTUSE(__setmntent) (file, mode)
-# define __endmntent(stream) INTUSE(__endmntent) (stream)
-# define __getmntent_r(stream, result, buffer, bufsize) \
- INTUSE(__getmntent_r) (stream, result, buffer, bufsize)
-#endif
+libc_hidden_proto (__setmntent)
+libc_hidden_proto (__getmntent_r)
+libc_hidden_proto (__endmntent)
#endif
diff --git a/include/shlib-compat.h b/include/shlib-compat.h
index 19f1041b05..912f5423e5 100644
--- a/include/shlib-compat.h
+++ b/include/shlib-compat.h
@@ -91,4 +91,14 @@
#endif
+# ifdef LINK_OBSOLETE_RPC
+/* Export the symbol for both static and dynamic linking. */
+# define libc_sunrpc_symbol(name, aliasname, version) \
+ strong_alias (name, aliasname)
+# else
+/* Export the symbol only for shared-library compatibility. */
+# define libc_sunrpc_symbol(name, aliasname, version) \
+ compat_symbol (libc, name, aliasname, version);
+# endif
+
#endif /* shlib-compat.h */
diff --git a/include/signal.h b/include/signal.h
index c43f2abeec..a019395882 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -14,6 +14,7 @@ libc_hidden_proto (__sigpause)
libc_hidden_proto (raise)
libc_hidden_proto (__libc_current_sigrtmin)
libc_hidden_proto (__libc_current_sigrtmax)
+libc_hidden_proto (_sys_siglist)
/* Now define the internal interfaces. */
extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler);
diff --git a/include/stap-probe.h b/include/stap-probe.h
new file mode 100644
index 0000000000..1051ad1980
--- /dev/null
+++ b/include/stap-probe.h
@@ -0,0 +1,80 @@
+/* Macros for defining Systemtap <sys/sdt.h> static probe points.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _STAP_PROBE_H
+#define _STAP_PROBE_H 1
+
+#ifdef USE_STAP_PROBE
+
+# include <sys/sdt.h>
+
+/* Our code uses one macro LIBC_PROBE (name, n, arg1, ..., argn).
+
+ Without USE_STAP_PROBE, that does nothing but evaluates all
+ its arguments (to prevent bit rot, unlike e.g. assert).
+
+ Systemtap's header defines the macros STAP_PROBE (provider, name) and
+ STAP_PROBEn (provider, name, arg1, ..., argn). For "provider" we paste
+ in the IN_LIB name (libc, libpthread, etc.) automagically. */
+
+# ifndef NOT_IN_libc
+# define IN_LIB libc
+# elif !defined IN_LIB
+/* This is intentionally defined with extra unquoted commas in it so
+ that macro substitution will bomb out when it is used. We don't
+ just use #error here, so that this header can be included by
+ other headers that use LIBC_PROBE inside their own macros. We
+ only want such headers to fail to compile if those macros are
+ actually used in a context where IN_LIB has not been defined. */
+# define IN_LIB ,,,missing -DIN_LIB=... -- not extra-lib.mk?,,,
+# endif
+
+# define LIBC_PROBE(name, n, ...) \
+ LIBC_PROBE_1 (IN_LIB, name, n, ## __VA_ARGS__)
+
+# define LIBC_PROBE_1(lib, name, n, ...) \
+ STAP_PROBE##n (lib, name, ## __VA_ARGS__)
+
+# define STAP_PROBE0 STAP_PROBE
+
+# define LIBC_PROBE_ASM(name, template) \
+ STAP_PROBE_ASM (IN_LIB, name, template)
+
+# define LIBC_PROBE_ASM_OPERANDS STAP_PROBE_ASM_OPERANDS
+
+#else /* Not USE_STAP_PROBE. */
+
+# ifndef __ASSEMBLER__
+/* Evaluate all the arguments and verify that N matches their number. */
+# define LIBC_PROBE(name, n, ...) \
+ do { \
+ _Bool __libc_probe_args[] = { 0, ## __VA_ARGS__ }; \
+ _Bool __libc_probe_verify_n[(sizeof __libc_probe_args / sizeof (_Bool)) \
+ == n + 1 ? 1 : -1]; \
+ (void) __libc_probe_verify_n; \
+ } while (0)
+# else
+# define LIBC_PROBE(name, n, ...) /* Nothing. */
+# endif
+
+# define LIBC_PROBE_ASM(name, template) /* Nothing. */
+# define LIBC_PROBE_ASM_OPERANDS(n, ...) /* Nothing. */
+
+#endif /* USE_STAP_PROBE. */
+
+#endif /* stap-probe.h */
diff --git a/include/stdc-predef.h b/include/stdc-predef.h
index ef10c1672e..788669f1fe 100644
--- a/include/stdc-predef.h
+++ b/include/stdc-predef.h
@@ -30,7 +30,11 @@
#define __STDC_IEC_559__ 1
#define __STDC_IEC_559_COMPLEX__ 1
-/* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.1. */
-#define __STDC_ISO_10646__ 200009L
+/* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) /
+ Unicode 6.0. */
+#define __STDC_ISO_10646__ 201103L
+
+/* We do not support C11 <threads.h>. */
+#define __STDC_NO_THREADS__ 1
#endif
diff --git a/include/stdio.h b/include/stdio.h
index bd0209aaac..9f2ea31bc9 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -116,13 +116,8 @@ extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
extern const char *const _sys_errlist_internal[] attribute_hidden;
extern int _sys_nerr_internal attribute_hidden;
-extern int __asprintf_internal (char **__restrict __ptr,
- const char *__restrict __fmt, ...)
- attribute_hidden __attribute__ ((__format__ (__printf__, 2, 3)));
+libc_hidden_proto (__asprintf)
# if !defined NOT_IN_libc
-# define __asprintf(ptr, fmt, args...) \
- INTUSE(__asprintf) (ptr, fmt, ##args)
-
extern _IO_FILE *_IO_new_fopen (const char*, const char*);
# define fopen(fname, mode) _IO_new_fopen (fname, mode)
extern _IO_FILE *_IO_new_fdopen (int, const char*);
@@ -176,7 +171,7 @@ extern char *__REDIRECT (__gets_warn, (char *__str), gets)
__wur __warnattr ("please use fgets or getline instead, gets can't "
"specify buffer size");
-__extern_always_inline __wur char *
+__fortify_function __wur char *
gets (char *__str)
{
if (__bos (__str) != (size_t) -1)
diff --git a/include/stdio_ext.h b/include/stdio_ext.h
index c7b77246b7..354146f8e8 100644
--- a/include/stdio_ext.h
+++ b/include/stdio_ext.h
@@ -2,7 +2,7 @@
# include <stdio-common/stdio_ext.h>
-extern int __fsetlocking_internal (FILE *__fp, int __type) attribute_hidden;
+libc_hidden_proto (__fsetlocking)
#define __fsetlocking(fp, type) \
({ int __result = ((fp->_flags & _IO_USER_LOCK) \
diff --git a/include/stubs-biarch.h b/include/stubs-biarch.h
deleted file mode 100644
index fc086bd894..0000000000
--- 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/socket.h b/include/sys/socket.h
index eac82136dd..e356b75b99 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -57,8 +57,7 @@ extern ssize_t __libc_recvfrom (int __fd, void *__restrict __buf, size_t __n,
extern int __libc_connect (int __fd, __CONST_SOCKADDR_ARG __addr,
socklen_t __len);
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;
+libc_hidden_proto (__connect)
/* Read N bytes into BUF from socket FD.
Returns the number read or -1 for errors.
@@ -144,17 +143,8 @@ extern int __libc_accept4 (int __fd, __SOCKADDR_ARG __addr,
# define SA_LEN(_x) (_x)->sa_len
#else
extern int __libc_sa_len (sa_family_t __af);
-extern int __libc_sa_len_internal (sa_family_t __af) attribute_hidden;
-# ifndef NOT_IN_libc
-# define SA_LEN(_x) INTUSE(__libc_sa_len)((_x)->sa_family)
-# else
-# define SA_LEN(_x) __libc_sa_len((_x)->sa_family)
-# endif
-#endif
-
-
-#ifndef NOT_IN_libc
-# define __connect(fd, addr, len) INTUSE(__connect) (fd, addr, len)
+libc_hidden_proto (__libc_sa_len)
+# define SA_LEN(_x) __libc_sa_len((_x)->sa_family)
#endif
#ifdef SOCK_CLOEXEC
diff --git a/include/sys/time.h b/include/sys/time.h
index d5de942ed6..599e189bcd 100644
--- a/include/sys/time.h
+++ b/include/sys/time.h
@@ -5,9 +5,8 @@
/* Now document the internal interfaces. */
extern int __gettimeofday (struct timeval *__tv,
struct timezone *__tz);
-extern int __gettimeofday_internal (struct timeval *__tv,
- struct timezone *__tz)
- attribute_hidden;
+libc_hidden_proto (__gettimeofday)
+libc_hidden_proto (gettimeofday)
extern int __settimeofday (const struct timeval *__tv,
const struct timezone *__tz)
attribute_hidden;
@@ -23,9 +22,5 @@ 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)
-#endif
-
#endif
#endif
diff --git a/include/sys/uio.h b/include/sys/uio.h
index 0ec9ab09a8..7d67d67c0a 100644
--- a/include/sys/uio.h
+++ b/include/sys/uio.h
@@ -3,13 +3,13 @@
#ifndef _ISOMAC
/* Now define the internal interfaces. */
-extern ssize_t __readv (int __fd, const struct iovec *__vector,
+extern ssize_t __readv (int __fd, const struct iovec *__iovec,
int __count);
-extern ssize_t __libc_readv (int __fd, const struct iovec *__vector,
+extern ssize_t __libc_readv (int __fd, const struct iovec *__iovec,
int __count);
-extern ssize_t __writev (int __fd, const struct iovec *__vector,
+extern ssize_t __writev (int __fd, const struct iovec *__iovec,
int __count);
-extern ssize_t __libc_writev (int __fd, const struct iovec *__vector,
+extern ssize_t __libc_writev (int __fd, const struct iovec *__iovec,
int __count);
#endif
#endif