Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ulrich Drepper committed Jan 5, 2001
1 parent eda6c72 commit f8f900e
Show file tree
Hide file tree
Showing 5 changed files with 231 additions and 152 deletions.
27 changes: 27 additions & 0 deletions ChangeLog
@@ -1,3 +1,30 @@
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.

2001-01-04 Ulrich Drepper <drepper@redhat.com>

* intl/plural.y (yylex): Minimal improvement in number scanner.
Expand Down
41 changes: 36 additions & 5 deletions 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
Expand Down Expand Up @@ -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. */
Expand Down

0 comments on commit f8f900e

Please sign in to comment.