]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/config/ltmain.m4sh (func_mode_link): In the dlsym
authorGeorge Bosilca <bosilca@cs.utk.edu>
Mon, 4 Sep 2006 17:25:15 +0000 (17:25 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 4 Sep 2006 17:25:15 +0000 (17:25 +0000)
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.

ChangeLog
libltdl/config/ltmain.m4sh
libltdl/libltdl/lt_system.h

index bff5967f8f43543e6eeb02cced34964fc7e7e782..3802108772a6c3a58fd3b1dadb57eea248670381 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
 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.
 
index 72e801b429eac32f6955b7dd4f2d98a1a3a21f2b..f9e5036d2cb481836599b23f0b762b5941360f25 100644 (file)
@@ -940,31 +940,29 @@ extern \"C\" {
          $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"
 
index d1e9f46bd9bd9d0fbe244fea3b3e426ba3137bed..b8173943f5d59e5e9ec1d599c7d37dd1530a186d 100644 (file)
@@ -99,7 +99,7 @@ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 #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)