[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] tests: __declspec (dll{ex, im}port) in tests/exceptions.at
From: |
Peter Rosin |
Subject: |
[PATCH 1/2] tests: __declspec (dll{ex, im}port) in tests/exceptions.at |
Date: |
Mon, 20 Sep 2010 10:45:24 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 |
Hi!
I have tested this patch on MinGW/gcc and Cygwin/gcc and they are both
ok with the __declspec() notation. On MSVC, the test goes from skip
to fail, as it needs 2/2.
Cheers,
Peter
>From 52972128c5952da628e033e4509208711906c3a2 Mon Sep 17 00:00:00 2001
From: Peter Rosin <address@hidden>
Date: Mon, 20 Sep 2010 09:07:25 +0200
Subject: [PATCH 1/2] tests: __declspec (dll{ex,im}port) in tests/exceptions.at
* tests/exceptions.at (common.h, module.h, lib.h) [w32]: Use
__declspec (dllimport) and __declspec (dllexport) instead of
the less portable __attribute__ ((dllimport)) and
__attribute__ ((dllexport)). Makes the test compile on MSVC.
Signed-off-by: Peter Rosin <address@hidden>
---
ChangeLog | 8 ++++++++
tests/exceptions.at | 17 ++++++++---------
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 78d3e48..3c72890 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-09-20 Peter Rosin <address@hidden>
+
+ tests: __declspec (dll{ex,im}port) in tests/exceptions.at
+ * tests/exceptions.at (common.h, module.h, lib.h) [w32]: Use
+ __declspec (dllimport) and __declspec (dllexport) instead of
+ the less portable __attribute__ ((dllimport)) and
+ __attribute__ ((dllexport)). Makes the test compile on MSVC.
+
2010-09-19 Peter Rosin <address@hidden>
tests: Import items from liba1 for MSVC.
diff --git a/tests/exceptions.at b/tests/exceptions.at
index 235597c..286b2ac 100644
--- a/tests/exceptions.at
+++ b/tests/exceptions.at
@@ -66,9 +66,8 @@ CPPFLAGS="$LTDLINCL $CPPFLAGS"
# the regex). However, in this test, none of these situations apply,
# so we don't directly address it. Otherwise, the correct mechanism
# would be to avoid all of those flags, and instead explicitly decorate
-# all symbols with appropriate __attribute__ ((dllexport)) or
-# __attribute__ ((dllimport)) flags when building the DLLs and the
-# clients.
+# all symbols with appropriate __declspec (dllexport) or
+# __declspec (dllimport) flags when building the DLLs and the clients.
#
# For more information, see these two threads:
# http://lists.gnu.org/archive/html/bug-libtool/2010-06/msg00069.html
@@ -84,9 +83,9 @@ AT_DATA([common.h],
#if defined(__CYGWIN__) || defined(_WIN32)
# if defined(DLL_EXPORT) || defined(USING_COMMON_DLL)
# if defined(LIBTOOL_TEST_IN_COMMON)
-# define COMMON_IMPEXP __attribute__ ((dllexport))
+# define COMMON_IMPEXP __declspec (dllexport)
# else
-# define COMMON_IMPEXP __attribute__ ((dllimport))
+# define COMMON_IMPEXP __declspec (dllimport)
# endif
# else
# define COMMON_IMPEXP
@@ -128,9 +127,9 @@ AT_DATA([module.h],
#if defined(__CYGWIN__) || defined(_WIN32)
# if defined(DLL_EXPORT) || defined(USING_MODULE_DLL)
# if defined(LIBTOOL_TEST_IN_MODULE)
-# define MODULE_IMPEXP __attribute__ ((dllexport))
+# define MODULE_IMPEXP __declspec (dllexport)
# else
-# define MODULE_IMPEXP __attribute__ ((dllimport))
+# define MODULE_IMPEXP __declspec (dllimport)
# endif
# else
# define MODULE_IMPEXP
@@ -174,9 +173,9 @@ AT_DATA([lib.h],
#if defined(__CYGWIN__) || defined(_WIN32)
# if defined(DLL_EXPORT) || defined(USING_LIB_DLL)
# if defined(LIBTOOL_TEST_IN_LIB)
-# define LIB_IMPEXP __attribute__ ((dllexport))
+# define LIB_IMPEXP __declspec (dllexport)
# else
-# define LIB_IMPEXP __attribute__ ((dllimport))
+# define LIB_IMPEXP __declspec (dllimport)
# endif
# else
# define LIB_IMPEXP
--
1.7.1
- Linkage and LTDL_SET_PRELOADED_SYMBOLS, Peter Rosin, 2010/09/17
- Re: Linkage and LTDL_SET_PRELOADED_SYMBOLS, Ralf Wildenhues, 2010/09/17
- Re: Linkage and LTDL_SET_PRELOADED_SYMBOLS, Peter Rosin, 2010/09/18
- Re: Linkage and LTDL_SET_PRELOADED_SYMBOLS, Peter Rosin, 2010/09/20
- [PATCH 1/2] tests: __declspec (dll{ex, im}port) in tests/exceptions.at,
Peter Rosin <=
- Re: [PATCH 1/2] tests: __declspec (dll{ex, im}port) in tests/exceptions.at, Bob Friesenhahn, 2010/09/20
- Re: [PATCH 1/2] tests: __declspec (dll{ex, im}port) in tests/exceptions.at, Peter Rosin, 2010/09/20
- [PATCH 2/2] libltdl: Make sure preloaded symbols are declared extern "C"., Peter Rosin, 2010/09/20
- Re: Linkage and LTDL_SET_PRELOADED_SYMBOLS, Peter Rosin, 2010/09/20
- Re: Linkage and LTDL_SET_PRELOADED_SYMBOLS, Bob Friesenhahn, 2010/09/20