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]

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


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.

/////////////////

Attachment: patch_draft_no_stdio.txt
Description: Text document


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