c4506558a5
big thank to landry@ for testing this in a bulk
27 lines
910 B
Plaintext
27 lines
910 B
Plaintext
$OpenBSD: patch-source_common_putilimp_h,v 1.5 2012/12/08 13:18:46 ajacoutot Exp $
|
|
|
|
hppa and sparc don't have atomic builtins:
|
|
__sync_val_compare_and_swap, __sync_add_and_fetch, __sync_sub_and_fetch
|
|
don't assume having GNUC >= 401 implies they're here..
|
|
|
|
--- source/common/putilimp.h.orig Mon Nov 5 18:14:50 2012
|
|
+++ source/common/putilimp.h Thu Dec 6 15:39:07 2012
|
|
@@ -123,6 +123,8 @@ typedef size_t uintptr_t;
|
|
/* not defined */
|
|
#elif U_PLATFORM == U_PF_OS400
|
|
/* not defined */
|
|
+#elif U_PLATFORM == U_BSD
|
|
+ /* not defined */
|
|
#else
|
|
# define U_TIMEZONE timezone
|
|
#endif
|
|
@@ -180,7 +182,7 @@ typedef size_t uintptr_t;
|
|
*/
|
|
#ifdef U_HAVE_GCC_ATOMICS
|
|
/* Use the predefined value. */
|
|
-#elif U_GCC_MAJOR_MINOR >= 404
|
|
+#elif U_GCC_MAJOR_MINOR >= 404 && !defined(__hppa__) && (defined(__sparc__) && ! defined(__sparcv9__))
|
|
# define U_HAVE_GCC_ATOMICS 1
|
|
#else
|
|
# define U_HAVE_GCC_ATOMICS 0
|