summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/sys
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2010-06-09 15:15:35 +0000
committerKazu Hirata <kazu@codesourcery.com>2010-06-09 15:15:35 +0000
commit492efa069bc0c2a5a1e79e45b738fc80017cb726 (patch)
tree88ed91671f1bca7a4cbd72ff48b27e01c9fe7e6a /newlib/libc/include/sys
parent03c991fed424115703ea91cdd38d37108aa3afed (diff)
downloadcygnal-492efa069bc0c2a5a1e79e45b738fc80017cb726.tar.gz
cygnal-492efa069bc0c2a5a1e79e45b738fc80017cb726.tar.bz2
cygnal-492efa069bc0c2a5a1e79e45b738fc80017cb726.zip
* libc/include/sys/reent.h (_reent): Adjust _REENT_SMALL to be
binary compatible with normal layout. (_REENT_INIT): Adjust to match struct layout.
Diffstat (limited to 'newlib/libc/include/sys')
-rw-r--r--newlib/libc/include/sys/reent.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index 12ac6b216..8518964f9 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -357,14 +357,15 @@ struct _misc_reent
* ports with 16-bit int's but 32-bit pointers, align nicely. */
struct _reent
{
+ /* As an exception to the above put _errno first for binary
+ compatibility with non _REENT_SMALL targets. */
+ int _errno; /* local copy of errno */
/* FILE is a big struct and may change over time. To try to achieve binary
compatibility with future versions, put stdin,stdout,stderr here.
These are pointers into member __sf defined below. */
__FILE *_stdin, *_stdout, *_stderr; /* XXX */
- int _errno; /* local copy of errno */
-
int _inc; /* used by tmpnam */
char *_emergency;
@@ -405,12 +406,12 @@ extern const struct __sFILE_fake __sf_fake_stdin;
extern const struct __sFILE_fake __sf_fake_stdout;
extern const struct __sFILE_fake __sf_fake_stderr;
-#define _REENT_INIT(var) \
- { (__FILE *)&__sf_fake_stdin, \
+# define _REENT_INIT(var) \
+ { 0, \
+ (__FILE *)&__sf_fake_stdin, \
(__FILE *)&__sf_fake_stdout, \
(__FILE *)&__sf_fake_stderr, \
0, \
- 0, \
_NULL, \
0, \
0, \