[uClibc-cvs] uClibc/libc/stdlib abort.c, 1.16, 1.17 ptsname.c, 1.8, 1.9 stdlib.c, 1.12, 1.13

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


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

Modified Files:
	abort.c ptsname.c stdlib.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: abort.c
===================================================================
RCS file: /var/cvs/uClibc/libc/stdlib/abort.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- abort.c	31 Jan 2004 03:02:39 -0000	1.16
+++ abort.c	11 Feb 2004 23:48:45 -0000	1.17
@@ -56,7 +56,6 @@
 #define ABORT_INSTRUCTION
 #endif
 
-extern void weak_function _stdio_term(void);
 extern void _exit __P((int __status)) __attribute__ ((__noreturn__));
 static int been_there_done_that = 0;
 
@@ -85,13 +84,6 @@
 	sigprocmask(SIG_UNBLOCK, &sigset, (sigset_t *) NULL);
     }
 
-    /* If we are using stdio, try to shut it down.  At the very least,
-	 * this will attempt to commit all buffered writes.  It may also
-	 * unbuffer all writable files, or close them outright.
-	 * Check the stdio routines for details. */
-    if (_stdio_term)
-		_stdio_term();
-
     while (1) {
 	/* Try to suicide with a SIGABRT.  */
 	if (been_there_done_that == 0) {

Index: stdlib.c
===================================================================
RCS file: /var/cvs/uClibc/libc/stdlib/stdlib.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- stdlib.c	24 Aug 2003 03:49:10 -0000	1.12
+++ stdlib.c	11 Feb 2004 23:48:45 -0000	1.13
@@ -863,7 +863,7 @@
 	size_t r;
 
 	if (!s) {
-		state.mask = 0;
+		state.__mask = 0;
 #ifdef __CTYPE_HAS_UTF_8_LOCALES
 		return ENCODING == __ctype_encoding_utf8;
 #else
@@ -873,7 +873,7 @@
 
 	if ((r = mbrlen(s, n, &state)) == (size_t) -2) {
 		/* TODO: Should we set an error state? */
-		state.wc = 0xffffU;		/* Make sure we're in an error state. */
+		state.__wc = 0xffffU;	/* Make sure we're in an error state. */
 		return (size_t) -1;		/* TODO: Change error code above? */
 	}
 	return r;
@@ -889,7 +889,7 @@
 	size_t r;
 
 	if (!s) {
-		state.mask = 0;
+		state.__mask = 0;
 #ifdef __CTYPE_HAS_UTF_8_LOCALES
 		return ENCODING == __ctype_encoding_utf8;
 #else
@@ -899,7 +899,7 @@
 
 	if ((r = mbrtowc(pwc, s, n, &state)) == (size_t) -2) {
 		/* TODO: Should we set an error state? */
-		state.wc = 0xffffU;		/* Make sure we're in an error state. */
+		state.__wc = 0xffffU;	/* Make sure we're in an error state. */
 		return (size_t) -1;		/* TODO: Change error code above? */
 	}
 	return r;
@@ -932,7 +932,7 @@
 	mbstate_t state;
 	const char *e = s;			/* Needed because of restrict. */
 
-	state.mask = 0;				/* Always start in initial shift state. */
+	state.__mask = 0;			/* Always start in initial shift state. */
 	return mbsrtowcs(pwcs, &e, n, &state);
 }
 

Index: ptsname.c
===================================================================
RCS file: /var/cvs/uClibc/libc/stdlib/ptsname.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ptsname.c	31 Oct 2002 18:19:45 -0000	1.8
+++ ptsname.c	11 Feb 2004 23:48:45 -0000	1.9
@@ -17,7 +17,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define _STDIO_UTILITY			/* For _int10tostr. */
+#define _ISOC99_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <paths.h>
@@ -28,6 +28,7 @@
 #include <sys/sysmacros.h>
 #include <termios.h>
 #include <unistd.h>
+#include <bits/uClibc_uintmaxtostr.h>
 
 
 #if !defined __UNIX98PTY_ONLY__




More information about the uClibc-cvs mailing list