+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.
$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
+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.
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@
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 \
-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-$@
#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
# 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. */
/* 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);
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 */
# 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
/* 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.
/* 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
/* 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
#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
+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.
stdint_h.m4 \
uintmax_t.m4 \
ulonglong.m4 \
+visibility.m4 \
wchar_t.m4 \
wint_t.m4 \
xsize.m4
-# 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,
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
+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.
@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},
+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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
+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@,
/* 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
/* 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
+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.
../../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
+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.
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.)