[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: make lt_dlexit.at work with C++ compiler
From: |
Ralf Wildenhues |
Subject: |
FYI: make lt_dlexit.at work with C++ compiler |
Date: |
Mon, 12 Feb 2007 21:09:29 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
I'm applying the usual goo that I forgot to make this test pass with
CC=g++.
Cheers,
Ralf
2007-02-12 Ralf Wildenhues <address@hidden>
* tests/lt_dlexit.at: Add casts and `extern "C"' to let the test
pass with a C++ compiler.
Index: tests/lt_dlexit.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/lt_dlexit.at,v
retrieving revision 1.4
diff -u -r1.4 lt_dlexit.at
--- tests/lt_dlexit.at 12 Feb 2007 19:55:02 -0000 1.4
+++ tests/lt_dlexit.at 12 Feb 2007 20:09:17 -0000
@@ -52,8 +52,8 @@
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 @@
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"}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: make lt_dlexit.at work with C++ compiler,
Ralf Wildenhues <=