summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2008-03-07 16:45:04 +0000
committerJeff Johnston <jjohnstn@redhat.com>2008-03-07 16:45:04 +0000
commit0382d26727416adf62287dfc0ce66aa9a38db95b (patch)
tree70e228e28769d1d2eea4aaef0d0094749c78c3bd /newlib/libc/include
parent360b05b451fbbc2a2768fa84d86a78ec9002979a (diff)
downloadcygnal-0382d26727416adf62287dfc0ce66aa9a38db95b.tar.gz
cygnal-0382d26727416adf62287dfc0ce66aa9a38db95b.tar.bz2
cygnal-0382d26727416adf62287dfc0ce66aa9a38db95b.zip
2008-03-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/reent.h(_REENT_SMALL_CHECK_INIT): Specify this macro completely instead of referring to CHECK_STD_INIT which is only found in libc/stdio/local.h. * libc/stdio/dprintf.c: Add include of local.h. * libc/stdio/vdprintf.c: Ditto. * libc/stdio/vdiprintf.c: Ditto.
Diffstat (limited to 'newlib/libc/include')
-rw-r--r--newlib/libc/include/sys/reent.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index 39785d77d..37fad56c1 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -149,8 +149,19 @@ struct __sFILE_fake {
struct _reent *_data;
};
-/* CHECK_STD_INIT() comes from stdio/local.h; be sure to include that. */
-# define _REENT_SMALL_CHECK_INIT(ptr) CHECK_STD_INIT(ptr)
+
+/* Following is needed both in libc/stdio and libc/stdlib so we put it
+ * here instead of libc/stdio/local.h where it was previously. */
+
+extern _VOID _EXFUN(__sinit,(struct _reent *));
+
+# define _REENT_SMALL_CHECK_INIT(ptr) \
+ do \
+ { \
+ if ((ptr) && !(ptr)->__sdidinit) \
+ __sinit (ptr); \
+ } \
+ while (0)
#else
# define _REENT_SMALL_CHECK_INIT(ptr) /* nothing */
#endif