libtool-patches
[Top][All Lists]
Advanced

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

[FYI] loader-dyld.c did not compile


From: Peter O'Gorman
Subject: [FYI] loader-dyld.c did not compile
Date: Sun, 18 Apr 2004 01:08:13 +0900
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4

On Mac OS X 10.3 dlopen(3) is available, so this file is not automatically compiled, on 10.2 and earlier it is not available, so this file is compiled, well, should be, but it fails:

/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H="<config.h>" -DLTDL -I. -I. -I.. -I.. -I.. -g -O2 -c -o loader-dyld.lo loader-dyld.c gcc "-DHAVE_CONFIG_H=<config.h>" -DLTDL -I. -I. -I.. -I.. -I.. -g -O2 -c loader-dyld.c -Wp,-MD,.deps/loader-dyld.TPlo -fno-common -DPIC -o .libs/loader-dyld.o
loader-dyld.c: In function `lt__dylderror':
loader-dyld.c:128: `LT_ERROR_errnum' undeclared (first use in this function)
loader-dyld.c:128: (Each undeclared identifier is reported only once
loader-dyld.c:128: for each function it appears in.)
loader-dyld.c: In function `sys_dyld_open':
loader-dyld.c:320: `CANNOT_OPEN' undeclared (first use in this function)
loader-dyld.c: In function `sys_dyld_close':
loader-dyld.c:356: `CANNOT_CLOSE' undeclared (first use in this function)
loader-dyld.c: In function `sys_dyld_sym':
loader-dyld.c:397: `SYMBOL_NOT_FOUND' undeclared (first use in this function)
loader-dyld.c:401: warning: assignment discards qualifiers from pointer target type
make[2]: *** [loader-dyld.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


I just committed the attached patch to fix this.

Note that I am pretty sure that I wrote most of the code in the dyld loader, so also set original author to me.

Peter

--
Peter O'Gorman - http://www.pogma.com

Index: ChangeLog
2004-04-16  Peter O'Gorman  <address@hidden>

        * libltdl/loader-dyld.c: Fix compilation issues. Set Original author
        to me.

from  Scott James Remnant  <address@hidden>
Index: libltdl/loader-dyld.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/loader-dyld.c,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 loader-dyld.c
--- libltdl/loader-dyld.c 13 Apr 2004 15:30:10 -0000 1.2
+++ libltdl/loader-dyld.c 17 Apr 2004 14:01:47 -0000
@@ -1,6 +1,6 @@
 /* loader-dyld.c -- dynamic linking on darwin and OS X
    Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
-   Originally by Thomas Tanner <address@hidden>
+   Originally by Peter O'Gorman <address@hidden>
 
    NOTE: The canonical source of this file is maintained with the
    GNU Libtool package.  Report bugs to address@hidden
@@ -125,7 +125,7 @@ lt__dylderror (int errnum)
 
   if (! (errstr && *errstr))
     {
-      errstr = LT__STRERROR (errnum);
+      errstr = lt__error_strings[errnum] ;
     }
 
   return errstr;
@@ -317,7 +317,7 @@ sys_dyld_open (lt_user_data loader_data,
 
   if (!module)
     {
-      DYLD__MUTEX_SETERROR (CANNOT_OPEN);
+      DYLD__MUTEX_SETERROR (LT_ERROR_CANNOT_OPEN);
     }
 
   return module;
@@ -353,7 +353,7 @@ sys_dyld_close (lt_user_data loader_data
 #endif
          if (!NSUnLinkModule (module, flags))
            {
-             DYLD__MUTEX_SETERRORSTR (CANNOT_CLOSE);
+             DYLD__MUTEX_SETERROR (LT_ERROR_CANNOT_CLOSE);
              ++errors;
            }
        }
@@ -394,11 +394,11 @@ sys_dyld_sym (lt_user_data loader_data, 
 
   if (!nssym)
     {
-      strncpy (saveError, lt__dylderror (SYMBOL_NOT_FOUND), 255);
+      strncpy (saveError, lt__dylderror (LT_ERROR_SYMBOL_NOT_FOUND), 255);
       saveError[255] = 0;
       if (!mh)
        {
-         mh = lt__nsmodule_get_header (module);
+         mh = (mach_header *)lt__nsmodule_get_header (module);
        }
       nssym = lt__linkedlib_symbol (symbol, mh);
     }

reply via email to

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