Why is include_next instead of include used in libstdc++ headers

Jakub Jelinek jakub@redhat.com
Sun Sep 2 05:28:00 GMT 2001


Hi!

Can anyone explain what's the reason behind using #include_next instead of
#include in most of the bits/std_c* headers?
With a few exceptions, like the wrap_* headers or sys/cdefs.h, the header
containing #include_next has a different name than what it is including and
neither is such header included from within header with such name.
This seems to break -frepo, since when recompiling, collect2 for some reason
sets some env variable which causes gcc include/ dir to come first (and
because cpplib removes duplicate include dirs, there is no gcc include/ dir
after /usr/include/g++-v3, so #include_next in bits/std_cstddef.h cannot
find stddef.h (since it is earlier in the include dirs, not later).

	Jakub



More information about the Libstdc++ mailing list