diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-01-05 06:43:17 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-01-05 06:43:17 +0000 |
commit | f8f900ecb9096ec47f5b7bb7626e29223c69061a (patch) | |
tree | db49f68f1941a3495ba55df08f0fc5fa63ca7a6a /elf | |
parent | eda6c725e7a3d6f5d78d5ae171d395cfd39b44bc (diff) | |
download | glibc-f8f900ecb9096ec47f5b7bb7626e29223c69061a.tar.gz glibc-f8f900ecb9096ec47f5b7bb7626e29223c69061a.tar.xz glibc-f8f900ecb9096ec47f5b7bb7626e29223c69061a.zip |
Update
2001-01-04 H.J. Lu <hjl@gnu.org> * elf/dl-support.c (DL_FIND_AUXV): New. Defined if not defined. (_dl_clktck): Declared. (non_dynamic_init): Take 3 arguments. Set _dl_pagesize, _dl_platform and _dl_clktck from AUX. 2001-01-01 Bruno Haible <haible@clisp.cons.org> Finish implementation of plural form handling. * intl/dcigettext.c (known_translation_t): Rename 'domain' field to 'domainname'. Remove 'plindex' field. Add 'domain' and 'translation_length' fields. (transcmp): Don't compare 'plindex' fields. (plural_lookup): New function. (DCIGETTEXT): Change cache handing in the plural case. Don't call plural_eval before the translation and its catalog file have been found. Remove plindex from cache key. Add 'translation_length' and 'domain' to cache result. (_nl_find_msg): Remove index argument, return length of translation to the caller instead. Weaken comparison of string lengths, to account for plural entries. Call iconv() on the entire result string, not only on the portion needed so far. * intl/loadinfo.h (_nl_find_msg): Remove index argument, add lengthp argument. * intl/loadmsgcat.c (_nl_load_domain): Adapt to _nl_find_msg change.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-support.c | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/elf/dl-support.c b/elf/dl-support.c index 75d7b1926a..6d185c6373 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -1,5 +1,5 @@ /* Support for dynamic linking code in static libc. - Copyright (C) 1996,97,98,99,2000 Free Software Foundation, Inc. + Copyright (C) 1996, 97, 98, 99, 2000, 2001 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 @@ -107,15 +107,46 @@ int _dl_starting_up = 1; At this time it is not anymore a problem to modify the tables. */ __libc_lock_define_initialized_recursive (, _dl_load_lock) +#ifndef DL_FIND_AUXV +# define DL_FIND_AUXV(auxp, envp) \ + do { \ + void **_tmp; \ + for (_tmp = (void **) (envp); *_tmp; ++_tmp) \ + continue; \ + (auxp) = (void *) ++_tmp; \ + } while (0) +#endif + +extern int _dl_clktck; -static void non_dynamic_init (void) __attribute__ ((unused)); +static void non_dynamic_init (int argc, char **argv, char **envp) + __attribute__ ((unused)); static void -non_dynamic_init (void) +non_dynamic_init (int argc, char **argv, char **envp) { - _dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1; + ElfW(auxv_t) *av; + + DL_FIND_AUXV (av, envp); - _dl_pagesize = __getpagesize (); + for (; av->a_type != AT_NULL; ++av) + switch (av->a_type) + { + case AT_PAGESZ: + _dl_pagesize = av->a_un.a_val; + break; + case AT_PLATFORM: + _dl_platform = av->a_un.a_ptr; + break; + case AT_CLKTCK: + _dl_clktck = av->a_un.a_val; + break; + } + + if (!_dl_pagesize) + _dl_pagesize = __getpagesize (); + + _dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1; /* Initialize the data structures for the search paths for shared objects. */ |