From: Ulrich Drepper Date: Sun, 4 Aug 2002 23:32:14 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/glibc-2-3~540 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=230491f02c51bcc0e195491703e3d48ca8778743;p=platform%2Fupstream%2Fglibc.git Update. 2002-08-04 Ulrich Drepper * stdio-common/psignal.c: Declare _sys_siglist_internal. Use USEINT to access _sys_siglist. * string/strsignal.c: Likewise. * sysdeps/generic/siglist.c: Add _sys_siglist_internal alias. * sysdeps/gnu/siglist.c: Likewise. * sysdeps/unix/siglist.c: Likewise. * sysdeps/unix/sysv/linux/arm/siglist.c: Likewise. * libio/fileops.c: Add missing INTUSEs for _IO_file_jumps. * libio/wfileops.c: Add missing INTUSE for _IO_file_close. * intl/dcigettext.c: Define _nl_default_dirname_internal as hidden alias and use it. * intl/bindtextdom.c: Use _nl_default_dirname_internal. * include/netinet/in.h: Add declaration of in6addr_loopback_internal. * inet/in6_addr.c: Add INTVARDEF for in6addr_loopback. * sysdeps/posix/getaddrinfo.c: Use INTUSE for in6addr_loopback access. * include/time.h: Add libc_hidden_proto for __gmtime_r. * time/gmtime.c (__gmtime_r): Add libc_hidden_def. * iconv/Versions: Replace __gconv_alias_db, __gconv_modules_db, and __gconv_cache with __gconv_get_alias_db, __gconv_get_modules_db, and __gconv_get_cache respectively. * iconv/gconv_cache.c (gconv_cache): Renamed for __gconv_cache and defined static. Change all users. (__gconv_get_cache): New function. * iconv/gconv_db.c (__gconv_get_modules_db): New function. (__gconv_get_alias_db): New function. * iconv/gconv_int.h (__gconv_alias_db): Declare as hidden. (__conv_modules_db): Likewise. Add prototypes for __gconv_get_cache, __gconv_get_modules_db, and __gconv_get_alias_db. * iconv/iconv_prog.c: Use the new functions instead of accessing the variables. * include/stdlib.h: Add prototype and libc_hidden_proto for __default_morecore. * sysdeps/generic/morecore.c: Include . * malloc/obstack.c: Remove fputs macro. * malloc/mtrace.c: Remove fopen macro. --- diff --git a/ChangeLog b/ChangeLog index 2b7c71f..f1cd538 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,51 @@ +2002-08-04 Ulrich Drepper + + * stdio-common/psignal.c: Declare _sys_siglist_internal. Use USEINT + to access _sys_siglist. + * string/strsignal.c: Likewise. + * sysdeps/generic/siglist.c: Add _sys_siglist_internal alias. + * sysdeps/gnu/siglist.c: Likewise. + * sysdeps/unix/siglist.c: Likewise. + * sysdeps/unix/sysv/linux/arm/siglist.c: Likewise. + + * libio/fileops.c: Add missing INTUSEs for _IO_file_jumps. + + * libio/wfileops.c: Add missing INTUSE for _IO_file_close. + + * intl/dcigettext.c: Define _nl_default_dirname_internal as hidden + alias and use it. + * intl/bindtextdom.c: Use _nl_default_dirname_internal. + + * include/netinet/in.h: Add declaration of in6addr_loopback_internal. + * inet/in6_addr.c: Add INTVARDEF for in6addr_loopback. + * sysdeps/posix/getaddrinfo.c: Use INTUSE for in6addr_loopback access. + + * include/time.h: Add libc_hidden_proto for __gmtime_r. + * time/gmtime.c (__gmtime_r): Add libc_hidden_def. + + * iconv/Versions: Replace __gconv_alias_db, __gconv_modules_db, + and __gconv_cache with __gconv_get_alias_db, __gconv_get_modules_db, + and __gconv_get_cache respectively. + * iconv/gconv_cache.c (gconv_cache): Renamed for __gconv_cache and + defined static. Change all users. + (__gconv_get_cache): New function. + * iconv/gconv_db.c (__gconv_get_modules_db): New function. + (__gconv_get_alias_db): New function. + * iconv/gconv_int.h (__gconv_alias_db): Declare as hidden. + (__conv_modules_db): Likewise. + Add prototypes for __gconv_get_cache, __gconv_get_modules_db, + and __gconv_get_alias_db. + * iconv/iconv_prog.c: Use the new functions instead of accessing the + variables. + + * include/stdlib.h: Add prototype and libc_hidden_proto for + __default_morecore. + * sysdeps/generic/morecore.c: Include . + + * malloc/obstack.c: Remove fputs macro. + + * malloc/mtrace.c: Remove fopen macro. + 2002-08-04 Jakub Jelinek * manual/debug.texi: Fix spelling to programmatically. diff --git a/iconv/Versions b/iconv/Versions index 0661c8c..7f09ed4 100644 --- a/iconv/Versions +++ b/iconv/Versions @@ -4,7 +4,7 @@ libc { iconv_open; iconv; iconv_close; } GLIBC_PRIVATE { - # variables shared with iconv program - __gconv_alias_db; __gconv_modules_db; __gconv_cache; + # functions shared with iconv program + __gconv_get_alias_db; __gconv_get_modules_db; __gconv_get_cache; } } diff --git a/iconv/gconv_cache.c b/iconv/gconv_cache.c index a2beee0..56d8c37 100644 --- a/iconv/gconv_cache.c +++ b/iconv/gconv_cache.c @@ -1,5 +1,5 @@ /* Cache handling for iconv modules. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. @@ -31,11 +31,18 @@ #include "../intl/hash-string.h" -void *__gconv_cache; +static void *gconv_cache; static size_t cache_size; static int cache_malloced; +void * +__gconv_get_cache (void) +{ + return gconv_cache; +} + + int internal_function __gconv_load_cache (void) @@ -70,25 +77,25 @@ __gconv_load_cache (void) /* Make the file content available. */ cache_size = st.st_size; #ifdef _POSIX_MAPPED_FILES - __gconv_cache = __mmap (NULL, cache_size, PROT_READ, MAP_SHARED, fd, 0); - if (__builtin_expect (__gconv_cache == MAP_FAILED, 0)) + gconv_cache = __mmap (NULL, cache_size, PROT_READ, MAP_SHARED, fd, 0); + if (__builtin_expect (gconv_cache == MAP_FAILED, 0)) #endif { size_t already_read; - __gconv_cache = malloc (cache_size); - if (__gconv_cache == NULL) + gconv_cache = malloc (cache_size); + if (gconv_cache == NULL) goto close_and_exit; already_read = 0; do { - ssize_t n = __read (fd, (char *) __gconv_cache + already_read, + ssize_t n = __read (fd, (char *) gconv_cache + already_read, cache_size - already_read); if (__builtin_expect (n, 0) == -1) { - free (__gconv_cache); - __gconv_cache = NULL; + free (gconv_cache); + gconv_cache = NULL; goto close_and_exit; } @@ -103,7 +110,7 @@ __gconv_load_cache (void) __close (fd); /* Check the consistency. */ - header = (struct gconvcache_header *) __gconv_cache; + header = (struct gconvcache_header *) gconv_cache; if (__builtin_expect (header->magic, GCONVCACHE_MAGIC) != GCONVCACHE_MAGIC || __builtin_expect (header->string_offset >= cache_size, 0) || __builtin_expect (header->hash_offset >= cache_size, 0) @@ -116,14 +123,14 @@ __gconv_load_cache (void) { if (cache_malloced) { - free (__gconv_cache); + free (gconv_cache); cache_malloced = 0; } #ifdef _POSIX_MAPPED_FILES else - __munmap (__gconv_cache, cache_size); + __munmap (gconv_cache, cache_size); #endif - __gconv_cache = NULL; + gconv_cache = NULL; return -1; } @@ -145,9 +152,9 @@ find_module_idx (const char *str, size_t *idxp) const struct hash_entry *hashtab; unsigned int limit; - header = (const struct gconvcache_header *) __gconv_cache; - strtab = (char *) __gconv_cache + header->string_offset; - hashtab = (struct hash_entry *) ((char *) __gconv_cache + header = (const struct gconvcache_header *) gconv_cache; + strtab = (char *) gconv_cache + header->string_offset; + hashtab = (struct hash_entry *) ((char *) gconv_cache + header->hash_offset); hval = hash_string (str); @@ -211,7 +218,7 @@ __gconv_compare_alias_cache (const char *name1, const char *name2, int *result) size_t name1_idx; size_t name2_idx; - if (__gconv_cache == NULL) + if (gconv_cache == NULL) return -1; if (find_module_idx (name1, &name1_idx) != 0 @@ -238,13 +245,13 @@ __gconv_lookup_cache (const char *toset, const char *fromset, const struct module_entry *to_module; struct __gconv_step *result; - if (__gconv_cache == NULL) + if (gconv_cache == NULL) /* We have no cache available. */ return __GCONV_NODB; - header = (const struct gconvcache_header *) __gconv_cache; - strtab = (char *) __gconv_cache + header->string_offset; - modtab = (const struct module_entry *) ((char *) __gconv_cache + header = (const struct gconvcache_header *) gconv_cache; + strtab = (char *) gconv_cache + header->string_offset; + modtab = (const struct module_entry *) ((char *) gconv_cache + header->module_offset); if (find_module_idx (fromset, &fromidx) != 0 @@ -273,7 +280,7 @@ __gconv_lookup_cache (const char *toset, const char *fromset, /* Note the -1. This is due to the offset added in iconvconfig. See there for more explanations. */ - extra = (const struct extra_entry *) ((char *) __gconv_cache + extra = (const struct extra_entry *) ((char *) gconv_cache + header->otherconv_offset + from_module->extra_offset - 1); while (extra->module_cnt != 0 @@ -430,7 +437,7 @@ void internal_function __gconv_release_cache (struct __gconv_step *steps, size_t nsteps) { - if (__gconv_cache != NULL) + if (gconv_cache != NULL) /* The only thing we have to deallocate is the record with the steps. */ free (steps); @@ -442,10 +449,10 @@ static void __attribute__ ((unused)) free_mem (void) { if (cache_malloced) - free (__gconv_cache); + free (gconv_cache); #ifdef _POSIX_MAPPED_FILES else - __munmap (__gconv_cache, cache_size); + __munmap (gconv_cache, cache_size); #endif } diff --git a/iconv/gconv_db.c b/iconv/gconv_db.c index 9bd27c5..25b06d0 100644 --- a/iconv/gconv_db.c +++ b/iconv/gconv_db.c @@ -1,5 +1,5 @@ /* Provide access to the collection of available transformation modules. - Copyright (C) 1997,98,99,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,2001,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -41,6 +41,20 @@ struct gconv_module *__gconv_modules_db; __libc_lock_define_initialized (static, lock) +/* Provide access to module database. */ +struct gconv_module * +__gconv_get_modules_db (void) +{ + return __gconv_modules_db; +} + +void * +__gconv_get_alias_db (void) +{ + return __gconv_alias_db; +} + + /* Function for searching alias. */ int __gconv_alias_compare (const void *p1, const void *p2) diff --git a/iconv/gconv_int.h b/iconv/gconv_int.h index df7d2ee..a16a543 100644 --- a/iconv/gconv_int.h +++ b/iconv/gconv_int.h @@ -114,11 +114,11 @@ enum /* Global variables. */ /* Database of alias names. */ -extern void *__gconv_alias_db; +extern void *__gconv_alias_db attribute_hidden; /* Array with available modules. */ extern size_t __gconv_nmodules; -extern struct gconv_module *__gconv_modules_db; +extern struct gconv_module *__gconv_modules_db attribute_hidden; /* Value of the GCONV_PATH environment variable. */ extern const char *__gconv_path_envvar attribute_hidden; @@ -204,6 +204,15 @@ extern void __gconv_read_conf (void) attribute_hidden; /* Try to read module cache file. */ extern int __gconv_load_cache (void) internal_function; +/* Retrieve pointer to internal cache. */ +extern void *__gconv_get_cache (void); + +/* Retrieve pointer to internal module database. */ +extern struct gconv_module *__gconv_get_modules_db (void); + +/* Retrieve pointer to internal alias database. */ +extern void *__gconv_get_alias_db (void); + /* Determine the directories we are looking in. */ extern void __gconv_get_path (void) internal_function; diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c index f7aa340..8a8535b 100644 --- a/iconv/iconv_prog.c +++ b/iconv/iconv_prog.c @@ -47,9 +47,6 @@ #define PACKAGE _libc_intl_domainname -/* Defined in gconv_cache.c. */ -extern void *__gconv_cache; - /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; @@ -668,10 +665,9 @@ insert_cache (void) const struct hash_entry *hashtab; size_t cnt; - header = (const struct gconvcache_header *) __gconv_cache; - strtab = (char *) __gconv_cache + header->string_offset; - hashtab = (struct hash_entry *) ((char *) __gconv_cache - + header->hash_offset); + header = (const struct gconvcache_header *) __gconv_get_cache (); + strtab = (char *) header + header->string_offset; + hashtab = (struct hash_entry *) ((char *) header + header->hash_offset); for (cnt = 0; cnt < header->hash_size; ++cnt) if (hashtab[cnt].string_offset != 0) @@ -689,24 +685,29 @@ internal_function print_known_names (void) { iconv_t h; + void *cache; /* We must initialize the internal databases first. */ h = iconv_open ("L1", "L1"); iconv_close (h); /* See whether we have a cache. */ - if (__gconv_cache != NULL) + cache = __gconv_get_cache (); + if (cache != NULL) /* Yep, use only this information. */ insert_cache (); else { + struct gconv_module *modules; + /* No, then use the information read from the gconv-modules file. First add the aliases. */ - twalk (__gconv_alias_db, insert_print_list); + twalk (__gconv_get_alias_db (), insert_print_list); /* Add the from- and to-names from the known modules. */ - if (__gconv_modules_db != NULL) - add_known_names (__gconv_modules_db); + modules = __gconv_get_modules_db (); + if (modules != NULL) + add_known_names (modules); } fputs (_("\ diff --git a/include/netinet/in.h b/include/netinet/in.h index 2a57ace..356cc96 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -1,6 +1,7 @@ #include extern const struct in6_addr in6addr_any_internal attribute_hidden; +extern const struct in6_addr in6addr_loopback_internal attribute_hidden; /* Bind socket to a privileged IP port. */ extern int bindresvport_internal (int __sockfd, diff --git a/include/stdlib.h b/include/stdlib.h index 48ff8a0..501fac2 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -4,6 +4,7 @@ #define __Need_M_And_C #endif +#include #include /* Now define the internal interfaces. */ @@ -185,6 +186,10 @@ __strtoull_l (__const char * __restrict __nptr, char **__restrict __endptr, # endif #endif + +extern void * __default_morecore (ptrdiff_t); +libc_hidden_proto (__default_morecore) + #undef __Need_M_And_C #endif /* include/stdlib.h */ diff --git a/include/time.h b/include/time.h index b68df96..3b63b3d 100644 --- a/include/time.h +++ b/include/time.h @@ -50,6 +50,7 @@ extern struct tm *__localtime_r (__const time_t *__timer, extern struct tm *__gmtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp); +libc_hidden_proto (__gmtime_r) /* Compute the `struct tm' representation of *T, offset OFFSET seconds east of UTC, diff --git a/inet/in6_addr.c b/inet/in6_addr.c index 0035509..0faf797 100644 --- a/inet/in6_addr.c +++ b/inet/in6_addr.c @@ -24,3 +24,4 @@ const struct in6_addr in6addr_any = INTVARDEF(in6addr_any) const struct in6_addr in6addr_loopback = { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }; +INTVARDEF(in6addr_loopback) diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c index 1e6efe2..56a4223 100644 --- a/intl/bindtextdom.c +++ b/intl/bindtextdom.c @@ -59,6 +59,11 @@ /* Contains the default location of the message catalogs. */ extern const char _nl_default_dirname[]; +#ifdef _LIBC +extern const char _nl_default_dirname_internal[] attribute_hidden; +#else +# define INTUSE(name) name +#endif /* List with bindings of specific domains. */ extern struct binding *_nl_domain_bindings; @@ -147,8 +152,8 @@ set_binding_values (domainname, dirnamep, codesetp) char *result = binding->dirname; if (strcmp (dirname, result) != 0) { - if (strcmp (dirname, _nl_default_dirname) == 0) - result = (char *) _nl_default_dirname; + if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) + result = (char *) INTUSE(_nl_default_dirname); else { #if defined _LIBC || defined HAVE_STRDUP @@ -163,7 +168,7 @@ set_binding_values (domainname, dirnamep, codesetp) if (__builtin_expect (result != NULL, 1)) { - if (binding->dirname != _nl_default_dirname) + if (binding->dirname != INTUSE(_nl_default_dirname)) free (binding->dirname); binding->dirname = result; @@ -217,7 +222,7 @@ set_binding_values (domainname, dirnamep, codesetp) { /* Simply return the default values. */ if (dirnamep) - *dirnamep = _nl_default_dirname; + *dirnamep = INTUSE(_nl_default_dirname); if (codesetp) *codesetp = NULL; } @@ -239,11 +244,11 @@ set_binding_values (domainname, dirnamep, codesetp) if (dirname == NULL) /* The default value. */ - dirname = _nl_default_dirname; + dirname = INTUSE(_nl_default_dirname); else { - if (strcmp (dirname, _nl_default_dirname) == 0) - dirname = _nl_default_dirname; + if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) + dirname = INTUSE(_nl_default_dirname); else { char *result; @@ -266,7 +271,7 @@ set_binding_values (domainname, dirnamep, codesetp) } else /* The default value. */ - new_binding->dirname = (char *) _nl_default_dirname; + new_binding->dirname = (char *) INTUSE(_nl_default_dirname); new_binding->codeset_cntr = 0; @@ -322,7 +327,7 @@ set_binding_values (domainname, dirnamep, codesetp) if (0) { failed_codeset: - if (new_binding->dirname != _nl_default_dirname) + if (new_binding->dirname != INTUSE(_nl_default_dirname)) free (new_binding->dirname); failed_dirname: free (new_binding); diff --git a/intl/dcigettext.c b/intl/dcigettext.c index 344736e..2fb8a2f 100644 --- a/intl/dcigettext.c +++ b/intl/dcigettext.c @@ -236,6 +236,13 @@ transcmp (p1, p2) } #endif +#ifndef INTVARDEF +# define INTVARDEF +#endif +#ifndef INTUSE +# define INTUSE(name) name +#endif + /* Name of the default domain used for gettext(3) prior any call to textdomain(3). The default value for this is "messages". */ const char _nl_default_default_domain[] attribute_hidden = "messages"; @@ -246,6 +253,7 @@ const char *_nl_current_default_domain attribute_hidden /* Contains the default location of the message catalogs. */ const char _nl_default_dirname[] = LOCALEDIR; +INTVARDEF (_nl_default_dirname) /* List with bindings of specific domains created by bindtextdomain() calls. */ @@ -439,7 +447,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category) } if (binding == NULL) - dirname = (char *) _nl_default_dirname; + dirname = (char *) INTUSE(_nl_default_dirname); else if (binding->dirname[0] == '/') dirname = binding->dirname; else @@ -1109,7 +1117,7 @@ free_mem (void) { struct binding *oldp = _nl_domain_bindings; _nl_domain_bindings = _nl_domain_bindings->next; - if (oldp->dirname != _nl_default_dirname) + if (oldp->dirname != INTUSE(_nl_default_dirname)) /* Yes, this is a pointer comparison. */ free (oldp->dirname); free (oldp->codeset); diff --git a/libio/fileops.c b/libio/fileops.c index 979825e..247243f 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -450,7 +450,7 @@ _IO_file_setbuf_mmap (fp, p, len) _IO_FILE *result; /* Change the function table. */ - _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_file_jumps; + _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &INTUSE(_IO_file_jumps); fp->_wide_data->_wide_vtable = &_IO_wfile_jumps; /* And perform the normal operation. */ @@ -693,7 +693,7 @@ mmap_remap_check (_IO_FILE *fp) fp->_IO_buf_base = fp->_IO_buf_end = NULL; _IO_setg (fp, NULL, NULL, NULL); if (fp->_mode <= 0) - _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_file_jumps; + _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &INTUSE(_IO_file_jumps); else _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_wfile_jumps; fp->_wide_data->_wide_vtable = &_IO_wfile_jumps; @@ -786,7 +786,7 @@ decide_maybe_mmap (_IO_FILE *fp) /* We couldn't use mmap, so revert to the vanilla file operations. */ if (fp->_mode <= 0) - _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_file_jumps; + _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &INTUSE(_IO_file_jumps); else _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_wfile_jumps; fp->_wide_data->_wide_vtable = &_IO_wfile_jumps; diff --git a/libio/wfileops.c b/libio/wfileops.c index be4a963..770c9b2 100644 --- a/libio/wfileops.c +++ b/libio/wfileops.c @@ -925,7 +925,7 @@ struct _IO_jump_t _IO_wfile_jumps_maybe_mmap = JUMP_INIT(read, INTUSE(_IO_file_read)), JUMP_INIT(write, _IO_new_file_write), JUMP_INIT(seek, INTUSE(_IO_file_seek)), - JUMP_INIT(close, _IO_file_close), + JUMP_INIT(close, INTUSE(_IO_file_close)), JUMP_INIT(stat, INTUSE(_IO_file_stat)), JUMP_INIT(showmanyc, _IO_default_showmanyc), JUMP_INIT(imbue, _IO_default_imbue) diff --git a/malloc/mtrace.c b/malloc/mtrace.c index 52347ea..d9960bd 100644 --- a/malloc/mtrace.c +++ b/malloc/mtrace.c @@ -36,11 +36,8 @@ #ifdef _LIBC # include -#endif -#ifdef USE_IN_LIBIO # include -# define fopen(f, n) _IO_fopen64 (f, n) # define setvbuf(s, b, f, l) INTUSE(_IO_setvbuf) (s, b, f, l) # define fwrite(buf, size, count, fp) _IO_fwrite (buf, size, count, fp) #endif diff --git a/malloc/obstack.c b/malloc/obstack.c index 63e4b80..5c5e8b0 100644 --- a/malloc/obstack.c +++ b/malloc/obstack.c @@ -475,9 +475,8 @@ _obstack_memory_used (h) # define _(Str) (Str) # endif # endif -# if defined _LIBC && defined USE_IN_LIBIO +# ifdef _LIBC # include -# define fputs(s, f) _IO_fputs (s, f) # endif # ifndef __attribute__ diff --git a/stdio-common/psignal.c b/stdio-common/psignal.c index c524bf3..c756394 100644 --- a/stdio-common/psignal.c +++ b/stdio-common/psignal.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,1992,1995,1996,1997,2001 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1995-1997,2001,2002 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 @@ -31,6 +31,7 @@ /* Defined in sys_siglist.c. */ extern const char *const _sys_siglist[]; +extern const char *const _sys_siglist_internal[] attribute_hidden; /* Print out on stderr a line consisting of the test in S, a colon, a space, @@ -46,7 +47,7 @@ psignal (int sig, const char *s) else colon = ": "; - if (sig >= 0 && sig < NSIG && (desc = _sys_siglist[sig]) != NULL) + if (sig >= 0 && sig < NSIG && (desc = INTUSE(_sys_siglist)[sig]) != NULL) { #ifdef USE_IN_LIBIO if (_IO_fwide (stderr, 0) > 0) diff --git a/string/strsignal.c b/string/strsignal.c index 435ad78..8ff01a4 100644 --- a/string/strsignal.c +++ b/string/strsignal.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994-2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994-2000, 2001, 2002 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 @@ -30,6 +30,7 @@ /* Defined in siglist.c. */ extern const char *const _sys_siglist[]; +extern const char *const _sys_siglist_internal[] attribute_hidden; static __libc_key_t key; /* If nonzero the key allocation failed and we should better use a @@ -58,7 +59,8 @@ strsignal (int signum) #ifdef SIGRTMIN (signum >= SIGRTMIN && signum <= SIGRTMAX) || #endif - signum < 0 || signum >= NSIG || (desc = _sys_siglist[signum]) == NULL) + signum < 0 || signum >= NSIG + || (desc = INTUSE(_sys_siglist)[signum]) == NULL) { char *buffer = getbuffer (); int len; diff --git a/sunrpc/clnt_perr.c b/sunrpc/clnt_perr.c index 4e2efaf..c20853f 100644 --- a/sunrpc/clnt_perr.c +++ b/sunrpc/clnt_perr.c @@ -45,7 +45,6 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro"; #ifdef USE_IN_LIBIO # include # include -# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif static char *auth_errmsg (enum auth_stat stat) internal_function; diff --git a/sunrpc/svc_simple.c b/sunrpc/svc_simple.c index cd985a2..397b71f 100644 --- a/sunrpc/svc_simple.c +++ b/sunrpc/svc_simple.c @@ -50,7 +50,6 @@ static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro"; #ifdef USE_IN_LIBIO # include # include -# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif struct proglst_ diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c index 0a4a8a2..3c5d6a4 100644 --- a/sunrpc/svc_tcp.c +++ b/sunrpc/svc_tcp.c @@ -54,7 +54,6 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro"; #ifdef USE_IN_LIBIO # include # include -# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif /* diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c index b42d614..669aaeb 100644 --- a/sunrpc/svc_udp.c +++ b/sunrpc/svc_udp.c @@ -54,7 +54,6 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro"; #ifdef USE_IN_LIBIO # include # include -# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif #define rpc_buffer(xprt) ((xprt)->xp_p1) diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c index 15a4169..c99c4ac 100644 --- a/sunrpc/xdr_rec.c +++ b/sunrpc/xdr_rec.c @@ -53,7 +53,6 @@ #ifdef USE_IN_LIBIO # include # include -# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif static bool_t xdrrec_getlong (XDR *, long *); diff --git a/sunrpc/xdr_ref.c b/sunrpc/xdr_ref.c index 067d97e..ab706d7 100644 --- a/sunrpc/xdr_ref.c +++ b/sunrpc/xdr_ref.c @@ -49,7 +49,6 @@ static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI"; #ifdef USE_IN_LIBIO # include # include -# define fputs(s, f) INTUSE(_IO_fputs) (s, f) #endif #define LASTUNSIGNED ((u_int)0-1) diff --git a/sysdeps/generic/morecore.c b/sysdeps/generic/morecore.c index 23bc7e5..53969f5 100644 --- a/sysdeps/generic/morecore.c +++ b/sysdeps/generic/morecore.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 93, 94, 95, 97, 2002 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 @@ -30,6 +30,7 @@ systems with potentially hostile include files. */ #include +#include extern __malloc_ptr_t __sbrk __P ((ptrdiff_t increment)); libc_hidden_proto (__sbrk) #endif diff --git a/sysdeps/generic/siglist.c b/sysdeps/generic/siglist.c index 0ba3032..b7b48a7 100644 --- a/sysdeps/generic/siglist.c +++ b/sysdeps/generic/siglist.c @@ -1,5 +1,5 @@ /* Define list of all signal numbers and their names. - Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2002 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 @@ -27,6 +27,7 @@ const char *const _sys_siglist[NSIG] = #include #undef init_sig }; +strong_alias (_sys_siglist, _sys_siglist_internal) const char *const _sys_sigabbrev[NSIG] = diff --git a/sysdeps/gnu/siglist.c b/sysdeps/gnu/siglist.c index 8275415..345803f 100644 --- a/sysdeps/gnu/siglist.c +++ b/sysdeps/gnu/siglist.c @@ -1,5 +1,5 @@ /* Define list of all signal numbers and their names. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2002 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 @@ -42,6 +42,7 @@ const char *const __new_sys_siglist[NSIG] = #include #undef init_sig }; +strong_alias (__new_sys_siglist, _sys_siglist_internal) #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) asm (".type __old_sys_siglist,@object\n\t.size __old_sys_siglist," diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index cdd1d88..dc3c89f 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -539,7 +539,8 @@ gaih_inet (const char *name, const struct gaih_service *service, { at->family = AF_INET6; if ((req->ai_flags & AI_PASSIVE) == 0) - memcpy (at->addr, &in6addr_loopback, sizeof (struct in6_addr)); + memcpy (at->addr, &INTUSE(in6addr_loopback), + sizeof (struct in6_addr)); atr = at->next; } diff --git a/sysdeps/unix/siglist.c b/sysdeps/unix/siglist.c index b7e5cde..821a2b0 100644 --- a/sysdeps/unix/siglist.c +++ b/sysdeps/unix/siglist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2002 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 @@ -57,5 +57,6 @@ const char *const _sys_siglist[] = N_("User defined signal 2"), NULL }; +strong_alias (_sys_siglist, _sys_siglist_internal) weak_alias (_sys_siglist, sys_siglist) diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c index e053339..d5fdb5d 100644 --- a/sysdeps/unix/sysv/linux/arm/siglist.c +++ b/sysdeps/unix/sysv/linux/arm/siglist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002 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 @@ -32,6 +32,7 @@ const char *const __new_sys_siglist[NSIG] = #include "siglist.h" #undef init_sig }; +strong_alias (__new_sys_siglist, _sys_siglist_internal) #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) asm (".type __old_sys_siglist,%object;.size __old_sys_siglist," diff --git a/time/gmtime.c b/time/gmtime.c index e5f3a14..0f11a41 100644 --- a/time/gmtime.c +++ b/time/gmtime.c @@ -1,5 +1,5 @@ /* Convert `time_t' to `struct tm' in UTC. - Copyright (C) 1991, 93, 95, 96, 97, 98 Free Software Foundation, Inc. + Copyright (C) 1991, 93, 95, 96, 97, 98, 2002 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 @@ -28,6 +28,7 @@ __gmtime_r (t, tp) { return __tz_convert (t, 0, tp); } +libc_hidden_def (__gmtime_r) weak_alias (__gmtime_r, gmtime_r)