From eb5264ce0b97cdee69873962d38ba62a9cc9397d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 23 Oct 2018 20:29:48 +0200 Subject: [PATCH] intl: Fix support for per-thread locales on Solaris 11.4. * gettext-runtime/intl/localename-table.in.h: Renamed from gettext-runtime/intl/localename-table.h. * gettext-runtime/intl/Makefile.in (HEADERS): Add localename-table.in.h. Remove localename-table.h. (localename-table.h): New target. (localename.$lo, localename-table.$lo): Update dependencies. (mostlyclean): Remove localename-table.h. --- gettext-runtime/intl/Makefile.in | 14 +++++++++++--- .../{localename-table.h => localename-table.in.h} | 0 2 files changed, 11 insertions(+), 3 deletions(-) rename gettext-runtime/intl/{localename-table.h => localename-table.in.h} (100%) diff --git a/gettext-runtime/intl/Makefile.in b/gettext-runtime/intl/Makefile.in index 5efdb4791..17a69370d 100644 --- a/gettext-runtime/intl/Makefile.in +++ b/gettext-runtime/intl/Makefile.in @@ -127,7 +127,7 @@ HEADERS = \ localcharset.h \ lock.h \ relocatable.h \ - localename-table.h \ + localename-table.in.h \ tsearch.h tsearch.c \ verify.h \ xsize.h \ @@ -392,6 +392,14 @@ libintl.h: $(srcdir)/libgnuintl.in.h -e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \ < $(srcdir)/libgnuintl.in.h > libintl.h +localename-table.h: $(srcdir)/localename-table.in.h + sed -e 's/extern \([^"]\)/extern LIBINTL_DLL_EXPORTED \1/' \ + -e 's/extern,/extern LIBINTL_DLL_EXPORTED,/' \ + -e "/#if HAVE_USELOCALE/r $(srcdir)/export.h" \ + < $(srcdir)/localename-table.in.h \ + | sed -e 's,@''HAVE_VISIBILITY''@,@HAVE_VISIBILITY@,g' \ + > localename-table.h + check: all # We must not install the libintl.h/libintl.a files if we are on a @@ -541,7 +549,7 @@ info dvi ps pdf html: $(OBJECTS): ../config.h libgnuintl.h bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo setlocale.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h localename.$lo: $(srcdir)/gettextP.h -localename.$lo localename-table.$lo: $(srcdir)/localename-table.h +localename.$lo localename-table.$lo: localename-table.h hash-string.$lo dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h dcigettext.$lo loadmsgcat.$lo $(PLURAL_OBJECT) plural-exp.$lo: $(srcdir)/plural-exp.h @@ -574,7 +582,7 @@ ID: $(HEADERS) $(SOURCES) mostlyclean: rm -f *.a *.la *.o *.obj *.lo core core.* - rm -f libgnuintl.h libintl.h ref-add.sed ref-del.sed + rm -f libgnuintl.h libintl.h localename-table.h ref-add.sed ref-del.sed rm -f -r .libs _libs rm -f pluralx.c diff --git a/gettext-runtime/intl/localename-table.h b/gettext-runtime/intl/localename-table.in.h similarity index 100% rename from gettext-runtime/intl/localename-table.h rename to gettext-runtime/intl/localename-table.in.h -- 2.47.3