зеркало из https://github.com/github/ruby.git
* dln.c: use dlopen on Mac OS X 10.3 or later.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0c882f4c9d
Коммит
6dde5de022
|
@ -1,3 +1,7 @@
|
||||||
|
Fri Feb 23 10:31:16 2007 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
|
* dln.c: use dlopen on Mac OS X 10.3 or later.
|
||||||
|
|
||||||
Fri Feb 23 10:03:49 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Fri Feb 23 10:03:49 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* string.c (rb_str_ord): need not to check string length; ord
|
* string.c (rb_str_ord): need not to check string length; ord
|
||||||
|
|
19
dln.c
19
dln.c
|
@ -81,19 +81,28 @@ char *getenv();
|
||||||
# include "macruby_private.h"
|
# include "macruby_private.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__APPLE__) && defined(__MACH__) /* Mac OS X */
|
||||||
|
# if defined(HAVE_DLOPEN)
|
||||||
|
/* Mac OS X with dlopen (10.3 or later) */
|
||||||
|
# define MACOSX_DLOPEN
|
||||||
|
# else
|
||||||
|
# define MACOSX_DYLD
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __BEOS__
|
#ifdef __BEOS__
|
||||||
# include <image.h>
|
# include <image.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_DLN_LOAD
|
#ifndef NO_DLN_LOAD
|
||||||
|
|
||||||
#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP)
|
#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(MACOSX_DYLD) && !defined(_UNICOSMP)
|
||||||
/* dynamic load with dlopen() */
|
/* dynamic load with dlopen() */
|
||||||
# define USE_DLN_DLOPEN
|
# define USE_DLN_DLOPEN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FUNCNAME_PATTERN
|
#ifndef FUNCNAME_PATTERN
|
||||||
# if defined(__hp9000s300) || (defined(__NetBSD__) && !defined(__ELF__)) || defined(__BORLANDC__) || (defined(__FreeBSD__) && !defined(__ELF__)) || (defined(__OpenBSD__) && !defined(__ELF__)) || defined(NeXT) || defined(__WATCOMC__) || defined(__APPLE__)
|
# if defined(__hp9000s300) || (defined(__NetBSD__) && !defined(__ELF__)) || defined(__BORLANDC__) || (defined(__FreeBSD__) && !defined(__ELF__)) || (defined(__OpenBSD__) && !defined(__ELF__)) || defined(NeXT) || defined(__WATCOMC__) || defined(MACOSX_DYLD)
|
||||||
# define FUNCNAME_PATTERN "_Init_%s"
|
# define FUNCNAME_PATTERN "_Init_%s"
|
||||||
# else
|
# else
|
||||||
# define FUNCNAME_PATTERN "Init_%s"
|
# define FUNCNAME_PATTERN "Init_%s"
|
||||||
|
@ -1097,7 +1106,7 @@ dln_sym(const char *name)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __APPLE__
|
#ifdef MACOSX_DYLD
|
||||||
#include <mach-o/dyld.h>
|
#include <mach-o/dyld.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -1345,7 +1354,7 @@ dln_load(const char *file)
|
||||||
}
|
}
|
||||||
#endif /* _AIX */
|
#endif /* _AIX */
|
||||||
|
|
||||||
#if defined(NeXT) || defined(__APPLE__)
|
#if defined(NeXT) || defined(MACOSX_DYLD)
|
||||||
#define DLN_DEFINED
|
#define DLN_DEFINED
|
||||||
/*----------------------------------------------------
|
/*----------------------------------------------------
|
||||||
By SHIROYAMA Takayuki Psi@fortune.nest.or.jp
|
By SHIROYAMA Takayuki Psi@fortune.nest.or.jp
|
||||||
|
@ -1469,7 +1478,7 @@ dln_load(const char *file)
|
||||||
}
|
}
|
||||||
#endif /* __BEOS__*/
|
#endif /* __BEOS__*/
|
||||||
|
|
||||||
#ifdef __MACOS__
|
#ifdef __MACOS__ /* Mac OS 9 or before */
|
||||||
# define DLN_DEFINED
|
# define DLN_DEFINED
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSErr err;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче