fat Sat, 21 Aug 2010 06:46:18 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=302600
Log: - Fix #52407 (use __sync_bool_compare_and_swap in fpm_atomic.h if gcc >= 4.1 is used - credit to geissert) Bug: http://bugs.php.net/52407 (Assigned) FPM module compilation fails on ARM architecture Changed paths: U php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_atomic.h U php/php-src/trunk/sapi/fpm/fpm/fpm_atomic.h Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_atomic.h =================================================================== --- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_atomic.h 2010-08-21 04:07:54 UTC (rev 302599) +++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_atomic.h 2010-08-21 06:46:18 UTC (rev 302600) @@ -12,8 +12,20 @@ #endif #include <sched.h> -#if ( __i386__ || __i386 ) +#if (__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 1) +/** + * all the cases below (as provided by upstream) define: + * word as atomic_int_t, and + * unsigned word as atomic_uint_t + * and only use volatile atomic_uint_t as atomic_t + */ + +typedef volatile unsigned long atomic_t; +#define atomic_cmp_set(a,b,c) __sync_bool_compare_and_swap(a,b,c) + +#elif ( __i386__ || __i386 ) + typedef int32_t atomic_int_t; typedef uint32_t atomic_uint_t; typedef volatile atomic_uint_t atomic_t; Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_atomic.h =================================================================== --- php/php-src/trunk/sapi/fpm/fpm/fpm_atomic.h 2010-08-21 04:07:54 UTC (rev 302599) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_atomic.h 2010-08-21 06:46:18 UTC (rev 302600) @@ -12,8 +12,20 @@ #endif #include <sched.h> -#if ( __i386__ || __i386 ) +#if (__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 1) +/** + * all the cases below (as provided by upstream) define: + * word as atomic_int_t, and + * unsigned word as atomic_uint_t + * and only use volatile atomic_uint_t as atomic_t + */ + +typedef volatile unsigned long atomic_t; +#define atomic_cmp_set(a,b,c) __sync_bool_compare_and_swap(a,b,c) + +#elif ( __i386__ || __i386 ) + typedef int32_t atomic_int_t; typedef uint32_t atomic_uint_t; typedef volatile atomic_uint_t atomic_t;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php