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:
Diffstat (limited to 'newlib/libc/stdio/local.h')
-rw-r--r--newlib/libc/stdio/local.h45
1 files changed, 24 insertions, 21 deletions
diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h
index ec5efab49..54854b49d 100644
--- a/newlib/libc/stdio/local.h
+++ b/newlib/libc/stdio/local.h
@@ -175,34 +175,37 @@ extern _READ_WRITE_RETURN_TYPE _EXFUN(__swrite64,(struct _reent *, void *,
#ifdef _REENT_SMALL
#define CHECK_INIT(ptr, fp) \
- do \
- { \
- if ((ptr) && !(ptr)->__sdidinit) \
- __sinit (ptr); \
- if ((fp) == (FILE *)&__sf_fake_stdin) \
- (fp) = _stdin_r(ptr); \
- else if ((fp) == (FILE *)&__sf_fake_stdout) \
- (fp) = _stdout_r(ptr); \
- else if ((fp) == (FILE *)&__sf_fake_stderr) \
- (fp) = _stderr_r(ptr); \
- } \
+ do \
+ { \
+ struct _reent *_check_init_ptr = (ptr); \
+ if ((_check_init_ptr) && !(_check_init_ptr)->__sdidinit) \
+ __sinit (_check_init_ptr); \
+ if ((fp) == (FILE *)&__sf_fake_stdin) \
+ (fp) = _stdin_r(_check_init_ptr); \
+ else if ((fp) == (FILE *)&__sf_fake_stdout) \
+ (fp) = _stdout_r(_check_init_ptr); \
+ else if ((fp) == (FILE *)&__sf_fake_stderr) \
+ (fp) = _stderr_r(_check_init_ptr); \
+ } \
while (0)
#else /* !_REENT_SMALL */
#define CHECK_INIT(ptr, fp) \
- do \
- { \
- if ((ptr) && !(ptr)->__sdidinit) \
- __sinit (ptr); \
- } \
+ do \
+ { \
+ struct _reent *_check_init_ptr = (ptr); \
+ if ((_check_init_ptr) && !(_check_init_ptr)->__sdidinit) \
+ __sinit (_check_init_ptr); \
+ } \
while (0)
#endif /* !_REENT_SMALL */
#define CHECK_STD_INIT(ptr) \
- do \
- { \
- if ((ptr) && !(ptr)->__sdidinit) \
- __sinit (ptr); \
- } \
+ do \
+ { \
+ struct _reent *_check_init_ptr = (ptr); \
+ if ((_check_init_ptr) && !(_check_init_ptr)->__sdidinit) \
+ __sinit (_check_init_ptr); \
+ } \
while (0)
/* Return true and set errno and stream error flag iff the given FILE