From: Bruno Haible Date: Sun, 4 Jun 2023 15:34:25 +0000 (+0200) Subject: build: Don't rename error{_at_line} to rpl_error{_at_line} on native Windows. X-Git-Tag: v0.22~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4874d5b8498d5343ef5d29484654007fb4bde43a;p=thirdparty%2Fgettext.git build: Don't rename error{_at_line} to rpl_error{_at_line} on native Windows. * gettext-tools/configure.ac (GNULIB_REPLACE_ERROR): Define only on Cygwin and Android. * gettext-tools/woe32dll/gettextlib-exports.c: Don't assume that GNULIB_DEFINED_ERROR implies GNULIB_REPLACE_ERROR. --- diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index 18ddcc312..5070e2ce3 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -299,12 +299,16 @@ if test "$ac_cv_lib_error_at_line" = no; then 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. +dnl Tell the source files that the error facility is overridden by gnulib, +dnl to make sure to prepend "rpl_" prefix to the error_* symbols. +dnl This is only necessary on Cygwin and on Android. 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.]) + case "$host_os" in + cygwin* | linux*-android*) + AC_DEFINE([GNULIB_REPLACE_ERROR], [1], + [Define when the error facility is replaced by gnulib.]) + ;; + esac fi dnl Put some default definitions into config.h. diff --git a/gettext-tools/woe32dll/gettextlib-exports.c b/gettext-tools/woe32dll/gettextlib-exports.c index 1d1b37cc0..1330fc76f 100644 --- a/gettext-tools/woe32dll/gettextlib-exports.c +++ b/gettext-tools/woe32dll/gettextlib-exports.c @@ -19,9 +19,15 @@ VARIABLE(argmatch_die) #if GNULIB_DEFINED_ERROR +# if GNULIB_REPLACE_ERROR VARIABLE(rpl_error_message_count) VARIABLE(rpl_error_one_per_line) VARIABLE(rpl_error_print_progname) +# else +VARIABLE(error_message_count) +VARIABLE(error_one_per_line) +VARIABLE(error_print_progname) +# endif #endif VARIABLE(error_with_progname) VARIABLE(exit_failure)