summaryrefslogtreecommitdiffstats
path: root/gettext-tools/woe32dll
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-01-15 12:11:54 +0100
committerBruno Haible <bruno@clisp.org>2012-02-18 22:28:04 +0100
commit3b39b40717ccd9e863cf7fa7549073b559ba2369 (patch)
treee6de6193180c98f6914899b59ce1d14c84ba34cc /gettext-tools/woe32dll
parentb44c55d431744faf29ba931f08129371173ba9eb (diff)
downloadexternal_gettext-3b39b40717ccd9e863cf7fa7549073b559ba2369.zip
external_gettext-3b39b40717ccd9e863cf7fa7549073b559ba2369.tar.gz
external_gettext-3b39b40717ccd9e863cf7fa7549073b559ba2369.tar.bz2
Support for MSVC 9.
* woe32dll/export.h (VARIABLE): Define to empty if not using GCC.
Diffstat (limited to 'gettext-tools/woe32dll')
-rw-r--r--gettext-tools/woe32dll/export.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/gettext-tools/woe32dll/export.h b/gettext-tools/woe32dll/export.h
index 717f694..23eae9a 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 <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
@@ -91,12 +91,14 @@
See <http://www.haible.de/bruno/woe32dll.html> 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