Created
February 17, 2010 22:50
-
-
Save janv/307108 to your computer and use it in GitHub Desktop.
Some Bugfix for PHP4 on Mac? dunno
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Zend/zend.h 2007-09-05 00:16:02.000000000 +0200 | |
+++ Zend/zend.h | |
@@ -80,18 +80,7 @@ | |
# include <dlfcn.h> | |
#endif | |
-#if HAVE_MACH_O_DYLD_H | |
-#include <mach-o/dyld.h> | |
- | |
-/* MH_BUNDLE loading functions for Mac OS X / Darwin */ | |
-void *zend_mh_bundle_load (char* bundle_path); | |
-int zend_mh_bundle_unload (void *bundle_handle); | |
-void *zend_mh_bundle_symbol(void *bundle_handle, const char | |
*symbol_name); | |
-const char *zend_mh_bundle_error(void); | |
- | |
-#endif /* HAVE_MACH_O_DYLD_H */ | |
- | |
-#if defined(HAVE_LIBDL) && !defined(HAVE_MACH_O_DYLD_H) && | |
!defined(ZEND_WIN32) | |
+#if defined(HAVE_LIBDL) && !defined(ZEND_WIN32) | |
# ifndef RTLD_LAZY | |
# define RTLD_LAZY 1 /* Solaris 1, FreeBSD's (2.1.7.1 and older) | |
*/ | |
@@ -118,6 +107,14 @@ const char *zend_mh_bundle_error(void); | |
# define DL_HANDLE void * | |
# define ZEND_EXTENSIONS_SUPPORT 1 | |
#elif defined(HAVE_MACH_O_DYLD_H) | |
+ | |
+#include <mach-o/dyld.h> | |
+ | |
+/* MH_BUNDLE loading functions for Mac OS X / Darwin */ | |
+void *zend_mh_bundle_load (char* bundle_path); | |
+int zend_mh_bundle_unload (void *bundle_handle); | |
+void *zend_mh_bundle_symbol(void *bundle_handle, const char | |
*symbol_name); | |
+const char *zend_mh_bundle_error(void); | |
# define DL_LOAD(libname) | |
zend_mh_bundle_load(libname) | |
# define DL_UNLOAD zend_mh_bundle_unload | |
# define DL_FETCH_SYMBOL(h,s) | |
zend_mh_bundle_symbol(h,s) | |
--- Zend/zend_extensions.c 2007-09-05 00:24:04.000000000 +0200 | |
+++ Zend/zend_extensions.c | |
@@ -230,7 +230,7 @@ ZEND_API zend_extension *zend_get_extens | |
* | |
*/ | |
-#if HAVE_MACH_O_DYLD_H | |
+#if defined(HAVE_MACH_O_DYLD_H) && !defined(HAVE_LIBDL) | |
void *zend_mh_bundle_load(char* bundle_path) | |
{ | |
@@ -284,7 +284,7 @@ const char *zend_mh_bundle_error(void) | |
return NULL; | |
} | |
-#endif /* HAVE_MACH_O_DYLD_H */ | |
+#endif /* HAVE_MACH_O_DYLD_H && !HAVE_LIBDL */ | |
/* | |
* Local variables: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment