summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-11-15 08:22:03 +0000
committerJakub Jelinek <jakub@redhat.com>2005-11-15 08:22:03 +0000
commit22d7fbdbae4032639461a7a081762a05deee0529 (patch)
treeff70bd4613f1f05823b2417b2687449d73ac45b0 /include
parent1beea155aecf2e7d6bfa1399b7c0f4f53dde408c (diff)
Updated to fedora-glibc-20051115T0809
Diffstat (limited to 'include')
-rw-r--r--include/fcntl.h4
-rw-r--r--include/libc-symbols.h130
-rw-r--r--include/resolv.h2
-rw-r--r--include/string.h2
4 files changed, 61 insertions, 77 deletions
diff --git a/include/fcntl.h b/include/fcntl.h
index 7764f1cd62..6080faba3e 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -18,4 +18,8 @@ libc_hidden_proto (__open)
extern int __fcntl (int __fd, int __cmd, ...);
libc_hidden_proto (__fcntl)
+/* Helper functions for the various *at functions. For Linux. */
+extern void __atfct_seterrno (int errval, int fd, const char *buf)
+ attribute_hidden;
+
#endif
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 4fef305814..8ee940719e 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -31,8 +31,6 @@
* 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'.
@@ -56,7 +54,7 @@
#include <config.h>
/* The symbols in all the user (non-_) macros are C symbols.
- HAVE_GNU_LD without HAVE_ELF implies a.out. */
+ NO HAVE_ELF implies a.out. */
#if defined HAVE_ASM_WEAK_DIRECTIVE || defined HAVE_ASM_WEAKEXT_DIRECTIVE
# define HAVE_WEAK_SYMBOLS
@@ -220,55 +218,48 @@
/* When a reference to SYMBOL is encountered, the linker will emit a
warning message MSG. */
-#ifdef HAVE_GNU_LD
-# ifdef HAVE_ELF
+#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 */
-# 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)
+# endif /* XCOFF */
# define libc_freeres_ptr(decl) decl
# define __libc_freeres_fn_section
#endif
@@ -325,92 +316,79 @@ 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 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 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 /* Have GNU ld. */
+
+#endif /* ELF. */
#if DO_VERSIONING
# define symbol_version(real, name, version) \
diff --git a/include/resolv.h b/include/resolv.h
index 9c24bd3bc7..958fb957c6 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -46,9 +46,11 @@ 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/string.h b/include/string.h
index 532d5ed333..c196007dcb 100644
--- a/include/string.h
+++ b/include/string.h
@@ -83,6 +83,7 @@ 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)
@@ -96,7 +97,6 @@ libc_hidden_builtin_proto (strcmp)
libc_hidden_builtin_proto (strcpy)
libc_hidden_builtin_proto (strcspn)
libc_hidden_builtin_proto (strlen)
-libc_hidden_builtin_proto (strnlen)
libc_hidden_builtin_proto (strncmp)
libc_hidden_builtin_proto (strncpy)
libc_hidden_builtin_proto (strpbrk)