diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2013-05-23 23:39:49 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2013-05-23 23:39:49 +0200 |
commit | 05b1dc510b8209201bc46b2e54427d85eccd7325 (patch) | |
tree | 972d880ecd5af5afe0278dc5d3846a5bf72da983 /include | |
parent | 248f60e7cd262bd1777b7ca9aea64fd86e18a40a (diff) | |
parent | b934acf0e93c5a220551ed6e686bb9d45a24a8cc (diff) |
Merge commit 'refs/top-bases/t/verify.h' into t/verify.h
Diffstat (limited to 'include')
-rw-r--r-- | include/errno.h | 4 | ||||
-rw-r--r-- | include/libc-symbols.h | 3 | ||||
-rw-r--r-- | include/link.h | 3 | ||||
-rw-r--r-- | include/netdb.h | 22 | ||||
-rw-r--r-- | include/programs/xmalloc.h | 33 | ||||
-rw-r--r-- | include/rounding-mode.h | 2 | ||||
-rw-r--r-- | include/set-hooks.h | 2 | ||||
-rw-r--r-- | include/stdlib.h | 5 | ||||
-rw-r--r-- | include/sys/cdefs.h | 2 |
9 files changed, 58 insertions, 18 deletions
diff --git a/include/errno.h b/include/errno.h index 98c6080528..f1b93a881b 100644 --- a/include/errno.h +++ b/include/errno.h @@ -17,7 +17,7 @@ # define errno rtld_errno extern int rtld_errno attribute_hidden; -# else +# elif !defined NOT_IN_libc || defined IN_LIB # include <tls.h> @@ -29,7 +29,7 @@ extern int rtld_errno attribute_hidden; # endif extern __thread int errno attribute_tls_model_ie; -# endif /* RTLD_PRIVATE_ERRNO */ +# endif /* !NOT_IN_libc || IN_LIB */ # define __set_errno(val) (errno = (val)) diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 0608320afc..f043ce0850 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -228,8 +228,7 @@ /* 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") + link_warning (name, #name " is not implemented and will always fail") /* Warning for linking functions calling dlopen into static binaries. */ #ifdef SHARED diff --git a/include/link.h b/include/link.h index 230e95d6c8..7dc3cd1e32 100644 --- a/include/link.h +++ b/include/link.h @@ -302,6 +302,9 @@ struct link_map /* Index of the module in the dtv array. */ size_t l_tls_modid; + /* Number of thread_local objects constructed by this DSO. */ + size_t l_tls_dtor_count; + /* Information used to change permission after the relocations are done. */ ElfW(Addr) l_relro_addr; diff --git a/include/netdb.h b/include/netdb.h index 3f2ae06451..8a569baef3 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -3,18 +3,20 @@ #ifndef _ISOMAC /* Macros for accessing h_errno from inside libc. */ -# undef h_errno -# ifdef _LIBC_REENTRANT -# include <tls.h> -# ifndef NOT_IN_libc -# define h_errno __libc_h_errno -# else -# define h_errno h_errno /* For #ifndef h_errno tests. */ -# endif +# if !defined NOT_IN_libc || defined IN_LIB +# undef h_errno +# ifdef _LIBC_REENTRANT +# include <tls.h> +# ifndef NOT_IN_libc +# define h_errno __libc_h_errno +# else +# define h_errno h_errno /* For #ifndef h_errno tests. */ +# endif extern __thread int h_errno attribute_tls_model_ie; -# else +# else extern int h_errno; -# endif /* _LIBC_REENTRANT */ +# endif /* _LIBC_REENTRANT */ +# endif /* !NOT_IN_libc || IN_LIB */ # define __set_h_errno(x) (h_errno = (x)) libc_hidden_proto (hstrerror) diff --git a/include/programs/xmalloc.h b/include/programs/xmalloc.h new file mode 100644 index 0000000000..f4278852be --- /dev/null +++ b/include/programs/xmalloc.h @@ -0,0 +1,33 @@ +/* Memory related definitions for program modules. + Copyright (C) 1998-2013 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published + by the Free Software Foundation; version 2 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _XMALLOC_H +#define _XMALLOC_H 1 + +#include <sys/cdefs.h> +#include <stddef.h> + +/* Prototypes for a few program-wide used functions. */ +extern void *xmalloc (size_t n) + __attribute_malloc__ __attribute_alloc_size__ ((1)); +extern void *xcalloc (size_t n, size_t s) + __attribute_malloc__ __attribute_alloc_size__ ((1, 2)); +extern void *xrealloc (void *o, size_t n) + __attribute_malloc__ __attribute_alloc_size__ ((2)); +extern char *xstrdup (const char *) __attribute_malloc__; + +#endif /* xmalloc.h */ diff --git a/include/rounding-mode.h b/include/rounding-mode.h index 2f1ab55a80..c765551979 100644 --- a/include/rounding-mode.h +++ b/include/rounding-mode.h @@ -39,7 +39,7 @@ MORE_BITS is true if the number is not exactly equal to the truncated value or the half-way value, false otherwise. */ -static inline bool +static bool round_away (bool negative, bool last_digit_odd, bool half_bit, bool more_bits, int mode) { diff --git a/include/set-hooks.h b/include/set-hooks.h index 5c751ee372..e58f444d42 100644 --- a/include/set-hooks.h +++ b/include/set-hooks.h @@ -41,7 +41,7 @@ # define RUN_HOOK(NAME, ARGS) \ do { \ - void *const *__unbounded ptr; \ + void *const *ptr; \ for (ptr = (void *const *) symbol_set_first_element (NAME); \ ! symbol_set_end_p (NAME, ptr); ++ptr) \ (*(__##NAME##_hook_function_t *) *ptr) ARGS; \ diff --git a/include/stdlib.h b/include/stdlib.h index 2e536641b9..db1812d85a 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -100,6 +100,11 @@ extern int __cxa_atexit (void (*func) (void *), void *arg, void *d); extern int __cxa_atexit_internal (void (*func) (void *), void *arg, void *d) attribute_hidden; +extern int __cxa_thread_atexit_impl (void (*func) (void *), void *arg, + void *d); +extern void __call_tls_dtors (void); +libc_hidden_proto (__call_tls_dtors); + extern void __cxa_finalize (void *d); extern int __posix_memalign (void **memptr, size_t alignment, size_t size); diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index 71baa1a2d2..524fe57a25 100644 --- a/include/sys/cdefs.h +++ b/include/sys/cdefs.h @@ -13,8 +13,6 @@ extern void __chk_fail (void) __attribute__ ((__noreturn__)); libc_hidden_proto (__chk_fail) rtld_hidden_proto (__chk_fail) - -# define __attribute_alloc_size(...) __attribute__ ((alloc_size (__VA_ARGS__))) #endif #endif |