From: Moriyoshi Koizumi Date: Wed, 3 Nov 2004 23:05:18 +0000 (+0000) Subject: - Checks for Darwin'ish systems that uses Mach-O, which apparently doesn't X-Git-Tag: RELEASE_0_2~743 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae78d7d4bfe90a48dc5dad4b465ebbf8c289c4b0;p=php - Checks for Darwin'ish systems that uses Mach-O, which apparently doesn't support weak symbol aliasing at this time. --- diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index f3b8a3d171..1b2029b052 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -211,6 +211,13 @@ AC_C_INLINE AC_SUBST(INLINE_CFLAGS) +AC_MSG_CHECKING(target system is Darwin) +if echo "$target" | grep "darwin"; then + AC_DEFINE([DARWIN], 1, [Define if the target system is darwin]) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi dnl test and set the alignment define for ZEND_MM dnl this also does the logarithmic test for ZEND_MM. diff --git a/Zend/zend.h b/Zend/zend.h index c3c04efd0d..b5aee896fb 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -177,7 +177,7 @@ char *alloca (); #endif -#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(__darwin__) && !defined(__APPLE__) +#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN) # define do_alloca(p) alloca(p) # define free_alloca(p) #else diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index b0115d54e6..ede4e5a762 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -42,7 +42,7 @@ #define _UNUSED_CODE 3 #define _CV_CODE 4 -#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(ZEND_VM_OLD_EXECUTOR) +#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(ZEND_VM_OLD_EXECUTOR) # define ZEND_VM_ALWAYS_INLINE __attribute__ ((always_inline)) void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn)); /*extern void zend_error_noreturn(int type, const char *format, ...) __asm__("zend_error") __attribute__ ((noreturn));*/ diff --git a/configure.in b/configure.in index f472a44fa0..1c707bfb2e 100644 --- a/configure.in +++ b/configure.in @@ -36,6 +36,8 @@ for arg in $0 "$@"; do done AC_CANONICAL_HOST +AC_CANONICAL_TARGET + AC_CONFIG_HEADER(main/php_config.h) MAJOR_VERSION=5