From 97ba30ba5cc892045c0458d52f9b19e49b056720 Mon Sep 17 00:00:00 2001 From: foobar Date: Thu, 4 Apr 2002 00:24:34 +0000 Subject: [PATCH] - OS X support for dynamically loaded extensions. (patch by Marko) # NEWS entry coming up.. --- configure.in | 1 + ext/standard/dl.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index 6ed5af88f2..c3e975b4d0 100644 --- a/configure.in +++ b/configure.in @@ -379,6 +379,7 @@ ieeefp.h \ langinfo.h \ limits.h \ locale.h \ +mach-o/dyld.h \ netinet/in.h \ pwd.h \ resolv.h \ diff --git a/ext/standard/dl.c b/ext/standard/dl.c index fae9ef4fbc..6152f56deb 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -30,7 +30,7 @@ #include "build-defs.h" #endif -#ifdef HAVE_LIBDL +#if defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H #include #include @@ -45,10 +45,10 @@ #define GET_DL_ERROR() php_win_err() #else #include -#define GET_DL_ERROR() dlerror() +#define GET_DL_ERROR() DL_ERROR() #endif -#endif +#endif /* defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H */ /* {{{ proto int dl(string extension_filename) @@ -83,7 +83,7 @@ PHP_FUNCTION(dl) /* }}} */ -#ifdef HAVE_LIBDL +#if defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H #ifdef ZTS #define USING_ZTS 1 -- 2.50.1