This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use __snprintf when available


> 2- Autoconf issues, which seem to me really of two different kinds:
> 
>     * Are there any actual systems which make available a C99-conforming
>     snprintf but which do not pass the tests for _GLIBCPP_USE_C99 enabled?
>     I think Loren in principle is interested in supporting them.

I think HP-UX 11.0 (IA64 and PA) fits this situation.  There is an
snprintf on the system but during config (of the library) I see:

checking for ISO C99 support in <math.h>... no
checking for ISO C99 support in <stdio.h>... yes
checking for ISO C99 support in <stdlib.h>... no
checking for additional ISO C99 support in <wchar.h>... no
checking for enabled ISO C99 support... no
checking for ISO C99 wchar_t support... no

I also ran a quick experiment and verified that if the buffer is too
small that snprintf returns -1.  Am I correct in thinking that this is
not c99 conformant?

Steve Ellcey
sje@cup.hp.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]