summaryrefslogtreecommitdiff
path: root/libc/include
diff options
context:
space:
mode:
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/argz.h7
-rw-r--r--libc/include/libintl.h10
-rw-r--r--libc/include/libio.h7
-rw-r--r--libc/include/shlib-compat.h10
-rw-r--r--libc/include/stap-probe.h80
-rw-r--r--libc/include/stdc-predef.h5
-rw-r--r--libc/include/stdio.h7
-rw-r--r--libc/include/stdio_ext.h2
-rw-r--r--libc/include/sys/time.h9
9 files changed, 106 insertions, 31 deletions
diff --git a/libc/include/argz.h b/libc/include/argz.h
index 4f45b0bf1..4eab0b680 100644
--- a/libc/include/argz.h
+++ b/libc/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/libc/include/libintl.h b/libc/include/libintl.h
index d15a6c0a0..0551a0408 100644
--- a/libc/include/libintl.h
+++ b/libc/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/libc/include/libio.h b/libc/include/libio.h
index aca7000f8..735941d23 100644
--- a/libc/include/libio.h
+++ b/libc/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/libc/include/shlib-compat.h b/libc/include/shlib-compat.h
index 7a84f299f..28fdd9987 100644
--- a/libc/include/shlib-compat.h
+++ b/libc/include/shlib-compat.h
@@ -109,4 +109,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/libc/include/stap-probe.h b/libc/include/stap-probe.h
new file mode 100644
index 000000000..1051ad198
--- /dev/null
+++ b/libc/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/libc/include/stdc-predef.h b/libc/include/stdc-predef.h
index 823bf5810..b713d2ca1 100644
--- a/libc/include/stdc-predef.h
+++ b/libc/include/stdc-predef.h
@@ -29,8 +29,9 @@
/* Define __STDC_IEC_559__ and other similar macros. */
#include <bits/predefs.h>
-/* 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
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index a2c73a452..9f2ea31bc 100644
--- a/libc/include/stdio.h
+++ b/libc/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*);
diff --git a/libc/include/stdio_ext.h b/libc/include/stdio_ext.h
index c7b77246b..354146f8e 100644
--- a/libc/include/stdio_ext.h
+++ b/libc/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/libc/include/sys/time.h b/libc/include/sys/time.h
index d5de942ed..599e189bc 100644
--- a/libc/include/sys/time.h
+++ b/libc/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