1 --- webkitgtk-2.0.0/configure.ac.orig 2013-04-12 08:25:14.896829422 +0200
2 +++ webkitgtk-2.0.0/configure.ac 2013-04-12 08:27:21.244776999 +0200
4 AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz no-dist-gzip tar-ustar])
5 m4_include([Source/autotools/SetupAutomake.m4])
7 +dnl Check whether the target supports 64-bit __sync_*_compare_and_swap.
8 +AC_TRY_LINK([#include <stdint.h>],
10 + bar = __sync_val_compare_and_swap(&foo, 0, 1);],
11 + wtf_cv_have_64bit_sync_builtins=yes,
12 + wtf_cv_have_64bit_sync_builtins=no)
14 +if test $wtf_cv_have_64bit_sync_builtins = yes; then
15 + AC_DEFINE(HAVE_64BIT_SYNC_BUILTINS, 1,
16 + [Define to 1 if the target supports 64-bit __sync_*_compare_and_swap])
19 ######################################################################################
20 # Processing of configuration files
21 ######################################################################################
22 --- webkitgtk-2.0.0/Source/WTF/wtf/Atomics.h~ 2013-04-12 08:05:55.951740895 +0200
23 +++ webkitgtk-2.0.0/Source/WTF/wtf/Atomics.h 2013-04-12 08:22:46.701992338 +0200
25 inline int atomicIncrement(int volatile* addend) { return __sync_add_and_fetch(addend, 1); }
26 inline int atomicDecrement(int volatile* addend) { return __sync_sub_and_fetch(addend, 1); }
28 +#ifdef HAVE_64BIT_SYNC_BUILTINS
29 inline int64_t atomicIncrement(int64_t volatile* addend) { return __sync_add_and_fetch(addend, 1); }
30 inline int64_t atomicDecrement(int64_t volatile* addend) { return __sync_sub_and_fetch(addend, 1); }
33 +static pthread_mutex_t global_wtf_lock = PTHREAD_MUTEX_INITIALIZER;
35 +inline int64_t atomicIncrement(int64_t volatile* addend) { pthread_mutex_lock(&global_wtf_lock); *addend++; pthread_mutex_unlock(&global_wtf_lock); return *addend; }
36 +inline int64_t atomicDecrement(int64_t volatile* addend) { pthread_mutex_lock(&global_wtf_lock); *addend--; pthread_mutex_unlock(&global_wtf_lock); return *addend; }