php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61257
Patch patch-sapi_fpm_atomic.h revision 2012-03-12 18:54 UTC by schnorte at gmail dot com

Patch patch-sapi_fpm_atomic.h for Compile Failure Bug #61257

Patch version 2012-03-12 18:54 UTC

Return to Bug #61257 | Download this patch
Patch Revisions:

Developer: schnorte@gmail.com

--- sapi/fpm/fpm/fpm_atomic.h.orig      2012-03-12 17:36:06.000000000 +0100
+++ sapi/fpm/fpm/fpm_atomic.h   2012-03-12 18:12:06.000000000 +0100
@@ -77,10 +77,11 @@
 }
 /* }}} */

-#if (__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2))
-
 #elif ( __arm__ || __arm ) /* W-Mark Kubacki */

+#include <machine/atomic.h>
+#define __sync_bool_compare_and_swap(a, b, c) atomic_cmpset_32(a, b, c)
+
 #if (__arch64__ || __arch64)
 typedef int64_t                     atomic_int_t;
 typedef uint64_t                    atomic_uint_t;
@@ -89,10 +90,9 @@
 typedef uint32_t                    atomic_uint_t;
 #endif

+typedef volatile atomic_uint_t      atomic_t;
 #define atomic_cmp_set(a,b,c) __sync_bool_compare_and_swap(a,b,c)

-#endif /* defined (__GNUC__) &&... */
-
 #elif ( __sparc__ || __sparc ) /* Marcin Ochab */

 #if (__sparcv9 || __sparcv9__)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 13:01:33 2024 UTC