]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/lt_dlexit.at: Add casts and `extern "C"' to let the test
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 12 Feb 2007 20:10:00 +0000 (20:10 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 12 Feb 2007 20:10:00 +0000 (20:10 +0000)
pass with a C++ compiler.

ChangeLog
tests/lt_dlexit.at

index bcf0cd9337ca631e03e3232b64df656288164a7b..f3881334e3b447317dd0665233df7d9d6a2d7304 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2007-02-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * tests/lt_dlexit.at: Add casts and `extern "C"' to let the test
+       pass with a C++ compiler.
+
        * libltdl/config/ltmain.m4sh: Remove duplicate marker for
        generated shell functions.
 
index 7cd51118e74a07ae981a01b7b0f5275aeda7ad46..64d71754f6af8fbfdebd2e6b09013f4c24892cf7 100644 (file)
@@ -52,8 +52,8 @@ xdlopen (const char *filename)
 static int
 xdlsymtest (lt_dlhandle handle, const char *func, const char *var)
 {
-  pfun_T pf = lt_dlsym (handle, func);
-  pvar_T pv = lt_dlsym (handle, var);
+  pfun_T pf = (pfun_T) lt_dlsym (handle, func);
+  pvar_T pv = (pvar_T) lt_dlsym (handle, var);
   if (pf == NULL) {
     fprintf (stderr, "function `%s' not found\n", func);
     return 1;
@@ -104,14 +104,26 @@ main (int argc, char **argv)
 
 
 AT_DATA([a1.c],
-[[int f1 (int x) { return x - 1; }
+[[#ifdef __cplusplus
+extern "C" {
+#endif
+int f1 (int x) { return x - 1; }
 int v1 = 1;
+#ifdef __cplusplus
+}
+#endif
 ]])
 
 AT_DATA([b1.c],
-[[extern int f1 (int), v1;
+[[#ifdef __cplusplus
+extern "C" {
+#endif
+extern int f1 (int), v1;
 int fb1 (int x) { return f1 (v1) + x - 3; }
 int vb1 = 3;
+#ifdef __cplusplus
+}
+#endif
 ]])
 
 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}