From: Bruno Haible Date: Sat, 21 Nov 2020 21:37:30 +0000 (+0100) Subject: build: Remove the need for an autoconf test. X-Git-Tag: v0.21.1~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=679b3552a60d189ec16ebc2cb9fedd09f2189fa4;p=thirdparty%2Fgettext.git build: Remove the need for an autoconf test. * gettext-runtime/intl/intl-exports.c (IMP): Use predefined preprocessor symbol tests, not USER_LABEL_PREFIX_UNDERSCORE. * gettext-runtime/configure.ac (INTL_EXPORTS_FLAGS): Remove variable. * gnulib-local/modules/gettext-runtime-misc (Makefile.am): Don't use INTL_EXPORTS_FLAGS. * gettext-tools/woe32dll/export.h (IMP): Use predefined preprocessor symbol tests, not USER_LABEL_PREFIX_UNDERSCORE. * gettext-tools/configure.ac (GETTEXTLIB_EXPORTS_FLAGS): Don't define USER_LABEL_PREFIX_UNDERSCORE. --- diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac index d524fc9c9..40187d145 100644 --- a/gettext-runtime/configure.ac +++ b/gettext-runtime/configure.ac @@ -130,14 +130,6 @@ if test $is_woe32dll = yes; then [Define when --enable-shared is used on mingw or Cygwin.]) fi -INTL_EXPORTS_FLAGS= -dnl 64-bit mingw does not prepend an underscore to C symbols. -dnl USER_LABEL_PREFIX is set by gl_ASM_SYMBOL_PREFIX, inside gl_INIT. -if test "$USER_LABEL_PREFIX" = _; then - INTL_EXPORTS_FLAGS="-DUSER_LABEL_PREFIX_UNDERSCORE $INTL_EXPORTS_FLAGS" -fi -AC_SUBST([INTL_EXPORTS_FLAGS]) - dnl Put some default definitions into config.h. AH_BOTTOM([ /* On Windows, variables that may be in a DLL must be marked specially. diff --git a/gettext-runtime/intl/intl-exports.c b/gettext-runtime/intl/intl-exports.c index 0ddfb89af..565426446 100644 --- a/gettext-runtime/intl/intl-exports.c +++ b/gettext-runtime/intl/intl-exports.c @@ -1,5 +1,5 @@ /* List of exported symbols of libintl on Cygwin. - Copyright (C) 2006, 2012-2013 Free Software Foundation, Inc. + Copyright (C) 2006, 2012-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -16,10 +16,10 @@ along with this program. If not, see . */ /* IMP(x) is a symbol that contains the address of x. */ -#if USER_LABEL_PREFIX_UNDERSCORE -# define IMP(x) _imp__##x -#else +#if defined _WIN64 || defined _LP64 # define IMP(x) __imp_##x +#else +# define IMP(x) _imp__##x #endif /* Ensure that the variable x is exported from the library, and that a diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index f439f5e9a..387d148ec 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -302,12 +302,6 @@ 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 - -dnl 64-bit mingw does not prepend an underscore to C symbols. -dnl USER_LABEL_PREFIX is set by gl_ASM_SYMBOL_PREFIX, inside gl_INIT. -if test "$USER_LABEL_PREFIX" = _; then - GETTEXTLIB_EXPORTS_FLAGS="-DUSER_LABEL_PREFIX_UNDERSCORE $GETTEXTLIB_EXPORTS_FLAGS" -fi AC_SUBST([GETTEXTLIB_EXPORTS_FLAGS]) dnl Tell the source files that the error facility is replaced by diff --git a/gettext-tools/woe32dll/export.h b/gettext-tools/woe32dll/export.h index ff3515e39..1c4054d28 100644 --- a/gettext-tools/woe32dll/export.h +++ b/gettext-tools/woe32dll/export.h @@ -1,5 +1,5 @@ /* Exporting symbols from Cygwin shared libraries. - Copyright (C) 2006, 2011-2018 Free Software Foundation, Inc. + Copyright (C) 2006, 2011-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -94,10 +94,10 @@ #if defined __GNUC__ /* GCC compiler, GNU toolchain */ /* IMP(x) is a symbol that contains the address of x. */ -#if USER_LABEL_PREFIX_UNDERSCORE -# define IMP(x) _imp__##x -#else +#if defined _WIN64 || defined _LP64 # define IMP(x) __imp_##x +#else +# define IMP(x) _imp__##x #endif /* Ensure that the variable x is exported from the library, and that a diff --git a/gnulib-local/modules/gettext-runtime-misc b/gnulib-local/modules/gettext-runtime-misc index de358b6ff..4cad86d65 100644 --- a/gnulib-local/modules/gettext-runtime-misc +++ b/gnulib-local/modules/gettext-runtime-misc @@ -15,11 +15,6 @@ AM_CPPFLAGS += -I$(top_builddir)/intl -I$(top_srcdir)/intl # Parametrization of the 'relocatable' module. AM_CPPFLAGS += -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -# Tell the mingw or Cygwin linker which symbols to export. -if WOE32DLL -AM_CPPFLAGS += @INTL_EXPORTS_FLAGS@ -endif - Include: License: