00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 #include <sys/reent.h>
00023 #define NEWNEWLIB 
00024 
00025 
00032 void _LIBC_init_reent (struct _reent *ptr)
00033 {
00034 #ifdef NEWNEWLIB
00035         struct _reent re = _REENT_INIT (re);
00036 
00037         bcopy (&re, ptr, sizeof (struct _reent));
00038         ptr->_stdin = &(ptr->__sf[0]);
00039         ptr->_stdout = &(ptr->__sf[1]);
00040         ptr->_stderr = &(ptr->__sf[2]);
00041 
00042 #else
00043         ptr->_errno = 0;
00044         ptr->_stdin = &(ptr->__sf[0]);
00045         ptr->_stdout = &(ptr->__sf[1]);
00046         ptr->_stderr = &(ptr->__sf[2]);
00047         ptr->_inc = 0;
00048         ptr->_emergency[0] = 0; 
00049         ptr->_current_category = 0;
00050         ptr->_current_locale = "C";
00051 #endif
00052 }