]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Ignore DLL_EXPORT. We need the _imp__ stubs also in the static library,
authorBruno Haible <bruno@clisp.org>
Thu, 11 May 2006 20:54:08 +0000 (20:54 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:18 +0000 (12:13 +0200)
because the user of the library will use the same include file as the one
used for the shared library.

gettext-tools/cygwin/export.h

index 9f3e791a5ae6d7b79b6a5250d9e8612a456d9c60..cfc45d86e76e2a92a0eb4f280187f29673caf55e 100644 (file)
    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;