improve mcheck availability check
diff --git a/c_gen/c_test_gen.py b/c_gen/c_test_gen.py
index fe7a41d..74aef8a 100644
--- a/c_gen/c_test_gen.py
+++ b/c_gen/c_test_gen.py
@@ -54,7 +54,7 @@
 Verify that the members all have the appropriate value
 
 Through out, checking the consistency of memory and memory operations
-is done with mcheck (not supported on Mac OS X).
+is done with mcheck (if available).
 
 """
 
@@ -401,10 +401,11 @@
 #include <locitest/unittest.h>
 #include <locitest/test_common.h>
 
-#if !defined(__APPLE__)
+/* mcheck is a glibc extension */
+#if defined(__linux__)
 #include <mcheck.h>
 #define MCHECK_INIT mcheck(NULL)
-#else /* mcheck not available under OS X */
+#else
 #define MCHECK_INIT do { } while (0)
 #endif
 
diff --git a/c_gen/templates/locitest/main.c b/c_gen/templates/locitest/main.c
index df80f9f..3b24035 100644
--- a/c_gen/templates/locitest/main.c
+++ b/c_gen/templates/locitest/main.c
@@ -9,10 +9,11 @@
 #include <locitest/unittest.h>
 #include <locitest/test_common.h>
 
-#if !defined(__APPLE__)
+/* mcheck is a glibc extension */
+#if defined(__linux__)
 #include <mcheck.h>
 #define MCHECK_INIT mcheck(NULL)
-#else /* mcheck not available under OS X */
+#else
 #define MCHECK_INIT do { } while (0)
 #endif
 
diff --git a/c_gen/templates/locitest/test_setup_from_add.c b/c_gen/templates/locitest/test_setup_from_add.c
index d8911f3..0b07076 100644
--- a/c_gen/templates/locitest/test_setup_from_add.c
+++ b/c_gen/templates/locitest/test_setup_from_add.c
@@ -33,10 +33,11 @@
 
 #include <locitest/test_common.h>
 
-#if !defined(__APPLE__)
+/* mcheck is a glibc extension */
+#if defined(__linux__)
 #include <mcheck.h>
 #define MCHECK_INIT mcheck(NULL)
-#else /* mcheck not available under OS X */
+#else
 #define MCHECK_INIT do { } while (0)
 #endif