diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-03-09 06:16:49 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-03-09 06:16:49 +0000 |
commit | f166d8653042df4b840c4d56fba752e266c8bffb (patch) | |
tree | 0e7d891c1389559e02e468431b625bbb92b2c61f /locale/programs/locfile.c | |
parent | 4cca6b868f08e4f95a4c3786a69135676b086c50 (diff) | |
download | glibc-f166d8653042df4b840c4d56fba752e266c8bffb.tar glibc-f166d8653042df4b840c4d56fba752e266c8bffb.tar.gz glibc-f166d8653042df4b840c4d56fba752e266c8bffb.tar.bz2 glibc-f166d8653042df4b840c4d56fba752e266c8bffb.zip |
Update.
1997-03-09 06:59 Ulrich Drepper <drepper@cygnus.com>
* Makeconfig: Add ASFLAGS-% flags for SPARC assembler which need
-fPIC.
* Makerules (compile.S): Use ASFLAGS-%.
(COMPILE.S): Likewise.
* config.make.in (ASFLAGS-.so): Define from ASFLAGS_SO.
* configure.in: Substitute ASFLAGS_SO.
* sysdeps/sparc/configure.in: New file.
* posix/unitstd.h: Add prototype for __euidaccess.
* sysdeps/posix/euidaccess.c: Define as __euidaccess and make
euidaccess weak alias.
* sysdeps/stubs/euidaccess.c: Likewise.
* inet/rcmd.c: Use __ protected versions of non-standard functions.
* locale/setlocale.c (setlocale): Don't set usage_count to
MAX_USAGE_COUNT if it already has this value.
* locale/programs/localedef.c: Don't use LOCALE_PATH to find
binary locale files. Use LOCALEDIR only.
* locale/programs/locfile.c: When named file not found and not
absolute use path in I18NPATH.
* stdlib/Makefile (headers): Add inttypes.h.
* sysdpes/generic/socketbits.h: Add PF_FILE as synonym for PF_LOCAL
and AF_FILE as synonym for AF_LOCAL.
* sysdpes/unix/sysv/linux/socketbits.h: Likewise.
* time/Makefile: Rewrite rules for test to handle parallel builds.
1997-03-09 05:26 Ulrich Drepper <drepper@cygnus.com>
* manual/startup.texi (EXIT_FAILURE): Fix typo. Patch by
robbe@orcus.priv.at.
1997-03-09 05:10 Edward Seidl <seidl@janed.com>
* sysdeps/i386/elf/start.S (nofini): *Really* align stack to
8-byte boundary.
1997-03-09 01:48 Ulrich Drepper <drepper@cygnus.com>
* elf/link.h: Define __need_NULL to get definition. Include
<features.h>.
Patch by Andreas Jaeger <aj@arthur.pfalz.de>.
1997-03-08 21:48 Thorsten Kukuk <kukuk@tk.uni-paderborn.de>
Rewrite NIS code to allow empty keys.
* nis/nss_nis/nis-ethers.c: Rewritten.
* nis/nss_nis/nis-proto.c: Rewritten.
* nis/nss_nis/nis-publickey.c: Rewritten.
* nis/nss_nis/nis-rpc.c: Rewritten.
* nis/nss_nis/nis-service.c: Rewritten.
1997-03-08 16:02 Andreas Jaeger <aj@arthur.pfalz.de>
* time/scheck.c (scheck): Add extra const to second argument.
* time/private.h: Correct prototypes to match definition.
1997-03-08 18:55 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/alpha/__math.h: Remove cabs inline definition.
Reported by Philip Blundell <pjb27@cam.ac.uk>.
Reported by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
Bug report by Andreas Jaeger <jaeger@informatik.uni-kl.de>.
Diffstat (limited to 'locale/programs/locfile.c')
-rw-r--r-- | locale/programs/locfile.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c index 4ab04253b9..aecc8913e2 100644 --- a/locale/programs/locfile.c +++ b/locale/programs/locfile.c @@ -26,6 +26,7 @@ #include <locale.h> #include <malloc.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/stat.h> @@ -76,10 +77,31 @@ locfile_read (const char *filename, struct charset_t *charset) { if (filename[0] != '/') { - char path[strlen (filename) + 1 + sizeof (LOCSRCDIR)]; + char *i18npath = __secure_getenv ("I18NPATH"); + if (i18npath != NULL && *i18npath != '\0') + { + char path[strlen (filename) + 1 + strlen (i18npath) + 1]; + char *next; + i18npath = strdupa (i18npath); + + + while (ldfile == NULL + && (next = strsep (&i18npath, ":")) != NULL) + { + stpcpy (stpcpy (stpcpy (path, next), "/"), filename); + + ldfile = lr_open (path, locfile_hash); + } + } - stpcpy (stpcpy (stpcpy (path, LOCSRCDIR), "/"), filename); - ldfile = lr_open (path, locfile_hash); + /* Test in the default directory. */ + if (ldfile == NULL) + { + char path[strlen (filename) + 1 + sizeof (LOCSRCDIR)]; + + stpcpy (stpcpy (stpcpy (path, LOCSRCDIR), "/"), filename); + ldfile = lr_open (path, locfile_hash); + } } if (ldfile == NULL) |