~clint-fewbar/ubuntu/precise/php5/php5-5.4-merge

« back to all changes in this revision

Viewing changes to debian/patches/fpm_gcc_atomics.patch

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-02-22 09:46:37 UTC
  • mfrom: (1.1.20) (0.3.18 sid)
  • Revision ID: package-import@ubuntu.com-20110222094637-nlu2tvb7oqgaarl0
Tags: 5.3.5-1ubuntu1
* Merge from debian/unstable. Remaining changes:
 - debian/control:
    * Dropped firebird2.1-dev, libc-client-dev, libmcrypt-dev as it is in universe.
    * Dropped libmysqlclient15-dev, build against mysql 5.1.
    * Dropped libcurl-dev not in the archive.
    * Suggest php5-suhosin rather than recommends.
    * Dropped php5-imap, php5-interbase, php5-mcrypt since we have versions 
      already in universe.
    * Dropped libonig-dev and libqgdbm since its in universe. (will be re-added in lucid+1)
    * Dropped locales-all.
  - modulelist: Drop imap, interbase, sybase, and mcrypt.
  - debian/rules:
    * Dropped building of mcrypt, imap, and interbase.
    * Install apport hook for php5.
    * stop mysql instance on clean just in case we failed in tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Use GCC's atomic builtins in the FPM SAPI to allow it to
2
 
 build everywhere.
3
 
Origin: vendor
4
 
Forwarded: http://bugs.php.net/52407
5
 
Last-Update: 2010-07-28
6
 
 
7
 
Index: php-5.3.3/sapi/fpm/fpm/fpm_atomic.h
8
 
===================================================================
9
 
--- php-5.3.3.orig/sapi/fpm/fpm/fpm_atomic.h
10
 
+++ php-5.3.3/sapi/fpm/fpm/fpm_atomic.h
11
 
@@ -12,7 +12,19 @@
12
 
 #endif
13
 
 #include <sched.h>
14
 
 
15
 
-#if ( __i386__ || __i386 )
16
 
+#if (__GNUC__) && (__GNUC__ >= 4 &&  __GNUC_MINOR__ >= 1)
17
 
+
18
 
+/**
19
 
+ * all the cases below (as provided by upstream) define:
20
 
+ * word as atomic_int_t, and
21
 
+ * unsigned word as atomic_uint_t
22
 
+ * and only use volatile atomic_uint_t as atomic_t
23
 
+ */
24
 
+
25
 
+typedef volatile unsigned long atomic_t;
26
 
+#define atomic_cmp_set(a,b,c) __sync_bool_compare_and_swap(a,b,c)
27
 
+
28
 
+#elif ( __i386__ || __i386 )
29
 
 
30
 
 typedef int32_t                     atomic_int_t;
31
 
 typedef uint32_t                    atomic_uint_t;