summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-01-15 12:16:35 +0100
committerBruno Haible <bruno@clisp.org>2012-01-15 12:16:35 +0100
commit97e4edd6a41d151bab1b4c6184c1aa7171ddb42b (patch)
treebc13a04933375802f1496dd806f52d457a0c08eb
parent6a137a9ab88ec2ce7fbc3494872d74f64a68ab4f (diff)
downloadlibunistring-97e4edd6a41d151bab1b4c6184c1aa7171ddb42b.tar.gz
Support for MSVC 9. Add a comment.
-rw-r--r--ChangeLog10
-rw-r--r--woe32dll/export.h18
2 files changed, 24 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index ac5cc79..9382394 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-01-15 Bruno Haible <bruno@clisp.org>
+
+ Support for MSVC 9.
+ * woe32dll/export.h (VARIABLE): Define to empty if not using GCC.
+
+2011-01-28 Bruno Haible <bruno@clisp.org>
+
+ Add a comment.
+ * woe32dll/export.h: Add a reference to the woe32dll writeup.
+
2011-10-18 Bruno Haible <bruno@clisp.org>
* m4/libtool.m4: Update from libtool-2.4.2, with modifications.
diff --git a/woe32dll/export.h b/woe32dll/export.h
index 6404832..23eae9a 100644
--- a/woe32dll/export.h
+++ b/woe32dll/export.h
@@ -1,5 +1,5 @@
/* Exporting symbols from Cygwin shared libraries.
- Copyright (C) 2006 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
@@ -87,14 +87,18 @@
Note: --export-all-symbols is the default when no other symbol is explicitly
exported. This means, the use of an explicit export on the variables has
the effect of no longer exporting the functions! - until the option
- --export-all-symbols is used. */
+ --export-all-symbols is used.
+
+ 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; */ \
@@ -104,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