[uClibc-cvs] uClibc/libc/misc/assert __assert.c,1.8,1.9

Manuel Novoa III mjn3 at uclibc.org
Wed Feb 11 23:48:42 UTC 2004


Update of /var/cvs/uClibc/libc/misc/assert
In directory nail:/tmp/cvs-serv16121/libc/misc/assert

Modified Files:
	__assert.c 
Log Message:
New stdio core.  Should be more maintainable.  Fixes a couple of bugs.
  Codepaths streamlined.  Improved performance for nonthreaded apps
  when linked with a thread-enabled libc.
Minor iconv bug and some locale/thread related startup issues fixed.
  These showed up in getting a gcj-compiled java helloworld app running.
Removed some old extension functions... _stdio_fdout and _stdio_fsfopen.


Index: __assert.c
===================================================================
RCS file: /var/cvs/uClibc/libc/misc/assert/__assert.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- __assert.c	17 Jan 2004 14:39:40 -0000	1.8
+++ __assert.c	11 Feb 2004 23:48:40 -0000	1.9
@@ -27,10 +27,11 @@
  * and is useful in debugging the stdio code.
  */
 
-#define _STDIO_UTILITY	/* For _stdio_fdout and _int10tostr. */
+#define _ISOC99_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <bits/uClibc_uintmaxtostr.h>
 
 /* Get the prototype from assert.h as a double-check. */
 #undef NDEBUG
@@ -44,8 +45,6 @@
 extern const char *__progname;
 #endif
 
-#if 1
-
 static int in_assert;			/* bss inits to 0. */
 
 void __assert(const char *assertion, const char * filename,
@@ -69,31 +68,3 @@
 	}
 	abort();
 }
-
-#else
-
-void __assert(const char *assertion, const char * filename,
-			  int linenumber, register const char * function)
-{
-	char buf[__BUFLEN_INT10TOSTR];
-
-	_stdio_fdout(STDERR_FILENO,
-#ifdef ASSERT_SHOW_PROGNAME
-				 __progname,
-				 ": ",
-#endif
-				 filename,
-				 ":",
-				 _int10tostr(buf+sizeof(buf)-1, linenumber),
-				 ": ",
-				 /* Function name isn't available with some compilers. */
-				 ((function == NULL) ? "?function?" : function),
-				 ":  Assertion `",
-				 assertion,
-				 "' failed.\n",
-				 NULL
-				 );
-	abort();
-}
-
-#endif




More information about the uClibc-cvs mailing list