[RFC / patch] Autoconf test to avoid inclusion of <cstdio>

Paolo Carlini paolo.carlini@oracle.com
Wed Aug 6 17:11:00 GMT 2008


Hi,

when some time ago I worked on cleaning up the libstdc++-v3 headers I noticed an annoying thing (which I didn't investigate further): in some places we are including <cstdio> (one of the biggest C headers) only to bring in a few simple constants, EOF; SEEK_CUR, etc. Today I tried to figure out a possible solution, which involves using the return value of a test program to set a configuration macro (_GLIBCXX_STDIO_EOF, _GLIBCXX_STDIO_SEEK_CUR, ...).

The approach appears to work decently well, but I'm still wondering whether there are better ways to achieve the same result without running tests like this (note, nothing is broken by that, because we are running the tests only for native, we have already a couple of TRY_RUN in that case). What do the autoconf experts think?

Draft patch attached...

Thanks in advance,
Paolo.

/////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_draft_no_stdio.txt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080806/78216559/attachment.txt>


More information about the Libstdc++ mailing list