Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2004-09-17 01:30:51 +0400
committerJeff Johnston <jjohnstn@redhat.com>2004-09-17 01:30:51 +0400
commited6859b8f02e456699f85918e4b81457537900fa (patch)
tree301f85ef34f78d17a7497ae6d1807a6e25ccbca5 /newlib/libc/stdio/local.h
parent7a0f696676736d2d8b1d214f9f0cfa5ce8ce76c1 (diff)
2004-09-16 Antony King <antony.king@st.com>
* libc/include/sys/lock.h: Replaced empty {} with (0) to conform with locking API. * libc/include/sys/stdio.h: (_flockfile)[!_SINGLE_THREAD]: Add check for__SSTR in _flags and if set, skip lock request. (_funlockfile)[!SINGLE_THREAD]: Ditto. * libc/stdio/local.h (CHECK_INIT): Added check that _REENT is not NULL. * libc/stdio/siprintf.c (siprintf, _siprintf_r): Added missing initialisation of _file to -1 in local FILE. * libc/stdio/snprintf.c (snprintf, _snprintf_r): Ditto. * libc/stdio/sscanf.c (sscanf, _sscanf_r): Ditto. * libc/stdio/vsnprintf.c (vsnprintf, _vsnprintf_r): Ditto. * libc/stdio/vsscanf.c (_vsscanf_r): Ditto. * libc/stdio/sscanf.c (sscanf, _sscanf_r): Added __SSTR flag to _flags in local FILE to prevent locking. * libc/stdio/vsscanf.c (_vsscanf_r): Ditto.
Diffstat (limited to 'newlib/libc/stdio/local.h')
-rw-r--r--newlib/libc/stdio/local.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h
index e3d5da573..e62f3418d 100644
--- a/newlib/libc/stdio/local.h
+++ b/newlib/libc/stdio/local.h
@@ -48,11 +48,11 @@ extern int _EXFUN(__srefill,(FILE *fp));
/* Called by the main entry point fns to ensure stdio has been initialized. */
#define CHECK_INIT(fp) \
- do \
- { \
- if (!_REENT->__sdidinit) \
- __sinit (_REENT); \
- } \
+ do \
+ { \
+ if (_REENT && !_REENT->__sdidinit) \
+ __sinit (_REENT); \
+ } \
while (0)
/* Return true iff the given FILE cannot be written now. */