]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
tests: Import items from liba1 for MSVC.
authorPeter Rosin <peda@lysator.liu.se>
Sun, 19 Sep 2010 12:14:21 +0000 (14:14 +0200)
committerPeter Rosin <peda@lysator.liu.se>
Sun, 19 Sep 2010 12:14:21 +0000 (14:14 +0200)
* tests/lt_dlexit.at (b1.c) [MSVC]: Import function f1 and
variable v1 from liba1 when using them from modb1.  Makes the
test pass on MSVC.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
ChangeLog
tests/lt_dlexit.at

index 946f8d7042bbcbc84cf3bb608f306d64e0512e54..78d3e48761346ea80baa9abd27c1e416411f4789 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-09-19  Peter Rosin  <peda@lysator.liu.se>
+
+       tests: Import items from liba1 for MSVC.
+       * tests/lt_dlexit.at (b1.c) [MSVC]: Import function f1 and
+       variable v1 from liba1 when using them from modb1.  Makes the
+       test pass on MSVC.
+
 2010-09-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        tests: avoid distcheck failure with --disable-ltdl-install.
index 8d0b7282cd4bc578fcdec2ec636438fa59d1f684..c80c1ebabaedd2c052e53d110bf52d781eb994aa 100644 (file)
@@ -1,6 +1,6 @@
 # lt_dlexit.at -- test libltdl functionality                  -*- Autotest -*-
 #
-#   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc.
 #   Written by Dave Brolley & Ralf Wildenhues, 2007
 #
 #   This file is part of GNU Libtool.
@@ -117,7 +117,14 @@ AT_DATA([b1.c],
 [[#ifdef __cplusplus
 extern "C" {
 #endif
-extern int f1 (int), v1;
+#if defined DLL_EXPORT && defined _WIN32 && defined _MSC_VER
+#  define LIBA1_SCOPE extern __declspec (dllimport)
+#endif
+#if !defined LIBA1_SCOPE
+#  define LIBA1_SCOPE extern
+#endif
+LIBA1_SCOPE int f1 (int);
+LIBA1_SCOPE v1;
 int fb1 (int x) { return f1 (v1) + x - 3; }
 int vb1 = 3;
 #ifdef __cplusplus