ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/libltdl/loaders/dyld.c
(Generate patch)

Comparing ircd-hybrid/branches/8.2.x/libltdl/loaders/dyld.c (file contents):
Revision 4900 by michael, Thu Apr 24 16:15:51 2014 UTC vs.
Revision 4901 by michael, Sat Nov 22 18:31:53 2014 UTC

# Line 1 | Line 1
1   /* loader-dyld.c -- dynamic linking on darwin and OS X
2  
3 <   Copyright (C) 1998, 1999, 2000, 2004, 2006,
4 <                 2007, 2008 Free Software Foundation, Inc.
3 >   Copyright (C) 1998-2000, 2004, 2006-2008, 2011-2014 Free Software
4 >   Foundation, Inc.
5     Written by Peter O'Gorman, 1998
6  
7     NOTE: The canonical source of this file is maintained with the
# Line 93 | Line 93 | get_vtable (lt_user_data loader_data)
93   /* --- IMPLEMENTATION --- */
94  
95  
96 < #if defined(HAVE_MACH_O_DYLD_H)
97 < #  if !defined(__APPLE_CC__) && !defined(__MWERKS__) && !defined(__private_extern__)
96 > #if defined HAVE_MACH_O_DYLD_H
97 > #  if !defined __APPLE_CC__ && !defined __MWERKS__ && !defined __private_extern__
98    /* Is this correct? Does it still function properly? */
99   #    define __private_extern__ extern
100   #  endif
# Line 104 | Line 104 | get_vtable (lt_user_data loader_data)
104   #include <mach-o/getsect.h>
105  
106   /* We have to put some stuff here that isn't in older dyld.h files */
107 < #if !defined(ENUM_DYLD_BOOL)
107 > #if !defined ENUM_DYLD_BOOL
108   # define ENUM_DYLD_BOOL
109   # undef FALSE
110   # undef TRUE
# Line 113 | Line 113 | get_vtable (lt_user_data loader_data)
113      TRUE
114   };
115   #endif
116 < #if !defined(LC_REQ_DYLD)
116 > #if !defined LC_REQ_DYLD
117   # define LC_REQ_DYLD 0x80000000
118   #endif
119 < #if !defined(LC_LOAD_WEAK_DYLIB)
119 > #if !defined LC_LOAD_WEAK_DYLIB
120   # define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD)
121   #endif
122  
123 < #if !defined(NSADDIMAGE_OPTION_NONE)
123 > #if !defined NSADDIMAGE_OPTION_NONE
124   #  define NSADDIMAGE_OPTION_NONE                          0x0
125   #endif
126 < #if !defined(NSADDIMAGE_OPTION_RETURN_ON_ERROR)
126 > #if !defined NSADDIMAGE_OPTION_RETURN_ON_ERROR
127   #  define NSADDIMAGE_OPTION_RETURN_ON_ERROR               0x1
128   #endif
129 < #if !defined(NSADDIMAGE_OPTION_WITH_SEARCHING)
129 > #if !defined NSADDIMAGE_OPTION_WITH_SEARCHING
130   #  define NSADDIMAGE_OPTION_WITH_SEARCHING                0x2
131   #endif
132 < #if !defined(NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED)
132 > #if !defined NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED
133   #  define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED         0x4
134   #endif
135 < #if !defined(NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME)
135 > #if !defined NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME
136   #  define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8
137   #endif
138  
139 < #if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND)
139 > #if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_BIND
140   #  define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND               0x0
141   #endif
142 < #if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW)
142 > #if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
143   #  define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW           0x1
144   #endif
145 < #if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY)
145 > #if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY
146   #  define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY         0x2
147   #endif
148 < #if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR)
148 > #if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
149   #  define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR    0x4
150   #endif
151  
152   #define LT__SYMLOOKUP_OPTS      (NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW \
153                                  | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR)
154  
155 < #if defined(__BIG_ENDIAN__)
155 > #if defined __BIG_ENDIAN__
156   #  define LT__MAGIC     MH_MAGIC
157   #else
158   #  define LT__MAGIC     MH_CIGAM
# Line 240 | Line 240 | vm_open (lt_user_data loader_data, const
240      {
241      case NSObjectFileImageSuccess:
242        module = NSLinkModule (ofi, filename, NSLINKMODULE_OPTION_RETURN_ON_ERROR
243 <                                            | NSLINKMODULE_OPTION_PRIVATE
244 <                                            | NSLINKMODULE_OPTION_BINDNOW);
243 >                                            | NSLINKMODULE_OPTION_PRIVATE
244 >                                            | NSLINKMODULE_OPTION_BINDNOW);
245        NSDestroyObjectFileImage (ofi);
246  
247        if (module)
# Line 302 | Line 302 | vm_close (lt_user_data loader_data, lt_m
302              {
303                flags |= NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED;
304              }
305 < #if defined(__ppc__)
305 > #if defined __ppc__
306            flags |= NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES;
307   #endif
308            if (!NSUnLinkModule (module, flags))
# Line 350 | Line 350 | vm_sym (lt_user_data loader_data, lt_mod
350  
351    if (!nssym)
352      {
353 <      strncpy (saveError, dylderror (LT__STRERROR (SYMBOL_NOT_FOUND)), 255);
353 >      strlcpy (saveError, dylderror (LT__STRERROR (SYMBOL_NOT_FOUND)), 255);
354        saveError[255] = 0;
355        if (!mh)
356          {

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)