Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6e6941cb183ada0ef672302831ed5e13609365e1
Ticket: 926486ffffffffffffffffffffffffffffffffff
remove stdio.h from tcl.h ?
User & Date: dgp on 2004-03-31 07:09:12
Changes

  1. assignee changed to: "jenglish"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    Lines 141-143 of tcl.h:
    
    #ifndef BUFSIZ
    #   include <stdio.h>
    #endif
    
    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
    unconditionally #include-s
    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
    not needed.
    
    Seems these 3 lines could just be removed
    with no loss, and arguable gain.
    
  4. foundin changed to: "obsolete: 8.5a2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "dgp"
  9. subsystem changed to: "None"
  10. title changed to: "remove stdio.h from tcl.h ?"
  11. type changed to: "Bug"