]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Support for MSVC 9.
authorBruno Haible <bruno@clisp.org>
Sun, 15 Jan 2012 11:11:54 +0000 (12:11 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 18 Feb 2012 21:28:04 +0000 (22:28 +0100)
* woe32dll/export.h (VARIABLE): Define to empty if not using GCC.

gettext-tools/ChangeLog
gettext-tools/woe32dll/export.h

index 627c0f5d8daef661d4bd512b639bc5cf8059d137..703ed32589f07baa725d31189407a4345a353be1 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-15  Bruno Haible  <bruno@clisp.org>
+
+       Support for MSVC 9.
+       * woe32dll/export.h (VARIABLE): Define to empty if not using GCC.
+
 2011-11-27  Bruno Haible  <bruno@clisp.org>
 
        Speed up configure a bit.
index 717f694df8aa03ab1f6a5babebb12756b8fac763..23eae9ab8e184308f918deec434673e545a8ad16 100644 (file)
@@ -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
 
    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;  */               \
  /* 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