Lines 141-143 of tcl.h:
# include <stdio.h>
I have to assume that getting
BUFSIZ defined is not the point,
as that never gets used within
tcl.h. Within all of Tcl's C code
BUFSIZ only shows up in
unix/tclLoadAix.c and that file
stdio.h for itself.
So, I take it that the #ifndef
BUFSIZ test is just in place to
prevent a double #include of
stdio.h, perhaps on some strange
system somewhere with a botched
stdio.h that's not safe to #include
more than once?
Anyhow, the main point seems to
be to get at the declarations of
stdio.h. But why? Nothing else
in tcl.h has need of those declarations.
Several things throughout Tcl need
stdio.h, but they get it already, either by
a #include of tclInt.h -- which #include's
stdio.h unconditionally -- or by just #include-ing
stdio.h for themselves.
Is it for the benefit of packages that
#include "tcl.h" ? That seems bizarre.
If a package needs stdio.h, it's logical
for it to #include it for itself. If not, then
Tcl is forcing it into the picture where it's
Seems these 3 lines could just be removed
with no loss, and arguable gain.