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

Benjamin Kosnik bkoz@redhat.com
Sun Sep 2 10:14:00 GMT 2001


Jakub, I think this is because a third set of includes is also necessary, 
but not yet present in include/*. These are the c_compatibilty inclues, 
and are the C++ versions of things like stdio.h, ctype.h, etc. 

To do this correctly, these compatibily headers have to include the C++ 
munged "C" headers: cstdio, cctype, etc. (which means including things 
like c_std/std_cstdio.h).

thus you have:

cstdio
-> std_cstdio.h
-> include_next stdio.h (include_next not necessary here...)

stdio.h
-> std_cstdio.h
-> include_next stdio.h (but it is here, and they are the same file.)

does this make more sense, or is it still confusing? I'll try to post a 
patch that implements this, so that you can see what's up. 

best,
benjamin



More information about the Libstdc++ mailing list