From 0382d26727416adf62287dfc0ce66aa9a38db95b Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Fri, 7 Mar 2008 16:45:04 +0000 Subject: 2008-03-07 Jeff Johnston * 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. --- newlib/libc/include/sys/reent.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'newlib/libc/include') 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 -- cgit v1.2.3