diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-02-26 07:31:20 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-02-26 07:31:20 +0000 |
commit | f93ba587561d0fc84d779e86039427828956c77c (patch) | |
tree | 6b7a194d7bed0aee63dc86bdcd911785dd0ba41b /lib/localcharset.c | |
parent | 641ef33fac78f3200c38c830bc6513062f3d3324 (diff) | |
download | coreutils-f93ba587561d0fc84d779e86039427828956c77c.tar.xz |
Sync from gnulib.
Diffstat (limited to 'lib/localcharset.c')
-rw-r--r-- | lib/localcharset.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/localcharset.c b/lib/localcharset.c index 66099d5e3..662f3ad33 100644 --- a/lib/localcharset.c +++ b/lib/localcharset.c @@ -115,10 +115,16 @@ get_charset_aliases () { #if !(defined VMS || defined WIN32) FILE *fp; - const char *dir = relocate (LIBDIR); + const char *dir; const char *base = "charset.alias"; char *file_name; + /* Make it possible to override the charset.alias location. This is + necessary for running the testsuite before "make install". */ + dir = getenv ("CHARSETALIASDIR"); + if (dir == NULL || dir[0] == '\0') + dir = relocate (LIBDIR); + /* Concatenate dir and base into freshly allocated file_name. */ { size_t dir_len = strlen (dir); |