From: Bruno Haible Date: Thu, 11 May 2006 20:54:08 +0000 (+0000) Subject: Ignore DLL_EXPORT. We need the _imp__ stubs also in the static library, X-Git-Tag: v0.15~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2943364bcc6b383586da6c023cd645bf21310152;p=thirdparty%2Fgettext.git Ignore DLL_EXPORT. We need the _imp__ stubs also in the static library, because the user of the library will use the same include file as the one used for the shared library. --- diff --git a/gettext-tools/cygwin/export.h b/gettext-tools/cygwin/export.h index 9f3e791a5..cfc45d86e 100644 --- a/gettext-tools/cygwin/export.h +++ b/gettext-tools/cygwin/export.h @@ -90,30 +90,18 @@ the effect of no longer exporting the functions! - until the option --export-all-symbols is used. */ -/* libtool defines the symbol DLL_EXPORT when compiling the object files that - will go into a shared library. */ -#ifdef DLL_EXPORT - /* Compiling for a shared library. */ - /* 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) \ - /* Export x without redefining x. This code was found by compiling a \ - snippet: \ - extern __declspec(dllexport) int x; int x = 42; */ \ - asm (".section .drectve\n"); \ - asm (".ascii \" -export:" #x ",data\"\n"); \ - asm (".data\n"); \ - /* Allocate a pseudo-variable IMP(x). */ \ - extern int x; \ - void * IMP(x) = &x; - -#else - /* Compiling for a static library. */ - -# define VARIABLE(x) - -#endif +#define VARIABLE(x) \ + /* Export x without redefining x. This code was found by compiling a \ + snippet: \ + extern __declspec(dllexport) int x; int x = 42; */ \ + asm (".section .drectve\n"); \ + asm (".ascii \" -export:" #x ",data\"\n"); \ + asm (".data\n"); \ + /* Allocate a pseudo-variable IMP(x). */ \ + extern int x; \ + void * IMP(x) = &x;