[Bug libstdc++/36231] ostream includes unistd.h outside namespace std, polluting

igodard at pacbell dot net gcc-bugzilla@gcc.gnu.org
Wed Apr 20 21:07:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36231

--- Comment #16 from Ivan Godard <igodard at pacbell dot net> 2011-04-20 21:06:39 UTC ---
Would it be possible to wrap each #include of a C file in a namespace,
adjusting the references from the C++ library accordingly? The namespace to be
used could be shared by all such #includes. Of course, there would have to be
some cleverness to finesse the guard macros on the .h files so the user could
have both the namespaced indirect inclusion and also an explicit direct
inclusion if desired. As far as I've checked, the inclusions appear to be for
typedefs and sizes and not for actual functions or data, for which the double
inclusion approach might cause trouble.



More information about the Gcc-bugs mailing list