diff options
Diffstat (limited to 'newlib/libc/stdio/local.h')
-rw-r--r-- | newlib/libc/stdio/local.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h index f7093b697..76c260473 100644 --- a/newlib/libc/stdio/local.h +++ b/newlib/libc/stdio/local.h @@ -49,11 +49,11 @@ extern int _EXFUN(__srefill,(FILE *fp)); /* Called by the main entry point fns to ensure stdio has been initialized. */ -#define CHECK_INIT(ptr) \ +#define CHECK_INIT(fp) \ do \ { \ - if ((ptr) && !(ptr)->__sdidinit) \ - __sinit (ptr); \ + if (_REENT && !_REENT->__sdidinit) \ + __sinit (_REENT); \ } \ while (0) @@ -95,11 +95,7 @@ char *_EXFUN(_llicvt,(char *, long long, char)); #ifdef __SINGLE_THREAD__ #define __sfp_lock_acquire() #define __sfp_lock_release() -#define __sinit_lock_acquire() -#define __sinit_lock_release() #else _VOID _EXFUN(__sfp_lock_acquire,(_VOID)); _VOID _EXFUN(__sfp_lock_release,(_VOID)); -_VOID _EXFUN(__sinit_lock_acquire,(_VOID)); -_VOID _EXFUN(__sinit_lock_release,(_VOID)); #endif |