Module Name:    src
Committed By:   joerg
Date:           Mon Feb 17 21:38:04 UTC 2014

Modified Files:
        src/tests/lib/libc/sync: all_sync_ops_linkable.c

Log Message:
Since clang doesn't recognize the nand variants of the sync builtins and
gcc doesn't support __has_builtin, use a plain #ifndef __clang__ check
as workaround.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sync/all_sync_ops_linkable.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/sync/all_sync_ops_linkable.c
diff -u src/tests/lib/libc/sync/all_sync_ops_linkable.c:1.1 src/tests/lib/libc/sync/all_sync_ops_linkable.c:1.2
--- src/tests/lib/libc/sync/all_sync_ops_linkable.c:1.1	Mon Feb 17 10:10:41 2014
+++ src/tests/lib/libc/sync/all_sync_ops_linkable.c	Mon Feb 17 21:38:04 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: all_sync_ops_linkable.c,v 1.1 2014/02/17 10:10:41 martin Exp $ */
+/* $NetBSD: all_sync_ops_linkable.c,v 1.2 2014/02/17 21:38:04 joerg Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -82,6 +82,7 @@ main(int argc, char **argv)
 #ifdef __HAVE_ATOMIC64_OPS
 	__sync_fetch_and_and_8(&u64, 0x80);
 #endif
+#ifndef __clang__
 	__sync_fetch_and_nand(&u8, 0x80);
 	__sync_fetch_and_nand_1(&u8, 0x80);
 	__sync_fetch_and_nand_2(&u16, 0x80);
@@ -89,6 +90,7 @@ main(int argc, char **argv)
 #ifdef __HAVE_ATOMIC64_OPS
 	__sync_fetch_and_nand_8(&u64, 0x80);
 #endif
+#endif
 	__sync_fetch_and_or(&u8, 0x80);
 	__sync_fetch_and_or_1(&u8, 0x80);
 	__sync_fetch_and_or_2(&u16, 0x80);
@@ -124,6 +126,7 @@ main(int argc, char **argv)
 #ifdef __HAVE_ATOMIC64_OPS
 	__sync_lock_test_and_set_8(&u64, 5);
 #endif
+#ifndef __clang__
 	__sync_nand_and_fetch(&u8, 5);
 	__sync_nand_and_fetch_1(&u8, 5);
 	__sync_nand_and_fetch_2(&u16, 5);
@@ -131,6 +134,7 @@ main(int argc, char **argv)
 #ifdef __HAVE_ATOMIC64_OPS
 	__sync_nand_and_fetch_8(&u64, 5);
 #endif
+#endif
 	__sync_or_and_fetch(&u8, 5);
 	__sync_or_and_fetch_1(&u8, 5);
 	__sync_or_and_fetch_2(&u16, 5);

Reply via email to