- Added support for most of the ANNOTATE_...() macro's supported by             
  ThreadSanitizer.                                                              
- Modified DRD's error reporting code such that it does no longer let           
  the Valgrind core print the Valgrind thread ID but that it now prints         
  the DRD thread ID and name. Updated expected output files where               
  necessary.                                                                    
- Modified drd/test/Makefile.am such that the tests using gcc's built-in        
  functions for atomic memory access such that these are only compiled when     
  the gcc version in use supports these built-in functions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10186 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/drd/tests/atomic_var.c b/drd/tests/atomic_var.c
index ebad1ee..40f1566 100644
--- a/drd/tests/atomic_var.c
+++ b/drd/tests/atomic_var.c
@@ -10,7 +10,6 @@
  * in different cache lines in a different order.
  */
 
-
 #define _GNU_SOURCE
 
 #include <pthread.h>
@@ -18,10 +17,11 @@
 #include <stdlib.h>  /* atoi() */
 #include "../../config.h"
 
-
 /* Atomic builtins are only supported by gcc 4.1.0 and later. */
-
-#if defined(HAVE_BUILTIN_ATOMIC)
+#ifndef HAVE_BUILTIN_ATOMIC
+#error Sorry, but this test program can only be compiled by a compiler that\
+has built-in functions for atomic memory access.
+#endif
 
 static __inline__
 int sync_add_and_fetch(int* p, int i)
@@ -64,15 +64,3 @@
 
   return 0;
 }
-
-#else
-
-int main(int argc, char** argv)
-{
-  fprintf(stderr,
-          "Sorry, but your compiler does not have built-in support for atomic"
-          " operations.\n");
-  return 0;
-}
-
-#endif