From: Daiki Ueno Date: Fri, 21 Dec 2012 08:39:02 +0000 (+0900) Subject: Fix W64 build errors. X-Git-Tag: v0.18.2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17be61925ee2e5a804e9c1549e989c02536f7441;p=thirdparty%2Fgettext.git Fix W64 build errors. --- diff --git a/ChangeLog b/ChangeLog index 1fe3f9c5c..2cd8457e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-12-21 Daiki Ueno + + Fix W64 build errors. + * autogen.sh (GNULIB_MODULES_LIBASPRINTF): Add extern-inline, for + the last xsize.h update. + (GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES): Add locale, + not to have copies of locale.h in both libgrep and gnulib-lib. + (GNULIB_MODULES_LIBGETTEXTPO): Add close. + 2012-12-08 Daiki Ueno * autogen.sh: Ignore libunistring tests which are known to fail. diff --git a/autogen.sh b/autogen.sh index 9b1b29a41..ee70372fe 100755 --- a/autogen.sh +++ b/autogen.sh @@ -109,6 +109,7 @@ if ! $skip_gnulib; then alloca errno verify + extern-inline ' GNULIB_MODULES_LIBASPRINTF_OTHER=' ' @@ -221,6 +222,7 @@ if ! $skip_gnulib; then extensions gettext-h include_next + locale localcharset malloc-posix mbrtowc @@ -271,6 +273,7 @@ if ! $skip_gnulib; then # This is a subset of the GNULIB_MODULES_FOR_SRC. GNULIB_MODULES_LIBGETTEXTPO=' basename + close c-ctype c-strcase c-strstr diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index daee7965e..5a4066bb2 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,10 @@ +2012-12-21 Daiki Ueno + + Fix W64 build errors. + * intl-exports.c (IMP) [_WIN64]: Prefix "__imp_" instead of + "_imp__". + * osdep.c: Include intl-exports.c on mingw as well as Cygwin. + 2012-12-10 Daiki Ueno * intl-compat.c: Fix typo in the copyright header. diff --git a/gettext-runtime/intl/intl-exports.c b/gettext-runtime/intl/intl-exports.c index 4e43b0616..a18fe5174 100644 --- a/gettext-runtime/intl/intl-exports.c +++ b/gettext-runtime/intl/intl-exports.c @@ -16,7 +16,14 @@ along with this program. If not, see . */ /* IMP(x) is a symbol that contains the address of x. */ -#define IMP(x) _imp__##x +#if _WIN64 + /* mingw W64 changed the symbol prefix from W32 for MSVC + compatibility. See the comments in + mingw-w64-headers/crt/_mingw_mac.h for more details. */ +# 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 pseudo-variable IMP(x) is available. */ diff --git a/gettext-runtime/intl/osdep.c b/gettext-runtime/intl/osdep.c index 9ca447004..7143d822e 100644 --- a/gettext-runtime/intl/osdep.c +++ b/gettext-runtime/intl/osdep.c @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ -#if defined __CYGWIN__ +#if defined __CYGWIN__ || defined __MINGW32__ # include "intl-exports.c" #elif defined __EMX__ # include "os2compat.c" diff --git a/gettext-tools/ChangeLog b/gettext-tools/ChangeLog index a259b3f66..a71fc2e2d 100644 --- a/gettext-tools/ChangeLog +++ b/gettext-tools/ChangeLog @@ -1,3 +1,9 @@ +2012-12-21 Daiki Ueno + + Fix W64 build errors. + * woe32dll/export.h (IMP) [_WIN64]: Prefix "__imp_" instead of + "_imp__". + 2012-12-17 Daiki Ueno * configure.ac: Use AC_CONFIG_HEADERS instead of AM_CONFIG_HEADER. diff --git a/gettext-tools/woe32dll/export.h b/gettext-tools/woe32dll/export.h index 23eae9ab8..f454eccbd 100644 --- a/gettext-tools/woe32dll/export.h +++ b/gettext-tools/woe32dll/export.h @@ -94,7 +94,14 @@ #if defined __GNUC__ /* GCC compiler, GNU toolchain */ /* IMP(x) is a symbol that contains the address of x. */ +#if _WIN64 + /* mingw W64 changed the symbol prefix from W32 for MSVC + compatibility. See the comments in + mingw-w64-headers/crt/_mingw_mac.h for more details. */ +# 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 pseudo-variable IMP(x) is available. */