dln-snow-leopard.patch

pixeltrix (Andrew White), 10/16/2009 03:11 pm

Download (1.9 kB)

dln.c (working copy)
81 81
# include "macruby_private.h"
82 82
#endif
83 83

  
84
#if defined(__APPLE__) && defined(__MACH__)   /* Mac OS X */
85
# if defined(HAVE_DLOPEN)
86
   /* Mac OS X with dlopen (10.3 or later) */
87
#  define MACOSX_DLOPEN
88
# else
89
#  define MACOSX_DYLD
90
# endif
91
#endif
92

  
84 93
#ifdef __BEOS__
85 94
# include <image.h>
86 95
#endif
87 96

  
88 97
#ifndef NO_DLN_LOAD
89 98

  
90
#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP)
99
#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(MACOSX_DYLD) && !defined(_UNICOSMP)
91 100
/* dynamic load with dlopen() */
92 101
# define USE_DLN_DLOPEN
93 102
#endif
94 103

  
95 104
#ifndef FUNCNAME_PATTERN
96
# if defined(__hp9000s300) ||  (defined(__NetBSD__) && !defined(__ELF__)) || defined(__BORLANDC__) || (defined(__FreeBSD__) && !defined(__ELF__)) || (defined(__OpenBSD__) && !defined(__ELF__)) || defined(NeXT) || defined(__WATCOMC__) || defined(__APPLE__)
105
# if defined(__hp9000s300) ||  (defined(__NetBSD__) && !defined(__ELF__)) || defined(__BORLANDC__) || (defined(__FreeBSD__) && !defined(__ELF__)) || (defined(__OpenBSD__) && !defined(__ELF__)) || defined(NeXT) || defined(__WATCOMC__) || defined(MACOSX_DYLD)
97 106
#  define FUNCNAME_PATTERN "_Init_%s"
98 107
# else
99 108
#  define FUNCNAME_PATTERN "Init_%s"
......
1141 1150
#endif
1142 1151
#endif
1143 1152
#else
1144
#ifdef __APPLE__
1153
#ifdef MACOSX_DYLD
1145 1154
#include <mach-o/dyld.h>
1146 1155
#endif
1147 1156
#endif
......
1403 1412
    }
1404 1413
#endif /* _AIX */
1405 1414

  
1406
#if defined(NeXT) || defined(__APPLE__)
1415
#if defined(NeXT) || defined(MACOSX_DYLD)
1407 1416
#define DLN_DEFINED
1408 1417
/*----------------------------------------------------
1409 1418
   By SHIROYAMA Takayuki Psi@fortune.nest.or.jp
......
1527 1536
    }
1528 1537
#endif /* __BEOS__*/
1529 1538

  
1530
#ifdef __MACOS__
1539
#ifdef __MACOS__   /* Mac OS 9 or before */
1531 1540
# define DLN_DEFINED
1532 1541
    {
1533 1542
      OSErr err;