From: Xinchen Hui Date: Sat, 20 Sep 2014 05:51:58 +0000 (+0800) Subject: Fixed built on OSX X-Git-Tag: POST_NATIVE_TLS_MERGE^2~166 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e71f5ff7b095c8846df5c2bc5ad5cbbd12905f0;p=php Fixed built on OSX --- diff --git a/Zend/zend.c b/Zend/zend.c index f7b6ceb70e..9e414f9027 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -1044,7 +1044,7 @@ ZEND_API zval *zend_get_configuration_directive(zend_string *name) /* {{{ */ } \ } while (0) -#ifndef ZEND_WIN32 +#if !defined(ZEND_WIN32) && !defined(DARWIN) ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */ #else static void zend_error_va_list(int type, const char *format, va_list args) @@ -1052,7 +1052,7 @@ static void zend_error_va_list(int type, const char *format, va_list args) { char *str; int len; -#ifndef ZEND_WIN32 +#if !defined(ZEND_WIN32) && !defined(DARWIN) va_list args; #endif va_list usr_copy; @@ -1157,7 +1157,7 @@ static void zend_error_va_list(int type, const char *format, va_list args) } #endif /* HAVE_DTRACE */ -#ifndef ZEND_WIN32 +#if !defined(ZEND_WIN32) && !defined(DARWIN) va_start(args, format); #endif @@ -1270,7 +1270,7 @@ static void zend_error_va_list(int type, const char *format, va_list args) break; } -#ifndef ZEND_WIN32 +#if !defined(ZEND_WIN32) && !defined(DARWIN) va_end(args); #endif @@ -1287,9 +1287,9 @@ static void zend_error_va_list(int type, const char *format, va_list args) } /* }}} */ -#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)) || __has_attribute(noreturn) +#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)) void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn)); -#elif defined(ZEND_WIN32) +#elif defined(ZEND_WIN32) || defined(DARWIN) ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */ { va_list va; @@ -1307,6 +1307,7 @@ ZEND_API ZEND_NORETURN void zend_error_noreturn(int type, const char *format, .. zend_error_va_list(type, format, va); va_end(va); } +/* }}} */ #endif ZEND_API void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) /* {{{ */ @@ -1423,6 +1424,7 @@ void free_estring(char **str_p) /* {{{ */ { efree(*str_p); } +/* }}} */ void free_string_zval(zval *zv) /* {{{ */ {