4ad1879c15
spotted by sebastia@
27 lines
999 B
Plaintext
27 lines
999 B
Plaintext
$OpenBSD: patch-source_common_putilimp_h,v 1.4 2012/07/09 22:50:18 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 Fri Jun 1 08:52:52 2012
|
|
+++ source/common/putilimp.h Wed Jul 4 01:00:05 2012
|
|
@@ -119,6 +119,8 @@ typedef size_t uintptr_t;
|
|
# define U_TIMEZONE _timezone
|
|
#elif U_PLATFORM == U_PF_OS400
|
|
/* not defined */
|
|
+#elif U_PLATFORM == U_BSD
|
|
+ /* not defined */
|
|
#else
|
|
# define U_TIMEZONE timezone
|
|
#endif
|
|
@@ -176,7 +178,7 @@ typedef size_t uintptr_t;
|
|
*/
|
|
#ifdef U_HAVE_GCC_ATOMICS
|
|
/* Use the predefined value. */
|
|
-#elif defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 401)
|
|
+#elif defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 401) && !defined(__hppa__) && (defined(__sparc__) && ! defined(__sparcv9__))
|
|
# define U_HAVE_GCC_ATOMICS 1
|
|
#else
|
|
# define U_HAVE_GCC_ATOMICS 0
|