Grokbase Groups PHP php-cvs May 2013
FAQ
Commit: 5b121eb04d358f83e974b6c5fe069c38cf1f960b
Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tue, 7 May 2013 20:37:04 +0200
Parents: de7415ea559444fe0a0cb4d4b4b7b93c8e19435a
Branches: PHP-5.5

Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5b121eb04d358f83e974b6c5fe069c38cf1f960b

Log:
Fix #64780 (PHP 5.5 builds are broken with GCC 3)

A recent change (by me) introduced a call to __builtin_offsetof()
into zend_operators.h which is not defined by GCC prior to
version 4.

Changed the code to use offsetof() instead: this is defined in
<stddef.h>, so #include this header conditionally (#ifdef GNUC)

Bugs:
https://bugs.php.net/64780

Changed paths:
   M Zend/zend_operators.h


Diff:
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index a82c14b..0b890ff 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -26,6 +26,10 @@
  #include <math.h>
  #include <assert.h>

+#ifdef __GNUC__
+#include <stddef.h>
+#endif
+
  #ifdef HAVE_IEEEFP_H
  #include <ieeefp.h>
  #endif
@@ -497,7 +501,7 @@ ZEND_API void zend_update_current_locale(void);

  /* The offset in bytes between the value and type fields of a zval */
  #define ZVAL_OFFSETOF_TYPE \
- (__builtin_offsetof(zval,type) - __builtin_offsetof(zval,value))
+ (offsetof(zval,type) - offsetof(zval,value))

  static zend_always_inline int fast_increment_function(zval *op1)
  {

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-cvs @
categoriesphp
postedMay 7, '13 at 8:07p
activeMay 7, '13 at 8:07p
posts1
users1
websitephp.net

1 user in discussion

Ard Biesheuvel: 1 post

People

Translate

site design / logo © 2019 Grokbase