From: Bruno Haible Date: Sun, 15 Jan 2012 11:11:54 +0000 (+0100) Subject: Support for MSVC 9. X-Git-Tag: v0.18.2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b39b40717ccd9e863cf7fa7549073b559ba2369;p=thirdparty%2Fgettext.git Support for MSVC 9. * woe32dll/export.h (VARIABLE): Define to empty if not using GCC. --- diff --git a/gettext-tools/ChangeLog b/gettext-tools/ChangeLog index 627c0f5d8..703ed3258 100644 --- a/gettext-tools/ChangeLog +++ b/gettext-tools/ChangeLog @@ -1,3 +1,8 @@ +2012-01-15 Bruno Haible + + Support for MSVC 9. + * woe32dll/export.h (VARIABLE): Define to empty if not using GCC. + 2011-11-27 Bruno Haible Speed up configure a bit. diff --git a/gettext-tools/woe32dll/export.h b/gettext-tools/woe32dll/export.h index 717f694df..23eae9ab8 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 Free Software Foundation, Inc. + Copyright (C) 2006, 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -91,12 +91,14 @@ See for more details. */ +#if defined __GNUC__ /* GCC compiler, GNU toolchain */ + /* IMP(x) is a symbol that contains the address of x. */ -#define IMP(x) _imp__##x +# define IMP(x) _imp__##x /* Ensure that the variable x is exported from the library, and that a pseudo-variable IMP(x) is available. */ -#define VARIABLE(x) \ +# define VARIABLE(x) \ /* Export x without redefining x. This code was found by compiling a \ snippet: \ extern __declspec(dllexport) int x; int x = 42; */ \ @@ -106,3 +108,9 @@ /* Allocate a pseudo-variable IMP(x). */ \ extern int x; \ void * IMP(x) = &x; + +#else /* non-GNU compiler, non-GNU toolchain */ + +# define VARIABLE(x) /* nothing */ + +#endif