diff options
-rw-r--r-- | ChangeLog | 39 | ||||
-rw-r--r-- | Makefile.in | 4 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | intl/Makefile | 3 | ||||
-rw-r--r-- | intl/tst-gettext2.c | 16 | ||||
-rw-r--r-- | intl/tst-gettext2.sh | 45 | ||||
-rw-r--r-- | locale/setlocale.c | 11 | ||||
-rw-r--r-- | localedata/ChangeLog | 9 | ||||
-rw-r--r-- | string/strndup.c | 2 | ||||
-rw-r--r-- | sysdeps/generic/memchr.c | 17 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/paths.h | 6 |
12 files changed, 129 insertions, 27 deletions
@@ -1,3 +1,42 @@ +2000-11-15 Ulrich Drepper <drepper@redhat.com> + + * intl/Makefile: tst-gettext2.sh does not need a third parameter. + + * intl/tst-gettext2.sh: Copy locale data. Adjust LOCPATH. Verify + output of program. + + * intl/tst-gettext2.c: Set C locale if setting other locale + failed. Use gettext() not _(). + + * locale/setlocale.c: Increment _nl_msg_cat_cntr whenever we + successfully loaded a new locale. + +2000-11-13 Andreas Jaeger <aj@suse.de> + + * configure.in: Require gcc 2.95 or newer. + +2000-11-15 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/unix/sysv/linux/paths.h: Adjust for FHS. + Patch by Arkadiusz Miskiewicz <misiek@pld.ORG.PL>. + +2000-11-11 Jim Meyering <meyering@lucent.com> + + * string/strndup.c (strndup): Cast return value to `char *'. + +2000-11-15 Jim Meyering <meyering@ascend.com> + + * sysdeps/generic/memchr.c: Remove some useless parentheses. + [HAVE_STDLIB_H || defined _LIBC]: Include <stdlib.h>. + [HAVE_BP_SYM_H || defined _LIBC]: Guard inclusion of bp-sym.h. + [! (HAVE_BP_SYM_H || defined _LIBC)] (BP_SYM): Define as no-op. + Also #undef __memchr. + Use `weak_alias' only if it's defined. + +2000-11-10 H.J. Lu <hjl@gnu.org> + + * Makefile.in (install): Set LANGUAGE=C LC_ALL=C. + 2000-11-15 Andreas Jaeger <aj@suse.de> * elf/chroot_canon.c: Include <stdint.h>. diff --git a/Makefile.in b/Makefile.in index be34fd3..ccdfb73 100644 --- a/Makefile.in +++ b/Makefile.in @@ -12,3 +12,7 @@ srcdir = @srcdir@ all .DEFAULT: $(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" CVSOPTS="$(CVSOPTS)" -C $(srcdir) objdir=`pwd` $@ + +install: + LANGUAGE=C LC_ALL=C; export LANGUAGE LC_ALL; \ + $(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" CVSOPTS="$(CVSOPTS)" -C $(srcdir) objdir=`pwd` $@ @@ -1388,7 +1388,7 @@ echo "configure:1388: checking version of $CC" >&5 ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - egcs-2.9[1-9].*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|*gcc-2.9[1-9].*|pgcc-2.90.2[789]|pgcc-2.90.[3-9][0-9]|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*) + *gcc-2.9[5-9].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; diff --git a/configure.in b/configure.in index ae69b47..97cc2ba 100644 --- a/configure.in +++ b/configure.in @@ -515,7 +515,7 @@ fi AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, [version \([egcygnustpi-]*[0-9.]*\)], - [egcs-2.9[1-9].*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|*gcc-2.9[1-9].*|pgcc-2.90.2[789]|pgcc-2.90.[3-9][0-9]|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*], + [*gcc-2.9[5-9].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*], critic_missing=t) AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, [GNU Make[^0-9]*\([0-9][0-9.]*\)], diff --git a/intl/Makefile b/intl/Makefile index e2df29c..fd24fcf 100644 --- a/intl/Makefile +++ b/intl/Makefile @@ -60,8 +60,7 @@ $(objpfx)tst-gettext.out: tst-gettext.sh $(objpfx)tst-gettext $(objpfx)tst-translit.out: tst-translit.sh $(objpfx)tst-translit $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/ $(objpfx)tst-gettext2.out: tst-gettext2.sh $(objpfx)tst-gettext2 - $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/ \ - $(objpfx)tst-gettext + $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/ endif endif endif diff --git a/intl/tst-gettext2.c b/intl/tst-gettext2.c index 0cc4cad..1174e8b 100644 --- a/intl/tst-gettext2.c +++ b/intl/tst-gettext2.c @@ -24,15 +24,17 @@ #include <stdlib.h> #include <stdio.h> -struct data_t { +struct data_t +{ const char *selection; const char *description; }; int data_cnt = 2; struct data_t strings[] = -{{"String1", N_("First string for testing.")}, - {"String2", N_("Another string for testing.")} +{ + { "String1", N_("First string for testing.") }, + { "String2", N_("Another string for testing.") } }; const int lang_cnt = 3; @@ -50,18 +52,20 @@ main (void) unsetenv ("LC_CTYPE"); unsetenv ("LANG"); unsetenv ("OUTPUT_CHARSET"); - + textdomain ("tstlang"); for (i = 0; i < lang_cnt; ++i) { int j; - setlocale (LC_ALL, lang[i]); + if (setlocale (LC_ALL, lang[i]) == NULL) + setlocale (LC_ALL, "C"); bindtextdomain ("tstlang", OBJPFX "domaindir"); for (j = 0; j < data_cnt; ++j) - printf ("%s - %s\n", strings[j].selection, _(strings[j].description)); + printf ("%s - %s\n", strings[j].selection, + gettext (strings[j].description)); } return 0; diff --git a/intl/tst-gettext2.sh b/intl/tst-gettext2.sh index 2c1a2e1..bb8ce47 100644 --- a/intl/tst-gettext2.sh +++ b/intl/tst-gettext2.sh @@ -20,11 +20,10 @@ common_objpfx=$1 objpfx=$2 -malloc_trace=$3 GCONV_PATH=${common_objpfx}iconvdata export GCONV_PATH -LOCPATH=${common_objpfx}localedata +LOCPATH=${objpfx}domaindir export LOCPATH LC_ALL=C export LC_ALL @@ -32,10 +31,32 @@ export LC_ALL # Generate the test data. test -d ${objpfx}domaindir || mkdir ${objpfx}domaindir # Create the locale directories. -test -d ${objpfx}domaindir/lang1 || mkdir ${objpfx}domaindir/lang1 -test -d ${objpfx}domaindir/lang2 || mkdir ${objpfx}domaindir/lang2 -test -d ${objpfx}domaindir/lang1/LC_MESSAGES || mkdir ${objpfx}domaindir/lang1/LC_MESSAGES -test -d ${objpfx}domaindir/lang2/LC_MESSAGES || mkdir ${objpfx}domaindir/lang2/LC_MESSAGES +test -d ${objpfx}domaindir/lang1 || { + mkdir ${objpfx}domaindir/lang1 + for f in ADDRESS COLLATE CTYPE IDENTIFICATION MEASUREMENT MONETARY NAME NUMERIC PAPER TELEPHONE TIME; do + cp ${common_objpfx}localedata/de_DE.ISO-8859-1/LC_$f \ + ${objpfx}domaindir/lang1 + done +} +test -d ${objpfx}domaindir/lang2 || { + mkdir ${objpfx}domaindir/lang2 + for f in ADDRESS COLLATE CTYPE IDENTIFICATION MEASUREMENT MONETARY NAME NUMERIC PAPER TELEPHONE TIME; do + cp ${common_objpfx}localedata/de_DE.ISO-8859-1/LC_$f \ + ${objpfx}domaindir/lang2 + done +} +test -d ${objpfx}domaindir/lang1/LC_MESSAGES || { + mkdir ${objpfx}domaindir/lang1/LC_MESSAGES + cp ${common_objpfx}localedata/de_DE.ISO-8859-1/LC_MESSAGES/SYS_LC_MESSAGES \ + ${objpfx}domaindir/lang1/LC_MESSAGES +} +test -d ${objpfx}domaindir/lang2/LC_MESSAGES || { + mkdir ${objpfx}domaindir/lang2/LC_MESSAGES + cp ${common_objpfx}localedata/de_DE.ISO-8859-1/LC_MESSAGES/SYS_LC_MESSAGES \ + ${objpfx}domaindir/lang2/LC_MESSAGES +} + +test -f # Populate them. msgfmt -o ${objpfx}domaindir/lang1/LC_MESSAGES/tstlang.mo \ @@ -46,9 +67,15 @@ msgfmt -o ${objpfx}domaindir/lang2/LC_MESSAGES/tstlang.mo \ # Now run the test. -MALLOC_TRACE=$malloc_trace \ ${common_objpfx}elf/ld.so --library-path $common_objpfx \ -${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir +${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && +cmp ${objpfx}tst-gettext2.out - <<EOF +String1 - Lang1: 1st string +String2 - Lang1: 2nd string +String1 - Lang2: 1st string +String2 - Lang2: 2nd string +String1 - First string for testing. +String2 - Another string for testing. +EOF exit $? - diff --git a/locale/setlocale.c b/locale/setlocale.c index 08f2a03..3598ece 100644 --- a/locale/setlocale.c +++ b/locale/setlocale.c @@ -120,6 +120,9 @@ static const char *_nl_current_names[] = /* Lock for protecting global data. */ __libc_lock_define_initialized (, __libc_setlocale_lock) +/* Defined in loadmsgcat.c. */ +extern int _nl_msg_cat_cntr; + /* Use this when we come along an error. */ #define ERROR_RETURN \ @@ -334,6 +337,10 @@ setlocale (int category, const char *locale) setname (category, newnames[category]); } setname (LC_ALL, composite); + + /* We successfully loaded a new locale. Let the message catalog + functions know about this. */ + ++_nl_msg_cat_cntr; } /* Critical section left. */ @@ -384,6 +391,10 @@ setlocale (int category, const char *locale) setname (category, newname[0]); setname (LC_ALL, composite); + + /* We successfully loaded a new locale. Let the message catalog + functions know about this. */ + ++_nl_msg_cat_cntr; } /* Critical section left. */ diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 1a044b8..c2f08bd 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,12 @@ +2000-11-15 Ulrich Drepper <drepper@redhat.com> + + * locales/ko_KR: Changed LC_IDENTIFICATION territory field to + Republic of Korea. Streamlined and extend(include all Hangul + syllables) hangul and hanja class definition in LC_CTYPE and + hangul portion of LC_COLLATE. Several changes in LC_TIME. Added + tel_dom_fmt to LC_TELEPHONE. + Patch by Jungshik Shin <jshin@pantheon.yale.edu>. + 2000-11-09 Ulrich Drepper <drepper@redhat.com> * locales/ko_KR: Fix currency_symbol. diff --git a/string/strndup.c b/string/strndup.c index 3f53442..1e17925 100644 --- a/string/strndup.c +++ b/string/strndup.c @@ -49,7 +49,7 @@ __strndup (s, n) return NULL; new[len] = '\0'; - return memcpy (new, s, len); + return (char *) memcpy (new, s, len); } #ifdef weak_alias weak_alias (__strndup, strndup) diff --git a/sysdeps/generic/memchr.c b/sysdeps/generic/memchr.c index 2950a64..688e23b 100644 --- a/sysdeps/generic/memchr.c +++ b/sysdeps/generic/memchr.c @@ -31,15 +31,18 @@ # define __ptr_t char * #endif /* C++ or ANSI C. */ -#if defined (_LIBC) +#if defined _LIBC # include <string.h> # include <memcopy.h> -# include <stdlib.h> #else # define reg_char char #endif -#if defined (HAVE_LIMITS_H) || defined (_LIBC) +#if HAVE_STDLIB_H || defined _LIBC +# include <stdlib.h> +#endif + +#if HAVE_LIMITS_H || defined _LIBC # include <limits.h> #endif @@ -50,10 +53,14 @@ #endif #include <sys/types.h> +#if HAVE_BP_SYM_H || defined _LIBC #include <bp-sym.h> +#else +# define BP_SYM(sym) sym +#endif #undef memchr - +#undef __memchr /* Search no more than N bytes of S for C. */ __ptr_t @@ -201,4 +208,6 @@ __memchr (s, c_in, n) return 0; } +#ifdef weak_alias weak_alias (__memchr, BP_SYM (memchr)) +#endif diff --git a/sysdeps/unix/sysv/linux/paths.h b/sysdeps/unix/sysv/linux/paths.h index 8d4f6fe..fb2c77e 100644 --- a/sysdeps/unix/sysv/linux/paths.h +++ b/sysdeps/unix/sysv/linux/paths.h @@ -48,18 +48,18 @@ #define _PATH_KMEM "/dev/kmem" #define _PATH_LASTLOG "/var/log/lastlog" #define _PATH_MAILDIR "/var/mail" -#define _PATH_MAN "/usr/man" +#define _PATH_MAN "/usr/share/man" #define _PATH_MEM "/dev/mem" #define _PATH_MNTTAB "/etc/fstab" #define _PATH_MOUNTED "/etc/mtab" #define _PATH_NOLOGIN "/etc/nologin" -#define _PATH_PRESERVE "/var/preserve" +#define _PATH_PRESERVE "/var/lib" #define _PATH_RWHODIR "/var/spool/rwho" #define _PATH_SENDMAIL "/usr/sbin/sendmail" #define _PATH_SHADOW "/etc/shadow" #define _PATH_SHELLS "/etc/shells" #define _PATH_TTY "/dev/tty" -#define _PATH_UNIX "/vmlinux" +#define _PATH_UNIX "/boot/vmlinux" #define _PATH_UTMP "/var/run/utmp" #define _PATH_VI "/usr/bin/vi" #define _PATH_WTMP "/var/log/wtmp" |