From: Ralf Wildenhues Date: Mon, 12 Feb 2007 20:10:00 +0000 (+0000) Subject: * tests/lt_dlexit.at: Add casts and `extern "C"' to let the test X-Git-Tag: release-2-1b~195 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=604750237c8a08b6675a7c05793fe48532cae5a3;p=thirdparty%2Flibtool.git * tests/lt_dlexit.at: Add casts and `extern "C"' to let the test pass with a C++ compiler. --- diff --git a/ChangeLog b/ChangeLog index bcf0cd933..f3881334e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-02-12 Ralf Wildenhues + * 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. diff --git a/tests/lt_dlexit.at b/tests/lt_dlexit.at index 7cd51118e..64d71754f 100644 --- a/tests/lt_dlexit.at +++ b/tests/lt_dlexit.at @@ -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"}