php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #52407
Patch fpm-gcc-atomics.patch revision 2010-07-28 21:31 UTC by geissert@php.net
Patch fpm_atomic_h_fix.patch revision 2010-07-24 12:36 UTC by fat@php.net
revision 2010-07-22 15:20 UTC by eugenesan at gmail dot com

Patch fpm_atomic_h_fix.patch for Compile Failure Bug #52407

Patch version 2010-07-22 15:20 UTC

Return to Bug #52407 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions: 2010-07-24 12:36 UTC | 2010-07-22 15:20 UTC

Developer: eugenesan@gmail.com

Line 1 (now 1), was 53 lines, now 25 lines
 Index: sapi/fpm/fpm/fpm_atomic.h
 ===================================================================
 --- sapi/fpm/fpm/fpm_atomic.h	(r�vision 301509)
 +++ sapi/fpm/fpm/fpm_atomic.h	(copie de travail)
 @@ -65,10 +65,9 @@
 --- php.orig/sapi/fpm/fpm/fpm_atomic.h	2010-07-13 09:02:20.000000000 +0300
 +++ php/fpm/fpm/fpm_atomic.h	2010-07-13 16:27:37.143621901 +0300
 @@ -65,9 +65,7 @@
   }
   /* }}} */
   
  -#if (__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2))
 +#elif ( __arm__ || __arm )/* W-Mark Kubacki */
 +#if ( (__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ > 2) )/* W-Mark Kubacki */
  
 -
  -#elif ( __arm__ || __arm ) /* W-Mark Kubacki */
 -
  #if (__arch64__ || __arch64)
 +#elif ( (__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ > 2) && ( __arm__ || __arm ) )/* W-Mark Kubacki */
  
  #if (__arch64__ || __arch64)
   typedef int64_t                     atomic_int_t;
  typedef uint64_t                    atomic_uint_t;
 @@ -77,10 +76,16 @@
 @@ -77,9 +75,9 @@
   typedef uint32_t                    atomic_uint_t;
   #endif
   
 -#define atomic_cmp_set(a,b,c) __sync_bool_compare_and_swap(a,b,c)
  +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__) &&... */
 +#else /* if ( (__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ > 2) ) */
  
 +#error FPM on ARM arch only support GNU GCC > 4.2. please write a patch and send it to me
 +
 +#endif
 +
 +#define atomic_cmp_set(a,b,c) __sync_bool_compare_and_swap(a,b,c)
  
   #elif ( __sparc__ || __sparc ) /* Marcin Ochab */
  
  #if (__arch64__ || __arch64)
 @@ -100,7 +105,7 @@
  	return (atomic_cas_64(lock, old, set)==old);
  }
  /* }}} */
 -#else
 +#else /* if (__arch64__ || __arch64) */
  typedef uint32_t                    atomic_uint_t;
  typedef volatile atomic_uint_t      atomic_t;
  
 @@ -117,7 +122,7 @@
  	return (atomic_cas_32(lock, old, set)==old);
  }
  /* }}} */
 -#endif
 +#endif /* if (__arch64__ || __arch64) */
  
  #else
   
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 01:01:28 2024 UTC