Discussion:
[newlib-cygwin] Redefine locale info in struct _reent for per-thread locales
Eric Blake
2016-07-06 15:22:54 UTC
Permalink
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a68ca43b9014ae45feb3162a5f066524e2b38e1a
commit a68ca43b9014ae45feb3162a5f066524e2b38e1a
Date: Wed Jul 6 15:41:35 2016 +0200
Redefine locale info in struct _reent for per-thread locales
+++ b/newlib/libc/include/sys/reent.h
@@ -37,6 +37,11 @@ typedef __uint32_t __ULong;
struct _reent;
+/* TODO: This structure type isn't defined yet. It's supposed to be used
+ by locale-specific functions in case a pre-thread locale per SUSv4 has
s/pre/per/
+ been specified. */
+struct _thr_locale_t;
+
/*
* If _REENT_SMALL is defined, we make struct _reent as small as possible,
* by having nearly everything possible allocated at first use.
@@ -384,8 +389,9 @@ struct _reent
int __sdidinit; /* 1 means stdio has been init'd */
- int _current_category; /* unused */
- _CONST char *_current_locale; /* unused */
+ /* TODO */
+ int _unspecified_locale_info; /* unused, reserved for locale stuff */
+ struct _thr_locale_t *_locale;/* per-thread locale */
Looks like a good useful start.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Corinna Vinschen
2016-07-06 16:23:56 UTC
Permalink
Post by Eric Blake
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a68ca43b9014ae45feb3162a5f066524e2b38e1a
commit a68ca43b9014ae45feb3162a5f066524e2b38e1a
Date: Wed Jul 6 15:41:35 2016 +0200
Redefine locale info in struct _reent for per-thread locales
+++ b/newlib/libc/include/sys/reent.h
@@ -37,6 +37,11 @@ typedef __uint32_t __ULong;
struct _reent;
+/* TODO: This structure type isn't defined yet. It's supposed to be used
+ by locale-specific functions in case a pre-thread locale per SUSv4 has
s/pre/per/
Fixed.


Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
Loading...