]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Tidy up exported symbols of libintl library.
authorBruno Haible <bruno@clisp.org>
Wed, 27 Jul 2005 11:27:54 +0000 (11:27 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:42 +0000 (12:12 +0200)
35 files changed:
ChangeLog
PACKAGING
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/Makefile.in
gettext-runtime/intl/bindtextdom.c
gettext-runtime/intl/gettextP.h
gettext-runtime/intl/loadinfo.h
gettext-runtime/intl/relocatable.h
gettext-runtime/intl/textdomain.c
gettext-runtime/m4/ChangeLog
gettext-runtime/m4/Makefile.am
gettext-runtime/m4/gettext.m4
gettext-tools/doc/ChangeLog
gettext-tools/doc/gettext.texi
gettext-tools/examples/ChangeLog
gettext-tools/examples/hello-c++-gnome/autoclean.sh
gettext-tools/examples/hello-c++-gnome/m4/Makefile.am
gettext-tools/examples/hello-c++-kde/autoclean.sh
gettext-tools/examples/hello-c++-kde/m4/Makefile.am
gettext-tools/examples/hello-c++/autoclean.sh
gettext-tools/examples/hello-c++/m4/Makefile.am
gettext-tools/examples/hello-c-gnome/autoclean.sh
gettext-tools/examples/hello-c-gnome/m4/Makefile.am
gettext-tools/examples/hello-c/autoclean.sh
gettext-tools/examples/hello-c/m4/Makefile.am
gettext-tools/examples/hello-objc-gnome/autoclean.sh
gettext-tools/examples/hello-objc-gnome/m4/Makefile.am
gettext-tools/examples/hello-objc/autoclean.sh
gettext-tools/examples/hello-objc/m4/Makefile.am
gettext-tools/lib/ChangeLog
gettext-tools/lib/relocatable.h
gettext-tools/m4/ChangeLog
gettext-tools/m4/Makefile.am
gettext-tools/misc/ChangeLog
gettext-tools/misc/gettextize.in

index 06f1a67416310badbeff1566dee939891a0df1ff..6b9ac145c08c2c277a27b67e8ae8b24e9a1e8e01 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-24  Bruno Haible  <bruno@clisp.org>
+
+       Tidy up exported symbols.
+       * PACKAGING: Mention visibility.m4.
+
 2005-07-16  Bruno Haible  <bruno@clisp.org>
 
        * PACKAGING: Add lock.m4.
index ab24c9a652a22480ea0495df583f128dd602b9e2..025f2516c2518bcd7bc0e72c5215b8d418b2dcb4 100644 (file)
--- 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
index 78a2365005c2c1a5a1c251da910a881e2d8a3f18..2fe4cc76e7f72f873e8d496384451de7bcc14451 100644 (file)
@@ -1,3 +1,27 @@
+2005-07-24  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        * plural.y: Modify comment about #pragma alloca.
index 23266c03665c8155891070d7616e6784a9ddb319..ca99d48e3a67c1a9117ef731d734a259990331f7 100644 (file)
@@ -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-$@
index 069ac6e9a087aa72b03b228ae590ab851cf7ecf6..405bdad66dfe3738a7486097538dc02023cce0b8 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
+#include "gettextP.h"
 #ifdef _LIBC
 # include <libintl.h>
 #else
 # include "libgnuintl.h"
 #endif
-#include "gettextP.h"
 
 /* Handle multi-threaded applications.  */
 #ifdef _LIBC
index d2c97ba37d5992c0ec1bb1628ba4f5150acd879d..134b8d8c8161771e208b8c323b4dd46d4fa6b288 100644 (file)
 # 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  */
index d67225541164fe2c44db0c66b0f2c3092516e91c..6e4b0c81c1c79db6d6825d51a7679d5c9a9d2f29 100644 (file)
 # 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.
index 614e64e2fafc930707fb5bc1f429ba2ae5b3b78d..f6d38321aef89ddd01e23a670298a4e2e8bd74e7 100644 (file)
@@ -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 <bruno@clisp.org>, 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
index 6f50edf53b3f88aab327783f6c12ee90fe7a63fd..23e91c8743c498a2bdcb66f610a17da20b687782 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
+#include "gettextP.h"
 #ifdef _LIBC
 # include <libintl.h>
 #else
 # include "libgnuintl.h"
 #endif
-#include "gettextP.h"
 
 /* Handle multi-threaded applications.  */
 #ifdef _LIBC
index 6f8bd368cff5b6776295173c20e177d5970a5f03..c9708f25a3ee62b92754a7af78b51589fff119f8 100644 (file)
@@ -1,3 +1,10 @@
+2005-07-24  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        * lock.m4 (gl_LOCK): On OSF/1 with cc, use -D_REENTRANT, not -pthread.
index f08ee1ebcb51c39346c632ab98f8b8689d6e0f27..3b45d07dc5234339203669774a4ca3e6a6ff18d3 100644 (file)
@@ -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
index 0355f737a5f05887d464f181f08e26e73230a99a..76da57e2708394fbdbcaea505cd2b43336bd256d 100644 (file)
@@ -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
index 21330f209fddadb7aa5fcfed33d9c643e5eed31a..341e0e3f9d5c955cf78de0dd73db44433ff779b7 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-24  Bruno Haible  <bruno@clisp.org>
+
+       Tidy up exported symbols.
+       * gettext.texi (aclocal): Mention visibility.m4.
+
 2005-05-17  Bruno Haible  <bruno@clisp.org>
 
        * gettext.texi (Why): Mention libgettextpo.
index 4057ec4a76939359d5f6b28a02c8ee2892b6eeb8..a5ac7b1549c39db47f84833693a80c6ce8878178 100644 (file)
@@ -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},
index 2334366012779d5cd3cba4e07805d3f42e1fb03b..3e7e98baddc2cf28a10d12340e74b36398c54041 100644 (file)
@@ -1,3 +1,21 @@
+2005-07-24  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        * installpaths.in (datarootdir): New variable.
index 97a6bdf66e310c278e7057571e9c56c15fa5a0c9..ef77e4fc0e44b7da0dcf5c8f53d0e4ce0c145811 100755 (executable)
@@ -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
index b9234cb11534a524f11e389e7e053852ddab3b33..96932ee18c9ea70fb2f1e9dec64ab3d998f962bb 100644 (file)
@@ -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
index a1ac65d368e31948e19236e584081cbbd18699a8..f31beada9af61a0dfa0edec5a1471617be82c732 100755 (executable)
@@ -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
index 17eb6916ff242eb0fbe5b50c33f22338dbce9291..5175620ef39055823f941abc56a2e7b0f2f53f33 100644 (file)
@@ -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
index 4ba50c6447032c689004157aff02ca67df30c70f..591d6a950f11d3830de695700957ad862cc91570 100755 (executable)
@@ -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
index 9b035f975d8c990ea43ce8cca20061e4998a25cc..73a56f5e9be34b1718c65ea166cd4e9490ac8839 100644 (file)
@@ -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
index 97a6bdf66e310c278e7057571e9c56c15fa5a0c9..ef77e4fc0e44b7da0dcf5c8f53d0e4ce0c145811 100755 (executable)
@@ -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
index 52a0787e946d07c62985d470768770a8ded3ce02..22f5b2361bcd5a77b1d28ea6b2c5a188e721bd14 100644 (file)
@@ -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
index 4ba50c6447032c689004157aff02ca67df30c70f..591d6a950f11d3830de695700957ad862cc91570 100755 (executable)
@@ -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
index 9b035f975d8c990ea43ce8cca20061e4998a25cc..73a56f5e9be34b1718c65ea166cd4e9490ac8839 100644 (file)
@@ -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
index 97a6bdf66e310c278e7057571e9c56c15fa5a0c9..ef77e4fc0e44b7da0dcf5c8f53d0e4ce0c145811 100755 (executable)
@@ -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
index 18662e820389e30d854348c38d01fad442dd20df..c0e5dab950552315963cc9b84ef7825ce8251fe7 100644 (file)
@@ -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
index 4ba50c6447032c689004157aff02ca67df30c70f..591d6a950f11d3830de695700957ad862cc91570 100755 (executable)
@@ -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
index 9b035f975d8c990ea43ce8cca20061e4998a25cc..73a56f5e9be34b1718c65ea166cd4e9490ac8839 100644 (file)
@@ -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
index 452d6076a9112c5f9a1b5fd3c02c4df76399c779..5030905698e9d2f9a4e5fde5685dade6c10a5b9e 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-24  Bruno Haible  <bruno@clisp.org>
+
+       Tidy up exported symbols.
+       * relocatable.h (RELOCATABLE_DLL_EXPORTED) [HAVE_VISIBILITY]: Define
+       to the gcc visibility attribute.
+
 2005-07-22  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.am: Remove rules depending on @STDBOOL_H@, @ALLOCA_H@,
