[newlib-cygwin] Fix _REENT_INIT initialization of _locale

Corinna Vinschen corinna@sourceware.org
Mon Aug 15 09:27:00 GMT 2016


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=659f4ca91625f5b2331fc8797a8ec62ea728589d

commit 659f4ca91625f5b2331fc8797a8ec62ea728589d
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Tue Jul 26 15:42:04 2016 +0200

    Fix _REENT_INIT initialization of _locale
    
    Initializing a pointer to struct __locale_t to point to a string "C"
    is not such a bright idea in the long run...
    
    Signed-off by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 newlib/libc/include/sys/reent.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index 07abcb4..e1ed8b4 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -386,7 +386,6 @@ struct _reent
 
   int __sdidinit;		/* 1 means stdio has been init'd */
 
-  /* TODO */
   int _unspecified_locale_info;	/* unused, reserved for locale stuff */
   struct __locale_t *_locale;/* per-thread locale */
 
@@ -432,7 +431,7 @@ extern const struct __sFILE_fake __sf_fake_stderr;
     _NULL, \
     0, \
     0, \
-    "C", \
+    _NULL, \
     _NULL, \
     _NULL, \
     0, \
@@ -656,7 +655,7 @@ struct _reent
     0, \
     "", \
     0, \
-    "C", \
+    _NULL, \
     0, \
     _NULL, \
     _NULL, \



More information about the Newlib-cvs mailing list