From 1eaae9eade5b653616234b32c9a0ba7ba2a18a9f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 9 May 2010 12:52:39 +0200 Subject: [PATCH] Export rpl_optind, rpl_optarg from DLL depending on platform. --- gettext-tools/ChangeLog | 7 +++++++ gettext-tools/configure.ac | 12 +++++++++++- gettext-tools/woe32dll/gettextlib-exports.c | 4 +++- gnulib-local/ChangeLog | 6 ++++++ gnulib-local/modules/gettext-tools-misc | 1 + 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/gettext-tools/ChangeLog b/gettext-tools/ChangeLog index 2054d5603..d276674d1 100644 --- a/gettext-tools/ChangeLog +++ b/gettext-tools/ChangeLog @@ -1,3 +1,10 @@ +2010-05-09 Bruno Haible + + Export rpl_optind, rpl_optarg from DLL depending on platform. + * configure.ac (GETTEXTLIB_EXPORTS_FLAGS): New substituted variable. + * woe32dll/gettextlib-exports.c (rpl_optarg, rpl_optind): Export only + if GNULIB_DEFINED_GETOPT is set. + 2010-04-02 Bruno Haible * Makefile.am (ACLOCAL_AMFLAGS): Remove "-I ../autoconf-lib-link/m4" diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index 27e0ae567..af51c0433 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -1,5 +1,5 @@ dnl Configuration for the gettext-tools directory of GNU gettext -dnl Copyright (C) 1995-1999, 2000-2009 Free Software Foundation, Inc. +dnl Copyright (C) 1995-1999, 2000-2010 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -222,6 +222,16 @@ if test $is_woe32dll = yes; then [Define when --enable-shared is used on mingw or Cygwin.]) fi +dnl woe32dll/gettextlib-exports.c needs to know whether the getopt facility +dnl is replaced by gnulib. GETOPT_H is set by gl_FUNC_GETOPT_POSIX, inside +dnl gl_INIT. +if test -n "$GETOPT_H"; then + GETTEXTLIB_EXPORTS_FLAGS="-DGNULIB_DEFINED_GETOPT" +else + GETTEXTLIB_EXPORTS_FLAGS= +fi +AC_SUBST([GETTEXTLIB_EXPORTS_FLAGS]) + dnl Put some default definitions into config.h. AH_TOP([ /* Default value for alignment of strings in .mo file. */ diff --git a/gettext-tools/woe32dll/gettextlib-exports.c b/gettext-tools/woe32dll/gettextlib-exports.c index b10a0b1fc..a627e1de7 100644 --- a/gettext-tools/woe32dll/gettextlib-exports.c +++ b/gettext-tools/woe32dll/gettextlib-exports.c @@ -1,5 +1,5 @@ /* List of exported symbols of libgettextlib on Cygwin. - Copyright (C) 2006-2007 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2010 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -26,7 +26,9 @@ VARIABLE(exit_failure) VARIABLE(gl_array_list_implementation) VARIABLE(gl_linkedhash_list_implementation) VARIABLE(program_name) +#if GNULIB_DEFINED_GETOPT VARIABLE(rpl_optarg) VARIABLE(rpl_optind) +#endif VARIABLE(simple_backup_suffix) VARIABLE(styled_ostream_typeinfo) diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog index c44a7ff2c..ce80668be 100644 --- a/gnulib-local/ChangeLog +++ b/gnulib-local/ChangeLog @@ -1,3 +1,9 @@ +2010-05-09 Bruno Haible + + Export rpl_optind, rpl_optarg from DLL depending on platform. + * modules/gettext-tools-misc (AM_CPPFLAGS): Augment by + GETTEXTLIB_EXPORTS_FLAGS. + 2010-05-09 Bruno Haible Avoid compilation error in libgettextpo directory on Solaris 8. diff --git a/gnulib-local/modules/gettext-tools-misc b/gnulib-local/modules/gettext-tools-misc index 965f4988b..58035ad89 100644 --- a/gnulib-local/modules/gettext-tools-misc +++ b/gnulib-local/modules/gettext-tools-misc @@ -28,6 +28,7 @@ lib_LDFLAGS += \ if WOE32DLL lib_SOURCES += ../woe32dll/gettextlib-exports.c lib_LDFLAGS += -Wl,--export-all-symbols +AM_CPPFLAGS += @GETTEXTLIB_EXPORTS_FLAGS@ endif # No need to install libgettextlib.a, except on AIX. -- 2.47.2