com php-src: This should fix compilation on OSX (bug #68987 Failed to compile zend.c with gcc-4.9.2): Zend/zend.c Zend/zend.h Zend/zend_portability.h

From: Date: Fri, 06 Feb 2015 10:42:22 +0000
Subject: com php-src: This should fix compilation on OSX (bug #68987 Failed to compile zend.c with gcc-4.9.2): Zend/zend.c Zend/zend.h Zend/zend_portability.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84679@lists.php.net to get a copy of this message
Commit: 57496c38363241eb955b74e10a55df7135b455ef Author: Dmitry Stogov <dmitry@zend.com> Fri, 6 Feb 2015 13:42:22 +0300 Parents: fdfc0ccdf811426f2c26b542fe9f7a04294bfe63 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=57496c38363241eb955b74e10a55df7135b455ef Log: This should fix compilation on OSX (bug #68987 Failed to compile zend.c with gcc-4.9.2) Bugs: https://bugs.php.net/68987 Changed paths: M Zend/zend.c M Zend/zend.h M Zend/zend_portability.h Diff: diff --git a/Zend/zend.c b/Zend/zend.c index d28d8ef..a35786b 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -1199,9 +1199,10 @@ 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__)) +#ifdef HAVE_NORETURN +# ifdef HAVE_NORETURN_ALIAS void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn)); -#elif defined(ZEND_WIN32) || defined(DARWIN) +# else ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */ { va_list va; @@ -1220,6 +1221,7 @@ ZEND_API ZEND_NORETURN void zend_error_noreturn(int type, const char *format, .. va_end(va); } /* }}} */ +# endif #endif ZEND_API void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) /* {{{ */ diff --git a/Zend/zend.h b/Zend/zend.h index f74a84a..9d65675 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -77,10 +77,10 @@ ZEND_TSRMLS_CACHE_EXTERN; #ifdef HAVE_NORETURN -# if defined(ZEND_WIN32) -ZEND_API ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...); -# else +# ifdef ZEND_NORETRUN_ALIAS void zend_error_noreturn(int type, const char *format, ....) ZEND_NORETURN; +# else +ZEND_API ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...); # endif #else # define zend_error_noreturn zend_error diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index dfc3ad1..5c8a21e 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -224,6 +224,10 @@ char *alloca(); # define ZEND_NORETURN #endif +#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)) +# define HAVE_NORETURN_ALIAS +#endif + #if ZEND_DEBUG # define zend_always_inline inline # define zend_never_inline

« previous php.cvs (#84679) next »