mirror of
https://https.git.savannah.gnu.org/git/libtool.git
synced 2026-01-26 15:39:10 +00:00
dllimport the variable for MSVC in link-order.at
* tests/link-order.at [MSVC]: Makes the test pass by dllimporting imported variables when working with shared libraries.
This commit is contained in:
parent
0656b19eb9
commit
653fa66d07
@ -1,3 +1,9 @@
|
||||
2010-07-17 Peter Rosin <peda@lysator.liu.se>
|
||||
|
||||
dllimport the variable for MSVC in link-order.at
|
||||
* tests/link-order.at [MSVC]: Makes the test pass by dllimporting
|
||||
imported variables when working with shared libraries.
|
||||
|
||||
2010-07-08 Peter Rosin <peda@lysator.liu.se>
|
||||
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
|
||||
@ -48,13 +48,31 @@ for i in old new; do
|
||||
mkdir src
|
||||
|
||||
cat >src/a_$i.c <<EOF
|
||||
extern int c;
|
||||
/* w32 fun, MSVC needs to dllimport when using a shared library, so use
|
||||
* DLL_EXPORT to discriminate as that happens to coinside in this case.
|
||||
* gnu has auto import.
|
||||
*/
|
||||
#if defined _MSC_VER && defined DLL_EXPORT
|
||||
# define LIBCEE_SCOPE __declspec(dllimport)
|
||||
#else
|
||||
# define LIBCEE_SCOPE extern
|
||||
#endif
|
||||
LIBCEE_SCOPE int c;
|
||||
extern int b_$i();
|
||||
int a_$i() { return c + b_$i(); }
|
||||
EOF
|
||||
|
||||
cat >src/b_$i.c <<EOF
|
||||
extern int c;
|
||||
/* w32 fun, MSVC needs to dllimport when using a shared library, so use
|
||||
* DLL_EXPORT to discriminate as that happens to coinside in this case.
|
||||
* gnu has auto import.
|
||||
*/
|
||||
#if defined _MSC_VER && defined DLL_EXPORT
|
||||
# define LIBCEE_SCOPE __declspec(dllimport)
|
||||
#else
|
||||
# define LIBCEE_SCOPE extern
|
||||
#endif
|
||||
LIBCEE_SCOPE int c;
|
||||
int b_$i() { return 1 + c; }
|
||||
EOF
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user