From 97e4edd6a41d151bab1b4c6184c1aa7171ddb42b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 15 Jan 2012 12:16:35 +0100 Subject: Support for MSVC 9. Add a comment. --- ChangeLog | 10 ++++++++++ woe32dll/export.h | 18 ++++++++++++++---- 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 + + Support for MSVC 9. + * woe32dll/export.h (VARIABLE): Define to empty if not using GCC. + +2011-01-28 Bruno Haible + + Add a comment. + * woe32dll/export.h: Add a reference to the woe32dll writeup. + 2011-10-18 Bruno Haible * 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 , 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 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 -- cgit v1.2.1