diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-05-02 10:25:44 +0300 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-05-13 13:28:34 +0300 |
commit | d041db379241a4fd668401f374429099e5a16a48 (patch) | |
tree | b229a3b36c8c5f2fb551e340f07eac4ebd240288 /newlib | |
parent | 92896d4daadc3e89fc64adf468d90fee0b84f7b3 (diff) |
Declare global __sf[] only once
Reduced number of global __sf[] declarations from two to one,
simplifying initializations in sys/reent.h.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/libc/include/sys/reent.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h index 4bc78a447..e0b0ccffb 100644 --- a/newlib/libc/include/sys/reent.h +++ b/newlib/libc/include/sys/reent.h @@ -293,6 +293,10 @@ typedef struct __sFILE __FILE; #endif /* __LARGE64_FILES */ #endif /* !__CUSTOM_FILE_IO__ */ +#ifdef _REENT_GLOBAL_STDIO_STREAMS +extern __FILE __sf[3]; +#endif + struct _glue { struct _glue *_next; @@ -426,7 +430,6 @@ struct _reent }; #ifdef _REENT_GLOBAL_STDIO_STREAMS -extern __FILE __sf[3]; # define _REENT_INIT(var) \ { 0, \ @@ -698,7 +701,6 @@ struct _reent }; #ifdef _REENT_GLOBAL_STDIO_STREAMS -extern __FILE __sf[3]; #define _REENT_STDIO_STREAM(var, index) &__sf[index] #else #define _REENT_STDIO_STREAM(var, index) &(var)->__sf[index] |