[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] libltdl: Make sure preloaded symbols are declared extern "C"
From: |
Peter Rosin |
Subject: |
[PATCH 2/2] libltdl: Make sure preloaded symbols are declared extern "C". |
Date: |
Mon, 20 Sep 2010 10:47:00 +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 |
>From 48c28ce65b53af7ad6c1cb84026e47be9ce2d68b Mon Sep 17 00:00:00 2001
From: Peter Rosin <address@hidden>
Date: Mon, 20 Sep 2010 09:11:43 +0200
Subject: [PATCH 2/2] libltdl: Make sure preloaded symbols are declared extern
"C".
* libltdl/ltdl.h (LTDL_SET_PRELOADED_SYMBOLS): Move the
declaration of lt__PROGRAM__LTX_preloaded_symbols to global
scope and make sure it has "C" linkage. Makes exceptions.at
succeed on MSVC.
Signed-off-by: Peter Rosin <address@hidden>
---
ChangeLog | 9 +++++++++
libltdl/ltdl.h | 9 +++++----
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3c72890..8ed47f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,13 @@
2010-09-20 Peter Rosin <address@hidden>
+ Ralf Wildenhues <address@hidden>
+
+ libltdl: Make sure preloaded symbols are declared extern "C".
+ * libltdl/ltdl.h (LTDL_SET_PRELOADED_SYMBOLS): Move the
+ declaration of lt__PROGRAM__LTX_preloaded_symbols to global
+ scope and make sure it has "C" linkage. Makes exceptions.at
+ succeed on MSVC.
+
+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
diff --git a/libltdl/ltdl.h b/libltdl/ltdl.h
index 5154da1..749a54d 100644
--- a/libltdl/ltdl.h
+++ b/libltdl/ltdl.h
@@ -102,10 +102,11 @@ LT_SCOPE int lt_dlpreload_open (const char
*originator,
lt_dlpreload_callback_func *func);
#define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols
-#define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \
- extern LT_DLSYM_CONST lt_dlsymlist lt_preloaded_symbols[]; \
- lt_dlpreload_default(lt_preloaded_symbols); \
- }LT_STMT_END
+/* Ensure C linkage. */
+extern LT_DLSYM_CONST lt_dlsymlist lt__PROGRAM__LTX_preloaded_symbols[];
+
+#define LTDL_SET_PRELOADED_SYMBOLS() \
+ lt_dlpreload_default(lt_preloaded_symbols)
--
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, 2010/09/20
- 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 <=
- Re: Linkage and LTDL_SET_PRELOADED_SYMBOLS, Peter Rosin, 2010/09/20
- Re: Linkage and LTDL_SET_PRELOADED_SYMBOLS, Bob Friesenhahn, 2010/09/20