]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* demo/dlmain.c (_WIN32): The lt_symlist structure is now const,
authorGary V. Vaughan <gary@gnu.org>
Mon, 15 Feb 1999 14:23:02 +0000 (14:23 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 15 Feb 1999 14:23:02 +0000 (14:23 +0000)
so my original horrible temporary win32 hack no longer worked.
Here is a new horrible temporary hack to prevent helldl from SEGVing
on win32.  I will fix this properly when we figure out how to do
data exports from dlls.

ChangeLog
demo/dlmain.c

index 62097b6a5ad4c71a46b53fff3da7828a0794c469..8150bd57e2425e2bffe8f1e67e58547d3685f431 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+1999-02-15  Gary V. Vaughan  <gvaughan@oranda.demon.co.uk>
+
+       * demo/dlmain.c (_WIN32): The lt_symlist structure is now const,
+       so my original horrible temporary win32 hack no longer worked.
+       Here is a new horrible temporary hack to prevent helldl from SEGVing
+       on win32.  I will fix this properly when we figure out how to do
+       data exports from dlls.
+
 1999-02-14  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * libtool.m4 (AC_CHECK_LIBM): do not set MATHLIB or AC_SUBST it,
index 32c8c6e0f1ed1b02d70a905f9a9b1e50f008bdf0..7c123bb8e285d1e93910fb7f61dd2af0569b1e36 100644 (file)
@@ -32,25 +32,6 @@ struct lt_symlist
 
 extern const struct lt_symlist lt_preloaded_symbols[];
 
-#ifdef __CYGWIN32__
-int
-win32_force_data_import_address __P((void))
-{
-  const struct lt_symlist *s;
-  
-  s = lt_preloaded_symbols;
-  while (s->name)
-    {
-      if (!strcmp ("nothing", s->name))
-        s->address = &nothing;
-      s++;
-    }
-
-  return 0;
-}
-#endif
-      
-
 int
 main (argc, argv)
      int argc;
@@ -63,11 +44,6 @@ main (argc, argv)
 
   printf ("Welcome to *modular* GNU Hell!\n");
 
-#ifdef __CYGWIN32__
-  /* runtime table initialisation */
-  (void) win32_force_data_import_address();
-#endif
-
   /* Look up the symbols we require for this demonstration. */
   s = lt_preloaded_symbols;
   while (s->name)
@@ -80,7 +56,13 @@ main (argc, argv)
         else if (!strcmp ("foo", name))
          pfoo = (int(*)())s->address;
         else if (!strcmp ("nothing", name))
+#ifndef _WIN32
+         /* In an ideal world we could do this... */
          pnothing = (int*)s->address;
+#else /* !_WIN32 */
+         /* In an ideal world a shared lib would be able to export data */
+         pnothing = (int*)&nothing;
+#endif
       } else 
         printf ("found file: %s\n", s->name);
       s ++;