index 614e64e2fafc930707fb5bc1f429ba2ae5b3b78d..f6d38321aef89ddd01e23a670298a4e2e8bd74e7 100644 (file)
@@ -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 <bruno@clisp.org>, 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
index b00539548a6be8e1a7051d769addd93d3a8f74aa..954e09d6948aa824a1e2e37965ac01350c92b0d2 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-24  Bruno Haible  <bruno@clisp.org>
+
+       Tidy up exported symbols.
+       * Makefile.am (aclocal_DATA): Add visibility.m4.
+
 2005-07-16  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.am (aclocal_DATA): Add lock.m4.
index cca432121c046e1eefc705d12d3650e32ab9cfd4..43ef0767f7f5b2c7ae7df5ab2e90d049369e2b11 100644 (file)
@@ -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
index 66e202f7a7763b029e270bec329be617f20d1955..701759e2bbfb3fe8328d7bd7b0e7649360d352ce 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-24  Bruno Haible  <bruno@clisp.org>
+
+       Tidy up exported symbols.
+       * gettextize.in (m4filelist): Add visibility.m4.
+
 2005-07-26  Bruno Haible  <bruno@clisp.org>
 
        * autopoint.in (datarootdir): New variable.
index 7261a6ee15472d82c7bb8e86004bf19e30f69453..dca7e7dbe5718733ef887709cfad68c9d7335379 100644 (file)
@@ -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.)