]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/export.at: For const data object imported from shared
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 6 Mar 2007 22:28:00 +0000 (22:28 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 6 Mar 2007 22:28:00 +0000 (22:28 +0000)
library, define appropriate macros to expand
__declspec(dllimport) on w32.  Fixes test failure on MinGW.

ChangeLog
tests/export.at

index f84096f7ce6887d2b0810406106c0bde91a15c21..38472d2f9b798d6ce9efcd60546cff0e6f752e8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * tests/export.at: For const data object imported from shared
+       library, define appropriate macros to expand
+       __declspec(dllimport) on w32.  Fixes test failure on MinGW.
+
 2007-03-05  Gary V. Vaughan  <gary@gnu.org>
 
        * libtoolize.m4sh (func_check_macros): Display m4 quotes correctly
index b8702604e10a01a3875a519630bd02917b7ee8b8..614fc2bc01049913129135f421a11667e58369c8 100644 (file)
@@ -89,18 +89,26 @@ v15
 
 AT_DATA(main.c,
 [[
+#if defined(LIBA_DLL_IMPORT)
+#  if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
+#    define LIBA_SCOPE extern __declspec(dllimport)
+#  endif
+#endif
+#if !defined(LIBA_SCOPE)
+#  define LIBA_SCOPE extern
+#endif
 #ifdef __cplusplus
 extern "C" {
 #endif
 extern int v1;
 extern int v3, v4;
-extern const int v5, v6;
+LIBA_SCOPE const int v5, v6;
 extern const char* v7;
 extern const char v8[];
 extern int v9(void);
 extern int (*v10) (void);
 extern int (*v11) (void);
-extern int (*const v12) (void);
+LIBA_SCOPE int (*const v12) (void);
 #ifdef __cplusplus
 }
 #endif
@@ -134,7 +142,7 @@ int main (void)
 ]])
 
 AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c],[0],[ignore],[ignore])
-AT_CHECK([$CC $CPPFLAGS $CFLAGS -c main.c],[0],[ignore],[ignore])
+AT_CHECK([$CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c],[0],[ignore],[ignore])
 AT_CHECK([$CC $CPPFLAGS $CFLAGS -c broken.c],[0],[ignore],[ignore])
 
 for exportsyms in '' '-export-symbols-regex "v.*"' '-export-symbols asyms'