summaryrefslogtreecommitdiff
path: root/libc/include
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-05-12 15:44:41 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-05-12 15:44:41 +0000
commit62eb53f68d92687a028f3c515489b30e3df1d979 (patch)
tree7fcf1c95d89caecbbff5d932778f04670c151c52 /libc/include
parentc29b18b38ccefba22c13b33dd801acba0ae92523 (diff)
Merge changes between r18392 and r18519 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@18520 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/features.h12
-rw-r--r--libc/include/libc-symbols.h11
-rw-r--r--libc/include/stdc-predef.h3
-rw-r--r--libc/include/sys/socket.h3
-rw-r--r--libc/include/unistd.h3
5 files changed, 24 insertions, 8 deletions
diff --git a/libc/include/features.h b/libc/include/features.h
index 201cda665..798da1e76 100644
--- a/libc/include/features.h
+++ b/libc/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
diff --git a/libc/include/libc-symbols.h b/libc/include/libc-symbols.h
index 255985927..7f37afb19 100644
--- a/libc/include/libc-symbols.h
+++ b/libc/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-2006,2008,2009,2011,2012
- 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
@@ -571,13 +570,19 @@ for linking")
# define hidden_data_weak(name)
# define hidden_data_def(name)
# define hidden_data_ver(local, name)
+# define hidden_nolink(name, lib, version)
#endif
#if !defined NOT_IN_libc
# 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/libc/include/stdc-predef.h b/libc/include/stdc-predef.h
index c2896edda..823bf5810 100644
--- a/libc/include/stdc-predef.h
+++ b/libc/include/stdc-predef.h
@@ -32,4 +32,7 @@
/* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.1. */
#define __STDC_ISO_10646__ 200009L
+/* We do not support C11 <threads.h>. */
+#define __STDC_NO_THREADS__ 1
+
#endif
diff --git a/libc/include/sys/socket.h b/libc/include/sys/socket.h
index 2ae3428bd..eac82136d 100644
--- a/libc/include/sys/socket.h
+++ b/libc/include/sys/socket.h
@@ -135,6 +135,9 @@ extern int __libc_accept (int __fd, __SOCKADDR_ARG __addr,
socklen_t *__restrict __addr_len)
__THROW;
libc_hidden_proto (accept)
+extern int __libc_accept4 (int __fd, __SOCKADDR_ARG __addr,
+ socklen_t *__restrict __addr_len, int __flags)
+ __THROW;
/* Return the length of a `sockaddr' structure. */
#ifdef _HAVE_SA_LEN
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index 2e6101b0d..7971a8a71 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -80,7 +80,8 @@ char *__canonicalize_directory_name_internal (const char *__thisdir,
extern int __dup (int __fd);
extern int __dup2 (int __fd, int __fd2);
libc_hidden_proto (__dup2)
-libc_hidden_proto (dup3)
+extern int __dup3 (int __fd, int __fd2, int flags);
+libc_hidden_proto (__dup3)
extern int __execve (const char *__path, char *const __argv[],
char *const __envp[]);
extern long int __pathconf (const char *__path, int __name);