svn commit: trunk/uClibc/test/assert

vapier at uclibc.org vapier at uclibc.org
Mon Jan 29 02:31:33 UTC 2007


Author: vapier
Date: 2007-01-28 18:31:32 -0800 (Sun, 28 Jan 2007)
New Revision: 17611

Log:
fix test to work even if CPPFLAGS contains -DNDEBUG

Modified:
   trunk/uClibc/test/assert/assert.c


Changeset:
Modified: trunk/uClibc/test/assert/assert.c
===================================================================
--- trunk/uClibc/test/assert/assert.c	2007-01-29 02:04:51 UTC (rev 17610)
+++ trunk/uClibc/test/assert/assert.c	2007-01-29 02:31:32 UTC (rev 17611)
@@ -6,6 +6,8 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
+#undef NDEBUG
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
@@ -14,7 +16,7 @@
 
 int got_abort;
 
-void aborthandler(int junk)
+static void aborthandler(int junk)
 {
 	got_abort = 1;
 }
@@ -29,9 +31,7 @@
 	assert(0 == 0);
 	TEST_NUMERIC(got_abort, 0);
 
-#ifndef NDEBUG
-# define NDEBUG
-#endif
+#define NDEBUG
 	got_abort = 0;
 	printf("Don't worry -- This next test is supposed to print an assert message:\n");
 	fprintf(stderr, "\t");




More information about the uClibc-cvs mailing list