Browse Source

asort: fix test when typesafe_cb not supported.

Solaris CC seems to support typeof, but not __builtin_types_compatible_p.
Rusty Russell 14 years ago
parent
commit
5887216aa5
1 changed files with 3 additions and 2 deletions
  1. 3 2
      ccan/asort/test/compile_fail-context-type.c

+ 3 - 2
ccan/asort/test/compile_fail-context-type.c

@@ -9,9 +9,10 @@ static int cmp(char *const *a, char *const *b, int *flag)
 int main(int argc, char **argv)
 int main(int argc, char **argv)
 {
 {
 #ifdef FAIL
 #ifdef FAIL
+#if HAVE_TYPEOF && HAVE_BUILTIN_CHOOSE_EXPR && HAVE_BUILTIN_TYPES_COMPATIBLE_P
 	char flag;
 	char flag;
-#if !HAVE_TYPEOF
-#error "Unfortunately we don't fail if no typeof."
+#else
+#error "Unfortunately we don't fail if no typecheck_cb support."
 #endif
 #endif
 #else
 #else
 	int flag;
 	int flag;