From c9ae85d19adf5720f4c9b8e8c4fdde434293df67 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 27 Sep 2006 02:00:13 +0000 Subject: r18936: hopefully fix the test for negative enum values. When a compiler truncates the enums, the test was passing. (This used to be commit c6216f7dbf68012fa8351dcae17fe4c7ab165b58) --- source4/build/m4/check_cc.m4 | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'source4/build/m4') diff --git a/source4/build/m4/check_cc.m4 b/source4/build/m4/check_cc.m4 index 2425d3da4b..f1b4f82cec 100644 --- a/source4/build/m4/check_cc.m4 +++ b/source4/build/m4/check_cc.m4 @@ -37,17 +37,11 @@ AC_CACHE_CHECK([that the C compiler understands negative enum values],SMB_BUILD_ enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF }; int main(void) { enum negative_values v1 = NEGATIVE_VALUE; - unsigned v2 = NEGATIVE_VALUE; - - if (v1 != 0xFFFFFFFF) { - printf("%u != 0xFFFFFFFF\n", v1); - return 1; - } - if (v2 != 0xFFFFFFFF) { - printf("%u != 0xFFFFFFFF\n", v2); + unsigned v2 = 0xFFFFFFFF; + if (v1 != v2) { + printf("v1=0x%08x v2=0x%08x\n", v1, v2); return 1; } - return 0; } ], -- cgit