[PATCH] wrap #ifdef for C99 around iswspace and mbrtowc in vfscanf.c

litb_devel@web.de litb_devel@web.de
Tue Oct 14 17:09:00 GMT 2008


Hello List,

while working on my port of newlib, i got undefined references to those 
functions. That happened because i compile newlib using EL/IX level 1, which 
causes them not to be defined. 
I wrapped the portion that prints wide characters/strings with  
_WANT_IO_C99_FORMATS, just like it's already done while parsing the format 
string. Please be kind, it's my first patch/diff for newlib. :)
have fun, litb.

Index: libc/stdio/vfscanf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/vfscanf.c,v
retrieving revision 1.40
diff -r1.40 vfscanf.c
824a825
> #ifdef _WANT_IO_C99_FORMATS
863c864,866
<           else if (flags & SUPPRESS)
---
>           else
> #endif /* _WANT_IO_C99_FORMATS */
>           if (flags & SUPPRESS)
952a956
> #ifdef _WANT_IO_C99_FORMATS
1001c1005,1007
<           else if (flags & SUPPRESS)
---
>           else
> #endif /* _WANT_IO_C99_FORMATS */
>           if (flags & SUPPRESS)





More information about the Newlib mailing list