From: Ralf Wildenhues Date: Tue, 6 Mar 2007 22:28:00 +0000 (+0000) Subject: * tests/export.at: For const data object imported from shared X-Git-Tag: release-2-1b~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5745354dca80ef6508761d2ab6e61600410e009e;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index f84096f7c..38472d2f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-03-06 Ralf Wildenhues + + * 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 * libtoolize.m4sh (func_check_macros): Display m4 quotes correctly diff --git a/tests/export.at b/tests/export.at index b8702604e..614fc2bc0 100644 --- a/tests/export.at +++ b/tests/export.at @@ -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'