]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Don't rename error{_at_line} to rpl_error{_at_line} on native Windows.
authorBruno Haible <bruno@clisp.org>
Sun, 4 Jun 2023 15:34:25 +0000 (17:34 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 4 Jun 2023 18:04:53 +0000 (20:04 +0200)
* 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.

gettext-tools/configure.ac
gettext-tools/woe32dll/gettextlib-exports.c

index 18ddcc312fe422b3d245c1d9ee40863438918abc..5070e2ce384ce9e6b0a32423630cb290c06c3bba 100644 (file)
@@ -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.
index 1d1b37cc090b707190db424df76b24a5aa5386a6..1330fc76f42226078e631b90ecbcffa7cb1a1394 100644 (file)
 
 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)