summary refs log tree commit diff
path: root/intl/tst-gettext5.sh
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-04-28 18:21:03 +0000
committerUlrich Drepper <drepper@redhat.com>2005-04-28 18:21:03 +0000
commit8406a53a2502e0896878bfc2fd5f5726be39604a (patch)
treeae3cd0feeb2f071e4e713184ab99f624bdaf7270 /intl/tst-gettext5.sh
parent572028fa7e0d679b537c66f10d44fa8bb94bde50 (diff)
downloadglibc-8406a53a2502e0896878bfc2fd5f5726be39604a.tar.gz
glibc-8406a53a2502e0896878bfc2fd5f5726be39604a.tar.xz
glibc-8406a53a2502e0896878bfc2fd5f5726be39604a.zip
* sysdeps/i386/i686/memcmp.S: Move misplaced END.
2005-03-27  Bruno Haible  <bruno@clisp.org>

	Make it possible for multiple threads to use gettext() in different
	locales.
	* intl/dcigettext.c (HAVE_PER_THREAD_LOCALE): New macro.
	(struct known_translation_t): If HAVE_PER_THREAD_LOCALE, add localename
	field.
	(transcmp): If HAVE_PER_THREAD_LOCALE, compare localename fields.
	(DCIGETTEXT): If HAVE_PER_THREAD_LOCALE, fill the localename field in
	search and newp.

	* intl/tst-gettext4.c: New file.
	* intl/tst-gettext4.sh: New file.
	* intl/tst-gettext4-de.po: New file.
	* intl/tst-gettext4-fr.po: New file.
	* intl/tst-gettext5.c: New file.
	* intl/tst-gettext5.sh: New file.
	* intl/Makefile (distribute): Add tst-gettext4.sh, tst-gettext4-de.po,
	tst-gettext4-fr.po, tst-gettext5.sh.
	(multithread-test-srcs): New variable.
	(test-srcs): Add its contents.
	(tests): Depend on tst-gettext4.out, tst-gettext5.out.
	(tst-gettext4.out, tst-gettext5.out): New rules.
	(CFLAGS-tst-gettext4.c, CFLAGS-tst-gettext5.c): New variables.
	Add rule for linking the multithread-test-srcs with the appropriate
	thread-library.

2005-04-28  Ulrich Drepper  <drepper@redhat.com>

	* po/rw.po: New file.  From translation team.
Diffstat (limited to 'intl/tst-gettext5.sh')
-rwxr-xr-xintl/tst-gettext5.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/intl/tst-gettext5.sh b/intl/tst-gettext5.sh
new file mode 100755
index 0000000000..bbc58e796f
--- /dev/null
+++ b/intl/tst-gettext5.sh
@@ -0,0 +1,46 @@
+#! /bin/sh
+# Test that gettext() in multithreaded applications works correctly if
+# different threads operate in different locales referring to the same
+# catalog file but with different encodings.
+# Copyright (C) 2001, 2002, 2005 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
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+common_objpfx=$1
+objpfx=$2
+
+LC_ALL=C
+export LC_ALL
+
+# Generate the test data.
+test -d ${objpfx}domaindir || mkdir ${objpfx}domaindir
+# Create the domain directories.
+test -d ${objpfx}domaindir/de_DE || mkdir ${objpfx}domaindir/de_DE
+test -d ${objpfx}domaindir/de_DE/LC_MESSAGES || mkdir ${objpfx}domaindir/de_DE/LC_MESSAGES
+# Populate them.
+msgfmt -o ${objpfx}domaindir/de_DE/LC_MESSAGES/codeset.mo tstcodeset.po
+
+GCONV_PATH=${common_objpfx}iconvdata
+export GCONV_PATH
+LOCPATH=${common_objpfx}localedata
+export LOCPATH
+
+${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${objpfx}tst-gettext5 > ${objpfx}tst-gettext5.out
+
+exit $?