* 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.
This commit is contained in:
Ralf Wildenhues 2007-03-06 22:28:00 +00:00
parent cac951583e
commit 5745354dca
2 changed files with 17 additions and 3 deletions

View File

@ -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

View 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'