From: Bruno Haible Date: Wed, 27 Jul 2005 11:27:54 +0000 (+0000) Subject: Tidy up exported symbols of libintl library. X-Git-Tag: v0.15~450 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ef9ec26435a02b72c97346e0d35580de048c8e0;p=thirdparty%2Fgettext.git Tidy up exported symbols of libintl library. --- diff --git a/ChangeLog b/ChangeLog index 06f1a6741..6b9ac145c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-07-24 Bruno Haible + + Tidy up exported symbols. + * PACKAGING: Mention visibility.m4. + 2005-07-16 Bruno Haible * PACKAGING: Add lock.m4. diff --git a/PACKAGING b/PACKAGING index ab24c9a65..025f2516c 100644 --- a/PACKAGING +++ b/PACKAGING @@ -142,6 +142,7 @@ following file list. $prefix/share/aclocal/stdint_h.m4 $prefix/share/aclocal/uintmax_t.m4 $prefix/share/aclocal/ulonglong.m4 + $prefix/share/aclocal/visibility.m4 $prefix/share/aclocal/wchar_t.m4 $prefix/share/aclocal/wint_t.m4 $prefix/share/aclocal/xsize.m4 diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 78a236500..2fe4cc76e 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,27 @@ +2005-07-24 Bruno Haible + + Tidy up exported symbols. + * export.h: New file. + * gettextP.h: Move declarations so that libgnuintl.h is included + before loadinfo.h. Needed because libgnuintl.h defines + LIBINTL_DLL_EXPORTED and loadinfo.h uses it. + (_nl_msg_cat_cntr): Export. + * loadinfo.h (LIBINTL_DLL_EXPORTED): Provide fallback declaration. + (_nl_expand_alias): Export. + * bindtextdom.c: Include gettextP.h before libgnuintl.h. Needed so + that _INTL_REDIRECT_MACROS is defined when libgnuintl.h is included. + Otherwise libgnuintl.h may choose to use _INTL_REDIRECT_ASM, and then + gcc-4.0 ignores visibility declarations. + * textdomain.c: Likewise. + * relocatable.h (RELOCATABLE_DLL_EXPORTED) [HAVE_VISIBILITY]: Define + to the gcc visibility attribute. + * Makefile.in (DEFS): Define also BUILDING_LIBINTL and BUILDING_DLL. + (CFLAGS): Add CFLAG_VISIBILITY. + (DISTFILES.common): Add export.h. + (libgnuintl.h): Add LIBINTL_DLL_EXPORTED definition and uses. + (libintl.h): Create directly from libgnuintl.h.in, without + LIBINTL_DLL_EXPORTED. + 2005-07-21 Bruno Haible * plural.y: Modify comment about #pragma alloca. diff --git a/gettext-runtime/intl/Makefile.in b/gettext-runtime/intl/Makefile.in index 23266c036..ca99d48e3 100644 --- a/gettext-runtime/intl/Makefile.in +++ b/gettext-runtime/intl/Makefile.in @@ -52,14 +52,16 @@ RANLIB = @RANLIB@ YACC = @INTLBISON@ -y -d YFLAGS = --name-prefix=__gettext +# -DBUILDING_LIBINTL: Change expansion of LIBINTL_DLL_EXPORTED macro. +# -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro. DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ --DLIBDIR=\"$(libdir)\" -DIN_LIBINTL \ +-DLIBDIR=\"$(libdir)\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL \ -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \ -Dset_relocation_prefix=libintl_set_relocation_prefix \ -Drelocate=libintl_relocate \ -DDEPENDS_ON_LIBICONV=1 @DEFS@ CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ @CFLAG_VISIBILITY@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ @@ -137,7 +139,8 @@ OBJECTS = \ osdep.$lo \ intl-compat.$lo DISTFILES.common = Makefile.in \ -config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES) +config.charset locale.alias ref-add.sin ref-del.sin export.h \ +$(HEADERS) $(SOURCES) DISTFILES.generated = plural.c DISTFILES.normal = VERSION DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \ @@ -251,10 +254,18 @@ libgnuintl.h: $(srcdir)/libgnuintl.h.in -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ - < $(srcdir)/libgnuintl.h.in > libgnuintl.h + < $(srcdir)/libgnuintl.h.in \ + | sed -e 's/extern \([^"]\)/extern LIBINTL_DLL_EXPORTED \1/' \ + -e "/#define _LIBINTL_H/r $(srcdir)/export.h" \ + | sed -e 's,@''HAVE_VISIBILITY''@,@HAVE_VISIBILITY@,g' \ + > libgnuintl.h -libintl.h: libgnuintl.h - cp libgnuintl.h libintl.h +libintl.h: $(srcdir)/libgnuintl.h.in + sed -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \ + -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ + -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ + -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ + < $(srcdir)/libgnuintl.h.in > libintl.h charset.alias: $(srcdir)/config.charset $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ diff --git a/gettext-runtime/intl/bindtextdom.c b/gettext-runtime/intl/bindtextdom.c index 069ac6e9a..405bdad66 100644 --- a/gettext-runtime/intl/bindtextdom.c +++ b/gettext-runtime/intl/bindtextdom.c @@ -24,12 +24,12 @@ #include #include +#include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif -#include "gettextP.h" /* Handle multi-threaded applications. */ #ifdef _LIBC diff --git a/gettext-runtime/intl/gettextP.h b/gettext-runtime/intl/gettextP.h index d2c97ba37..134b8d8c8 100644 --- a/gettext-runtime/intl/gettextP.h +++ b/gettext-runtime/intl/gettextP.h @@ -30,6 +30,44 @@ # endif #endif +#ifdef _LIBC +extern char *__gettext (const char *__msgid); +extern char *__dgettext (const char *__domainname, const char *__msgid); +extern char *__dcgettext (const char *__domainname, const char *__msgid, + int __category); +extern char *__ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n); +extern char *__dngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int n); +extern char *__dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category); +extern char *__dcigettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + int __plural, unsigned long int __n, + int __category); +extern char *__textdomain (const char *__domainname); +extern char *__bindtextdomain (const char *__domainname, + const char *__dirname); +extern char *__bind_textdomain_codeset (const char *__domainname, + const char *__codeset); +extern void _nl_finddomain_subfreeres (void) attribute_hidden; +extern void _nl_unload_domain (struct loaded_domain *__domain) + internal_function attribute_hidden; +#else +/* Declare the exported libintl_* functions, in a way that allows us to + call them under their real name. */ +# undef _INTL_REDIRECT_INLINE +# undef _INTL_REDIRECT_MACROS +# define _INTL_REDIRECT_MACROS +# include "libgnuintl.h" +extern char *libintl_dcigettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + int __plural, unsigned long int __n, + int __category); +#endif + #include "loadinfo.h" #include "gmo.h" /* Get nls_uint32. */ @@ -161,7 +199,7 @@ struct binding /* A counter which is incremented each time some previous translations become invalid. This variable is part of the external ABI of the GNU libintl. */ -extern int _nl_msg_cat_cntr; +extern LIBINTL_DLL_EXPORTED int _nl_msg_cat_cntr; #ifndef _LIBC const char *_nl_language_preferences_default (void); @@ -183,44 +221,6 @@ char *_nl_find_msg (struct loaded_l10nfile *domain_file, int convert, size_t *lengthp) internal_function; -#ifdef _LIBC -extern char *__gettext (const char *__msgid); -extern char *__dgettext (const char *__domainname, const char *__msgid); -extern char *__dcgettext (const char *__domainname, const char *__msgid, - int __category); -extern char *__ngettext (const char *__msgid1, const char *__msgid2, - unsigned long int __n); -extern char *__dngettext (const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int n); -extern char *__dcngettext (const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n, int __category); -extern char *__dcigettext (const char *__domainname, - const char *__msgid1, const char *__msgid2, - int __plural, unsigned long int __n, - int __category); -extern char *__textdomain (const char *__domainname); -extern char *__bindtextdomain (const char *__domainname, - const char *__dirname); -extern char *__bind_textdomain_codeset (const char *__domainname, - const char *__codeset); -extern void _nl_finddomain_subfreeres (void) attribute_hidden; -extern void _nl_unload_domain (struct loaded_domain *__domain) - internal_function attribute_hidden; -#else -/* Declare the exported libintl_* functions, in a way that allows us to - call them under their real name. */ -# undef _INTL_REDIRECT_INLINE -# undef _INTL_REDIRECT_MACROS -# define _INTL_REDIRECT_MACROS -# include "libgnuintl.h" -extern char *libintl_dcigettext (const char *__domainname, - const char *__msgid1, const char *__msgid2, - int __plural, unsigned long int __n, - int __category); -#endif - /* @@ begin of epilog @@ */ #endif /* gettextP.h */ diff --git a/gettext-runtime/intl/loadinfo.h b/gettext-runtime/intl/loadinfo.h index d67225541..6e4b0c81c 100644 --- a/gettext-runtime/intl/loadinfo.h +++ b/gettext-runtime/intl/loadinfo.h @@ -36,6 +36,10 @@ # define internal_function #endif +#ifndef LIBINTL_DLL_EXPORTED +# define LIBINTL_DLL_EXPORTED +#endif + /* Tell the compiler when a conditional or integer expression is almost always true or almost always false. */ #ifndef HAVE_BUILTIN_EXPECT @@ -110,7 +114,8 @@ _nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, /* Lookup the real locale name for a locale alias NAME, or NULL if NAME is not a locale alias (but possibly a real locale name). The return value is statically allocated and must not be freed. */ -extern const char *_nl_expand_alias (const char *name); +/* Part of the libintl ABI only for the sake of the gettext.m4 macro. */ +extern LIBINTL_DLL_EXPORTED const char *_nl_expand_alias (const char *name); /* Split a locale name NAME into its pieces: language, modifier, territory, codeset, special, sponsor, revision. diff --git a/gettext-runtime/intl/relocatable.h b/gettext-runtime/intl/relocatable.h index 614e64e2f..f6d38321a 100644 --- a/gettext-runtime/intl/relocatable.h +++ b/gettext-runtime/intl/relocatable.h @@ -1,5 +1,5 @@ /* Provide relocatable packages. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2005 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it @@ -31,7 +31,9 @@ extern "C" { /* When building a DLL, we must export some functions. Note that because this is a private .h file, we don't need to use __declspec(dllimport) in any case. */ -#if defined _MSC_VER && BUILDING_DLL +#if HAVE_VISIBILITY && BUILDING_DLL +# define RELOCATABLE_DLL_EXPORTED __attribute__((__visibility__("default"))) +#elif defined _MSC_VER && BUILDING_DLL # define RELOCATABLE_DLL_EXPORTED __declspec(dllexport) #else # define RELOCATABLE_DLL_EXPORTED diff --git a/gettext-runtime/intl/textdomain.c b/gettext-runtime/intl/textdomain.c index 6f50edf53..23e91c874 100644 --- a/gettext-runtime/intl/textdomain.c +++ b/gettext-runtime/intl/textdomain.c @@ -23,12 +23,12 @@ #include #include +#include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif -#include "gettextP.h" /* Handle multi-threaded applications. */ #ifdef _LIBC diff --git a/gettext-runtime/m4/ChangeLog b/gettext-runtime/m4/ChangeLog index 6f8bd368c..c9708f25a 100644 --- a/gettext-runtime/m4/ChangeLog +++ b/gettext-runtime/m4/ChangeLog @@ -1,3 +1,10 @@ +2005-07-24 Bruno Haible + + Tidy up exported symbols. + * gettext.m4 (AM_INTL_SUBDIR): Require gl_VISIBILITY. + * visibility.m4: New file. + * Makefile.am (EXTRA_DIST): Add it. + 2005-07-26 Bruno Haible * lock.m4 (gl_LOCK): On OSF/1 with cc, use -D_REENTRANT, not -pthread. diff --git a/gettext-runtime/m4/Makefile.am b/gettext-runtime/m4/Makefile.am index f08ee1ebc..3b45d07dc 100644 --- a/gettext-runtime/m4/Makefile.am +++ b/gettext-runtime/m4/Makefile.am @@ -28,6 +28,7 @@ size_max.m4 \ stdint_h.m4 \ uintmax_t.m4 \ ulonglong.m4 \ +visibility.m4 \ wchar_t.m4 \ wint_t.m4 \ xsize.m4 diff --git a/gettext-runtime/m4/gettext.m4 b/gettext-runtime/m4/gettext.m4 index 0355f737a..76da57e27 100644 --- a/gettext-runtime/m4/gettext.m4 +++ b/gettext-runtime/m4/gettext.m4 @@ -1,4 +1,4 @@ -# gettext.m4 serial 40 (gettext-0.15) +# gettext.m4 serial 41 (gettext-0.15) dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -365,6 +365,7 @@ AC_DEFUN([AM_INTL_SUBDIR], AC_REQUIRE([gt_GLIBC2])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([gl_VISIBILITY])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([bh_C_SIGNED])dnl diff --git a/gettext-tools/doc/ChangeLog b/gettext-tools/doc/ChangeLog index 21330f209..341e0e3f9 100644 --- a/gettext-tools/doc/ChangeLog +++ b/gettext-tools/doc/ChangeLog @@ -1,3 +1,8 @@ +2005-07-24 Bruno Haible + + Tidy up exported symbols. + * gettext.texi (aclocal): Mention visibility.m4. + 2005-05-17 Bruno Haible * gettext.texi (Why): Mention libgettextpo. diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index 4057ec4a7..a5ac7b154 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -6659,7 +6659,7 @@ the simplest is to concatenate the files @file{codeset.m4}, @file{longdouble.m4}, @file{longlong.m4}, @file{printf-posix.m4}, @file{progtest.m4}, @file{signed.m4}, @file{size_max.m4}, @file{stdint_h.m4}, @file{uintmax_t.m4}, @file{ulonglong.m4}, -@file{wchar_t.m4}, @file{wint_t.m4}, @file{xsize.m4} +@file{visibility.m4}, @file{wchar_t.m4}, @file{wint_t.m4}, @file{xsize.m4} from GNU @code{gettext}'s @file{m4/} directory into a single file. If you have suppressed the @file{intl/} directory, only @file{gettext.m4}, @file{iconv.m4}, diff --git a/gettext-tools/examples/ChangeLog b/gettext-tools/examples/ChangeLog index 233436601..3e7e98bad 100644 --- a/gettext-tools/examples/ChangeLog +++ b/gettext-tools/examples/ChangeLog @@ -1,3 +1,21 @@ +2005-07-24 Bruno Haible + + Tidy up exported symbols. + * hello-c/m4/Makefile.am (EXTRA_DIST): Add visibility.m4. + * hello-c-gnome/m4/Makefile.am (EXTRA_DIST): Likewise. + * hello-c++/m4/Makefile.am (EXTRA_DIST): Likewise. + * hello-c++-gnome/m4/Makefile.am (EXTRA_DIST): Likewise. + * hello-c++-kde/m4/Makefile.am (EXTRA_DIST): Likewise. + * hello-objc/m4/Makefile.am (EXTRA_DIST): Likewise. + * hello-objc-gnome/m4/Makefile.am (EXTRA_DIST): Likewise. + * hello-c/autoclean.sh: Remove also m4/visibility.m4. + * hello-c-gnome/autoclean.sh: Likewise. + * hello-c++/autoclean.sh: Likewise. + * hello-c++-gnome/autoclean.sh: Likewise. + * hello-c++-kde/autoclean.sh: Likewise. + * hello-objc/autoclean.sh: Likewise. + * hello-objc-gnome/autoclean.sh: Likewise. + 2005-07-26 Bruno Haible * installpaths.in (datarootdir): New variable. diff --git a/gettext-tools/examples/hello-c++-gnome/autoclean.sh b/gettext-tools/examples/hello-c++-gnome/autoclean.sh index 97a6bdf66..ef77e4fc0 100755 --- a/gettext-tools/examples/hello-c++-gnome/autoclean.sh +++ b/gettext-tools/examples/hello-c++-gnome/autoclean.sh @@ -37,6 +37,7 @@ rm -f m4/size_max.m4 rm -f m4/stdint_h.m4 rm -f m4/uintmax_t.m4 rm -f m4/ulonglong.m4 +rm -f m4/visibility.m4 rm -f m4/wchar_t.m4 rm -f m4/wint_t.m4 rm -f m4/xsize.m4 diff --git a/gettext-tools/examples/hello-c++-gnome/m4/Makefile.am b/gettext-tools/examples/hello-c++-gnome/m4/Makefile.am index b9234cb11..96932ee18 100644 --- a/gettext-tools/examples/hello-c++-gnome/m4/Makefile.am +++ b/gettext-tools/examples/hello-c++-gnome/m4/Makefile.am @@ -2,6 +2,6 @@ EXTRA_DIST = \ codeset.m4 gettext.m4 glibc2.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 \ inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 \ lib-link.m4 lib-prefix.m4 lock.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 \ - uintmax_t.m4 ulonglong.m4 \ + uintmax_t.m4 ulonglong.m4 visibility.m4 \ gnome.m4 gnome-gnorba-check.m4 gnome-orbit-check.m4 \ gtk.m4 gtk--.m4 diff --git a/gettext-tools/examples/hello-c++-kde/autoclean.sh b/gettext-tools/examples/hello-c++-kde/autoclean.sh index a1ac65d36..f31beada9 100755 --- a/gettext-tools/examples/hello-c++-kde/autoclean.sh +++ b/gettext-tools/examples/hello-c++-kde/autoclean.sh @@ -43,6 +43,7 @@ rm -f m4/size_max.m4 rm -f m4/stdint_h.m4 rm -f m4/uintmax_t.m4 rm -f m4/ulonglong.m4 +rm -f m4/visibility.m4 rm -f m4/wchar_t.m4 rm -f m4/wint_t.m4 rm -f m4/xsize.m4 diff --git a/gettext-tools/examples/hello-c++-kde/m4/Makefile.am b/gettext-tools/examples/hello-c++-kde/m4/Makefile.am index 17eb6916f..5175620ef 100644 --- a/gettext-tools/examples/hello-c++-kde/m4/Makefile.am +++ b/gettext-tools/examples/hello-c++-kde/m4/Makefile.am @@ -2,4 +2,4 @@ EXTRA_DIST = \ codeset.m4 gettext.m4 glibc2.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 \ inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 \ lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 \ - ulonglong.m4 + ulonglong.m4 visibility.m4 diff --git a/gettext-tools/examples/hello-c++/autoclean.sh b/gettext-tools/examples/hello-c++/autoclean.sh index 4ba50c644..591d6a950 100755 --- a/gettext-tools/examples/hello-c++/autoclean.sh +++ b/gettext-tools/examples/hello-c++/autoclean.sh @@ -40,6 +40,7 @@ rm -f m4/size_max.m4 rm -f m4/stdint_h.m4 rm -f m4/uintmax_t.m4 rm -f m4/ulonglong.m4 +rm -f m4/visibility.m4 rm -f m4/wchar_t.m4 rm -f m4/wint_t.m4 rm -f m4/xsize.m4 diff --git a/gettext-tools/examples/hello-c++/m4/Makefile.am b/gettext-tools/examples/hello-c++/m4/Makefile.am index 9b035f975..73a56f5e9 100644 --- a/gettext-tools/examples/hello-c++/m4/Makefile.am +++ b/gettext-tools/examples/hello-c++/m4/Makefile.am @@ -2,4 +2,4 @@ EXTRA_DIST = \ codeset.m4 gettext.m4 glibc2.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 \ inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 \ lib-link.m4 lib-prefix.m4 lock.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 \ - uintmax_t.m4 ulonglong.m4 + uintmax_t.m4 ulonglong.m4 visibility.m4 diff --git a/gettext-tools/examples/hello-c-gnome/autoclean.sh b/gettext-tools/examples/hello-c-gnome/autoclean.sh index 97a6bdf66..ef77e4fc0 100755 --- a/gettext-tools/examples/hello-c-gnome/autoclean.sh +++ b/gettext-tools/examples/hello-c-gnome/autoclean.sh @@ -37,6 +37,7 @@ rm -f m4/size_max.m4 rm -f m4/stdint_h.m4 rm -f m4/uintmax_t.m4 rm -f m4/ulonglong.m4 +rm -f m4/visibility.m4 rm -f m4/wchar_t.m4 rm -f m4/wint_t.m4 rm -f m4/xsize.m4 diff --git a/gettext-tools/examples/hello-c-gnome/m4/Makefile.am b/gettext-tools/examples/hello-c-gnome/m4/Makefile.am index 52a0787e9..22f5b2361 100644 --- a/gettext-tools/examples/hello-c-gnome/m4/Makefile.am +++ b/gettext-tools/examples/hello-c-gnome/m4/Makefile.am @@ -2,5 +2,5 @@ EXTRA_DIST = \ codeset.m4 gettext.m4 glibc2.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 \ inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 \ lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 \ - ulonglong.m4 \ + ulonglong.m4 visibility.m4 \ gnome.m4 gnome-gnorba-check.m4 gnome-orbit-check.m4 diff --git a/gettext-tools/examples/hello-c/autoclean.sh b/gettext-tools/examples/hello-c/autoclean.sh index 4ba50c644..591d6a950 100755 --- a/gettext-tools/examples/hello-c/autoclean.sh +++ b/gettext-tools/examples/hello-c/autoclean.sh @@ -40,6 +40,7 @@ rm -f m4/size_max.m4 rm -f m4/stdint_h.m4 rm -f m4/uintmax_t.m4 rm -f m4/ulonglong.m4 +rm -f m4/visibility.m4 rm -f m4/wchar_t.m4 rm -f m4/wint_t.m4 rm -f m4/xsize.m4 diff --git a/gettext-tools/examples/hello-c/m4/Makefile.am b/gettext-tools/examples/hello-c/m4/Makefile.am index 9b035f975..73a56f5e9 100644 --- a/gettext-tools/examples/hello-c/m4/Makefile.am +++ b/gettext-tools/examples/hello-c/m4/Makefile.am @@ -2,4 +2,4 @@ EXTRA_DIST = \ codeset.m4 gettext.m4 glibc2.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 \ inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 \ lib-link.m4 lib-prefix.m4 lock.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 \ - uintmax_t.m4 ulonglong.m4 + uintmax_t.m4 ulonglong.m4 visibility.m4 diff --git a/gettext-tools/examples/hello-objc-gnome/autoclean.sh b/gettext-tools/examples/hello-objc-gnome/autoclean.sh index 97a6bdf66..ef77e4fc0 100755 --- a/gettext-tools/examples/hello-objc-gnome/autoclean.sh +++ b/gettext-tools/examples/hello-objc-gnome/autoclean.sh @@ -37,6 +37,7 @@ rm -f m4/size_max.m4 rm -f m4/stdint_h.m4 rm -f m4/uintmax_t.m4 rm -f m4/ulonglong.m4 +rm -f m4/visibility.m4 rm -f m4/wchar_t.m4 rm -f m4/wint_t.m4 rm -f m4/xsize.m4 diff --git a/gettext-tools/examples/hello-objc-gnome/m4/Makefile.am b/gettext-tools/examples/hello-objc-gnome/m4/Makefile.am index 18662e820..c0e5dab95 100644 --- a/gettext-tools/examples/hello-objc-gnome/m4/Makefile.am +++ b/gettext-tools/examples/hello-objc-gnome/m4/Makefile.am @@ -2,5 +2,5 @@ EXTRA_DIST = \ codeset.m4 gettext.m4 glibc2.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 \ inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 \ lib-link.m4 lib-prefix.m4 lock.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 \ - uintmax_t.m4 ulonglong.m4 \ + uintmax_t.m4 ulonglong.m4 visibility.m4 \ gnome.m4 gnome-gnorba-check.m4 gnome-orbit-check.m4 diff --git a/gettext-tools/examples/hello-objc/autoclean.sh b/gettext-tools/examples/hello-objc/autoclean.sh index 4ba50c644..591d6a950 100755 --- a/gettext-tools/examples/hello-objc/autoclean.sh +++ b/gettext-tools/examples/hello-objc/autoclean.sh @@ -40,6 +40,7 @@ rm -f m4/size_max.m4 rm -f m4/stdint_h.m4 rm -f m4/uintmax_t.m4 rm -f m4/ulonglong.m4 +rm -f m4/visibility.m4 rm -f m4/wchar_t.m4 rm -f m4/wint_t.m4 rm -f m4/xsize.m4 diff --git a/gettext-tools/examples/hello-objc/m4/Makefile.am b/gettext-tools/examples/hello-objc/m4/Makefile.am index 9b035f975..73a56f5e9 100644 --- a/gettext-tools/examples/hello-objc/m4/Makefile.am +++ b/gettext-tools/examples/hello-objc/m4/Makefile.am @@ -2,4 +2,4 @@ EXTRA_DIST = \ codeset.m4 gettext.m4 glibc2.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 \ inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 \ lib-link.m4 lib-prefix.m4 lock.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 \ - uintmax_t.m4 ulonglong.m4 + uintmax_t.m4 ulonglong.m4 visibility.m4 diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index 452d6076a..503090569 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,9 @@ +2005-07-24 Bruno Haible + + Tidy up exported symbols. + * relocatable.h (RELOCATABLE_DLL_EXPORTED) [HAVE_VISIBILITY]: Define + to the gcc visibility attribute. + 2005-07-22 Bruno Haible * Makefile.am: Remove rules depending on @STDBOOL_H@, @ALLOCA_H@, diff --git a/gettext-tools/lib/relocatable.h b/gettext-tools/lib/relocatable.h index 614e64e2f..f6d38321a 100644 --- a/gettext-tools/lib/relocatable.h +++ b/gettext-tools/lib/relocatable.h @@ -1,5 +1,5 @@ /* Provide relocatable packages. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2005 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it @@ -31,7 +31,9 @@ extern "C" { /* When building a DLL, we must export some functions. Note that because this is a private .h file, we don't need to use __declspec(dllimport) in any case. */ -#if defined _MSC_VER && BUILDING_DLL +#if HAVE_VISIBILITY && BUILDING_DLL +# define RELOCATABLE_DLL_EXPORTED __attribute__((__visibility__("default"))) +#elif defined _MSC_VER && BUILDING_DLL # define RELOCATABLE_DLL_EXPORTED __declspec(dllexport) #else # define RELOCATABLE_DLL_EXPORTED diff --git a/gettext-tools/m4/ChangeLog b/gettext-tools/m4/ChangeLog index b00539548..954e09d69 100644 --- a/gettext-tools/m4/ChangeLog +++ b/gettext-tools/m4/ChangeLog @@ -1,3 +1,8 @@ +2005-07-24 Bruno Haible + + Tidy up exported symbols. + * Makefile.am (aclocal_DATA): Add visibility.m4. + 2005-07-16 Bruno Haible * Makefile.am (aclocal_DATA): Add lock.m4. diff --git a/gettext-tools/m4/Makefile.am b/gettext-tools/m4/Makefile.am index cca432121..43ef0767f 100644 --- a/gettext-tools/m4/Makefile.am +++ b/gettext-tools/m4/Makefile.am @@ -31,6 +31,7 @@ aclocal_DATA = \ ../../gettext-runtime/m4/stdint_h.m4 \ ../../gettext-runtime/m4/uintmax_t.m4 \ ../../gettext-runtime/m4/ulonglong.m4 \ + ../../gettext-runtime/m4/visibility.m4 \ ../../gettext-runtime/m4/wchar_t.m4 \ ../../gettext-runtime/m4/wint_t.m4 \ ../../gettext-runtime/m4/xsize.m4 diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog index 66e202f7a..701759e2b 100644 --- a/gettext-tools/misc/ChangeLog +++ b/gettext-tools/misc/ChangeLog @@ -1,3 +1,8 @@ +2005-07-24 Bruno Haible + + Tidy up exported symbols. + * gettextize.in (m4filelist): Add visibility.m4. + 2005-07-26 Bruno Haible * autopoint.in (datarootdir): New variable. diff --git a/gettext-tools/misc/gettextize.in b/gettext-tools/misc/gettextize.in index 7261a6ee1..dca7e7dbe 100644 --- a/gettext-tools/misc/gettextize.in +++ b/gettext-tools/misc/gettextize.in @@ -722,12 +722,12 @@ m4filelist=' codeset.m4 gettext.m4 glibc2.m4 glibc21.m4 iconv.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 lock.m4 longdouble.m4 longlong.m4 nls.m4 po.m4 printf-posix.m4 progtest.m4 signed.m4 size_max.m4 stdint_h.m4 - uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4' + uintmax_t.m4 ulonglong.m4 visibility.m4 wchar_t.m4 wint_t.m4 xsize.m4' # We cannot omit codeset.m4, glibc2.m4, glibc21.m4, intdiv0.m4, intmax.m4, # inttypes.m4, inttypes_h.m4, inttypes-pri.m4, isc-posix.m4, lcmessage.m4, # lock.m4, longdouble.m4, longlong.m4, nls.m4, po.m4, printf-posix.m4, -# signed.m4, size_max.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, wchar_t.m4, -# wint_t.m4, xsize.m4 +# signed.m4, size_max.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, +# visibility.m4, wchar_t.m4, wint_t.m4, xsize.m4 # if test -z "$intldir", otherwise "aclocal -I m4" might give an error. # (aclocal doesn't know which macros are really needed, it looks which macros # are potentially needed.)