2006-09-04 George Bosilca <bosilca@cs.utk.edu>
and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ * libltdl/config/ltmain.m4sh (func_mode_link): In the dlsym
+ file, define a type for the symbol list, and declare the list
+ `extern', so that it is extern even if compiled by a C++
+ compiler. The type definition helps avoid a compiler warning
+ against anonymous extern struct.
+ * libltdl/libltdl/lt_system.h: Add `extern' to `LT_SCOPE' for
+ the same reason.
+
* libltdl/argz_.h: It's __cplusplus, not _cplusplus.
* libltdl/libltdl/slist.h: Likewise.
$ECHO >> "$output_objdir/$my_dlsyms" "\
/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
"
case $host in
*cygwin* | *mingw* )
$ECHO >> "$output_objdir/$my_dlsyms" "\
/* DATA imports from DLLs on WIN32 con't be const, because
runtime relocations are performed -- see ld's documentation
- on pseudo-relocs. */
- struct {
-"
- ;;
+ on pseudo-relocs. */"
+ lt_dlsym_const= ;;
*)
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-const struct {
-"
- ;;
+ lt_dlsym_const=const ;;
esac
$ECHO >> "$output_objdir/$my_dlsyms" "\
- const char *name;
- void *address;
-}
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[[]];
+$lt_dlsym_const lt_dlsymlist
lt_${my_prefix}_LTX_preloaded_symbols[[]] =
{\
- { \"$my_originator\", (void *) 0 },
-"
+ { \"$my_originator\", (void *) 0 },"
eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
#if !defined(LT_SCOPE)
# if defined(__WINDOWS__)
# if defined(DLL_EXPORT) /* defined by libtool (if required) */
-# define LT_SCOPE __declspec(dllexport)
+# define LT_SCOPE extern __declspec(dllexport)
# endif
# if defined(LIBLTDL_DLL_IMPORT) /* define if linking with this dll */
# define LT_SCOPE extern __declspec(dllimport)