libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: libtool--devo--1.0--patch-146


From: Gary V. Vaughan
Subject: FYI: libtool--devo--1.0--patch-146
Date: Wed, 1 Sep 2004 02:24:09 +0100 (BST)
User-agent: mailnotify/0.3

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Applied to HEAD.
- -- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.5
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)

iD8DBQFBNSS5FRMICSmD1gYRAuy3AJ9UJpwgGVZUO18rBjLMoNubgxrytgCgzQzl
vJqJo+fIYStmKL9DPwY6KA0=
=MfwF
-----END PGP SIGNATURE-----
* looking for address@hidden/libtool--devo--1.0--patch-145 to compare with
* comparing to address@hidden/libtool--devo--1.0--patch-145
M  ChangeLog
M  NEWS
M  libltdl/ltdl.h
M  config/ltmain.in
M  m4/libtool.m4
M  libltdl/loaders/preopen.c

* modified files

Index: Changelog
from  Gary V. Vaughan  <address@hidden>
        Don't use C99 flexible array types as we want to be C89
        compatible.  Instead, revert to the old way of doing things with
        an array of symbol name vs. address, and adding the originator as
        the first symbol but with a NULL address:

        * config/ltmain.in (func_extract_dlsyms): Store originator as a
        NULL address symbol.
        * libltdl/ltdl.h (lt_dlsymbol): Removed.
        (lt_dlsymlist): Remove originator field.
        (LTDL_SET_PRELOADED_SYMBOLS): Adjust.
        * libltdl/loaders/preopen.c (vm_open, lt_dlpreload_open): Adjust
        for new types.
        (vm_sym): Skip the new originator symbol when scanning symbol
        names.
        * m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Adjust preloaded symbols
        test file to match.
        * NEWS: Updated.

2004-09-01  Gary V. Vaughan  <address@hidden>

--- orig/NEWS
+++ mod/NEWS
@@ -2,6 +2,8 @@
 
 New in 1.9d: 2004-??-??; CVS version 1.9c, Libtool team:
 * Return type of lt_dlloader_remove is no longer `const'.
+* libltdl is C89 compatible again.  lt_dlsymbol type removed, and lt_dlsymlist
+  structure changed to avoid using C99 flexible arrays.
 
 New in 1.9b: 2004-08-29; CVS version 1.5a, Libtool team:
 * The /^_?LT_[A-Z_]+$/ namespace is now reserved for Libtool's own macros.


--- orig/config/ltmain.in
+++ mod/config/ltmain.in
@@ -962,23 +962,18 @@
 
 /* The mapping between symbol names and symbols.  */
 const struct {
-  const char *originator;
-  const struct {
-    const char *name;
-    void *address;
-  } symbols[];
+   const char *name;
+   void *address;
 }
-lt_${my_prefix}_LTX_preloaded_symbols =
+lt_${my_prefix}_LTX_preloaded_symbols[] =
 {\
-  \"$my_originator\",
-  {
+  { \"$my_originator\", (void *) 0 },
 "
 
          eval "$global_symbol_to_c_name_address" < "$nlist" >> 
"$output_objdir/$my_dlsyms"
 
          $echo >> "$output_objdir/$my_dlsyms" "\
   {0, (void *) 0}
-  }
 };
 
 /* This works around a problem in FreeBSD linker */


--- orig/libltdl/loaders/preopen.c
+++ mod/libltdl/loaders/preopen.c
@@ -158,8 +158,8 @@
 
   for (lists = preloaded_symlists; lists; lists = lists->next)
     {
-      const lt_dlsymbol *symbol;
-      for (symbol= lists->symlist->symbols; symbol->name; ++symbol)
+      const lt_dlsymlist *symbol;
+      for (symbol= lists->symlist; symbol->name; ++symbol)
        {
          if (!symbol->address && streq (symbol->name, filename))
            {
@@ -192,10 +192,9 @@
 static void *
 vm_sym (lt_user_data loader_data, lt_module module, const char *name)
 {
-  lt_dlsymlist        *symlist = (lt_dlsymlist*) module;
-  const lt_dlsymbol    *symbol  = symlist->symbols;
+  lt_dlsymlist        *symbol = (lt_dlsymlist*) module;
 
-  ++symbol;                    /* Skip header. */
+  symbol +=2;                  /* Skip header (originator then libname). */
 
   while (symbol->name)
     {
@@ -320,15 +319,16 @@
   for (list = preloaded_symlists; list; list = list->next)
     {
       /* ...that was preloaded by the requesting ORIGINATOR... */
-      if (streq (list->symlist->originator, originator))
+      if (streq (list->symlist->name, originator))
        {
-         const lt_dlsymbol *symbol;
+         const lt_dlsymlist *symbol;
          unsigned int idx = 0;
 
          ++found;
 
-         /* ...load the symbols per source compilation unit:  */
-         while ((symbol = &list->symlist->symbols[idx++])->name != 0)
+         /* ...load the symbols per source compilation unit:
+            (we preincrement the index to skip over the originator entry)  */
+         while ((symbol = &list->symlist[++idx])->name != 0)
            {
              if ((symbol->address == 0)
                  && (strneq (symbol->name, "@PROGRAM@")))


--- orig/libltdl/ltdl.h
+++ mod/libltdl/ltdl.h
@@ -84,11 +84,6 @@
 typedef struct {
   const char *name;
   void       *address;
-} lt_dlsymbol;
-
-typedef struct {
-  const char    *originator;
-  const lt_dlsymbol symbols[];
 } lt_dlsymlist;
 
 typedef int lt_dlpreload_callback_func (lt_dlhandle handle);
@@ -100,8 +95,8 @@
 
 #define lt_preloaded_symbols   lt__PROGRAM__LTX_preloaded_symbols
 #define LTDL_SET_PRELOADED_SYMBOLS()                   LT_STMT_START{  \
-       extern const lt_dlsymlist lt_preloaded_symbols;                 \
-       lt_dlpreload_default(&lt_preloaded_symbols);                    \
+       extern const lt_dlsymlist lt_preloaded_symbols[];               \
+       lt_dlpreload_default(lt_preloaded_symbols);                     \
                                                        }LT_STMT_END
 
 


--- orig/m4/libtool.m4
+++ mod/m4/libtool.m4
@@ -2793,21 +2793,16 @@
 
 /* The mapping between symbol names and symbols.  */
 const struct {
-  const char *originator;
-  const struct {
-    const char *name;
-    void       *address;
-  } symbols[[]];
+  const char *name;
+  void       *address;
 }
-lt__PROGRAM__LTX_preloaded_symbols =
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
 {
-  "@PROGRAM@",
-  {
+  { "@PROGRAM@", (void *) 0 },
 _LT_EOF
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) 
\&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
          cat <<\_LT_EOF >> conftest.$ac_ext
   {0, (void *) 0}
-  }
 };
 
 /* This works around a problem in FreeBSD linker */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]