+2012-12-25 Daiki Ueno <ueno@gnu.org>
+
+ Work around error_* symbol conflict with Cygwin 1.7 DLL.
+ * configure.ac: Reset ac_cv_lib_error_at_line on Cygwin.
+ (GETTEXTLIB_EXPORTS_FLAGS): Add -DGNULIB_DEFINED_ERROR if the
+ error facility is replaced by gnulib.
+ (GNULIB_REPLACE_ERROR): Define if the error facility is replaced
+ by gnulib.
+ * woe32dll/gettextlib-exports.c (rpl_error_message_count)
+ (rpl_error_one_per_line, rpl_error_print_progname): Export only
+ if GNULIB_DEFINED_ERROR is set.
+
2012-12-21 Daiki Ueno <ueno@gnu.org>
Fix W64 build errors.
esac
AM_CONDITIONAL([WOE32], [test $is_woe32 = yes])
+dnl On Cygwin 1.7.10-1 or later, error_* variables are defined in the
+dnl Cygwin DLL. To avoid any conflict with gettext DLLs, always link
+dnl to gnulib's error.c. See GETTEXTLIB_EXPORTS_FLAGS setting below.
+case "$host_os" in
+ cygwin*) ac_cv_lib_error_at_line=no ;;
+esac
+
dnl Checks for libraries.
dnl These are the only lines required to internationalize the package.
[Define when --enable-shared is used on mingw or Cygwin.])
fi
+GETTEXTLIB_EXPORTS_FLAGS=
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=
+ GETTEXTLIB_EXPORTS_FLAGS="-DGNULIB_DEFINED_GETOPT $GETTEXTLIB_EXPORTS_FLAGS"
+fi
+dnl woe32dll/gettextlib-exports.c needs to know whether the error
+dnl facility is replaced by gnulib. ac_cv_lib_error_at_line is set by
+dnl gl_ERROR, inside gl_INIT.
+if test "$ac_cv_lib_error_at_line" = no; then
+ GETTEXTLIB_EXPORTS_FLAGS="-DGNULIB_DEFINED_ERROR $GETTEXTLIB_EXPORTS_FLAGS"
fi
AC_SUBST([GETTEXTLIB_EXPORTS_FLAGS])
+dnl Tell the source files that the error facility is replaced by
+dnl gnulib, to make sure to prepend "rpl_" prefix to the error_*
+dnl symbols.
+if test "$ac_cv_lib_error_at_line" = no; then
+ AC_DEFINE([GNULIB_REPLACE_ERROR], [1],
+ [Define when the error facility is replaced by gnulib.])
+fi
+
dnl Put some default definitions into config.h.
AH_TOP([
/* Default value for alignment of strings in .mo file. */
#include "woe32dll/export.h"
VARIABLE(argmatch_die)
-VARIABLE(error_message_count)
-VARIABLE(error_one_per_line)
-VARIABLE(error_print_progname)
+#if GNULIB_DEFINED_ERROR
+VARIABLE(rpl_error_message_count)
+VARIABLE(rpl_error_one_per_line)
+VARIABLE(rpl_error_print_progname)
+#endif
VARIABLE(error_with_progname)
VARIABLE(exit_failure)
VARIABLE(gl_array_list_implementation)
+2012-12-25 Daiki Ueno <ueno@gnu.org>
+
+ Work around error_* symbol conflict with Cygwin 1.7 DLL.
+ * lib/error.h.diff: Rename the error_* symbol if
+ GNULIB_REPLACE_ERROR is defined.
+
2012-12-12 Daiki Ueno <ueno@unixuser.org>
Add notice about included external libraries.
-*** gnulib/lib/error.h 2005-05-14 08:03:58.000000000 +0200
---- srclib/error.h 2005-05-20 23:06:02.000000000 +0200
+*** gnulib/lib/error.h 2012-12-24 20:10:43.000000000 +0900
+--- srclib/error.h 2012-12-24 20:08:16.000000000 +0900
***************
-*** 50,63 ****
+*** 31,36 ****
+--- 31,45 ----
+ # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
+ #endif
+
++ #if GNULIB_REPLACE_ERROR
++ # undef error_print_progname
++ # undef error_message_count
++ # undef error_one_per_line
++ # define error_print_progname rpl_error_print_progname
++ # define error_message_count rpl_error_message_count
++ # define error_one_per_line rpl_error_one_per_line
++ #endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+***************
+*** 49,62 ****
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
function without parameters instead. */
#ifdef __cplusplus
}
---- 50,63 ----
+--- 58,71 ----
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
function without parameters instead. */