Skip to content
Tcl Source Code History Of Ticket 926486ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 926486ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 926486ffffffffffffffffffffffffffffffffff

  1. Ticket change [6e6941cb18] (rid 100142) by dgp on 2004-03-31 07:09:12:

    1. assignee initialized to: "jenglish"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized 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 initialized to: "obsolete: 8.5a2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "None"
    10. title initialized to: "remove stdio.h from tcl.h ?"
    11. type initialized to: "Bug"
  2. Ticket change [abfc0b2bf8] (rid 101214) by dkf on 2004-03-31 15:53:33:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      I think we can probably remove the BUFSIZ test from there,
      but I worry that much existing extension code assumes that
      stdio.h was implied by tcl.h, so perhaps the #include can't
      go until 9.0?
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  3. Ticket change [533243bc32] (rid 126441) by jenglish on 2004-03-31 21:51:10:

    1. icomment:
      Logged In: YES 
      user_id=68433
      
      Agree 100% with dgp's assessment: this can go.  
      
      It looks like it hasn't been needed since Tcl 7.6 when the
      channel system was added.  (Prior to that there were public
      routines that took FILE *s.)
      
      As for extensions that need stdio.h but don't bother
      including it because they've already included tcl.h: they
      can fix themselves.  
      
      Tcl has never guaranteed absolute source-level compatibility
      for extensions at minor releases.   This is an easy fix for
      extension authors, and adding #include <stdio.h> won't
      introduce a retro-incompatibility with pre-8.5 headers.  It
      can go.
      
      
    2. login: "jenglish"
    3. mimetype: "text/plain"
    4. username: "jenglish"
  4. Ticket change [8ce69e1221] (rid 127814) by tauvan on 2004-04-05 11:26:59:

    1. icomment:
      Logged In: YES 
      user_id=1011552
      
      Suggestion:
        It looks like that stdio was not a compatiblity issue and
      was needed by most files, so delete the three lines, add
      #include <stdio.h> at the very top of "tcl.h".
      Almost every file includes "tclInit.h" which includes "tcl.h"
      and 13 files reference it plus it's the first thing in "tclInit.h".
      
      
    2. login: "tauvan"
    3. mimetype: "text/plain"
    4. username: "tauvan"
  5. Ticket change [9e4ac36a11] (rid 96450) by jenglish on 2004-04-25 21:37:54:

    1. icomment:
      Logged In: YES 
      user_id=68433
      
      Existing extension code that assumes <tcl.h> includes
      <stdio.h> can easily be updated to include <stdio.h>
      themselves.  We don't guarantee 100% source-level
      compatibility across minor revision numbers.
      
      
    2. login: "jenglish"
    3. mimetype: "text/plain"
    4. username: "jenglish"
  6. Ticket change [3777447893] (rid 107284) by dgp on 2004-04-26 03:11:59:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2004-04-25T20:11:59"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      fixed in HEAD.
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. username: "dgp"
  7. Ticket change [58c3b8f294] (rid 117858) by dgp on 2004-04-30 20:32:20:

    1. assignee changed to: "jenglish"
    2. icomment:
      Logged In: YES 
      user_id=80530
      
      
      OK, I found a reason not to do this.
      Not a good reason, mind you, but a reason.
      
      A program that wants to call Tcl_Seek()
      or Tcl_FSSeek() will #include <tcl.h> to 
      get their declarations.
      
      In order to call them, though, it's best to pass
      them the values SEEK_SET, SEEK_CUR,
      or SEEK_END.  Those values are
      #define'd in <stdio.h>.
      
      Probably would be better if Tcl defined its
      own values for passing to its own routines,
      but as things are, it appears tcl.h ought to
      include stdio.h after all. 
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. resolution changed to: "Remind"
    6. status changed to: "Open"
    7. username: "dgp"
  8. Ticket change [e278d521db] (rid 87635) by tauvan on 2004-05-01 01:15:26:

    1. icomment:
      Logged In: YES 
      user_id=1011552
      
        Here's a strange question. In tclUnixPort.h it includes tclInt.h which 
      includes stdio.h. In tclUnixPort.h the following:
      #ifndef SEEK_SET
      #   define SEEK_SET 0
      #endif
      #ifndef SEEK_CUR
      #   define SEEK_CUR 1
      #endif
      #ifndef SEEK_END
      #   define SEEK_END 2
      #endif
      Was or is there a time when SEEK_SET, SEEK_CUR, SEEK_END not 
      defined or differently defined?
      
      
    2. login: "tauvan"
    3. mimetype: "text/plain"
    4. username: "tauvan"
  9. Ticket change [ebcf7351ee] (rid 103593) by tauvan on 2004-05-01 01:25:32:

    1. icomment:
      Logged In: YES 
      user_id=1011552
      
       Yes, there is mine is in unistd.h!
      
      
    2. login: "tauvan"
    3. mimetype: "text/plain"
    4. username: "tauvan"
  10. Ticket change [b06fb5f68b] (rid 97979) by tauvan on 2004-05-01 02:55:46:

    1. icomment:
      Logged In: YES 
      user_id=1011552
      
        Sorry, more specifically, it is #define'd in <sys/unistd.h>, but
      the same #ifndef... as in tclUnixPort.h, is in <stdio.h>.
      
      
    2. login: "tauvan"
    3. mimetype: "text/plain"
    4. username: "tauvan"
  11. Ticket change [317795acdf] (rid 93431) by dgp on 2004-06-05 03:16:44:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2004-06-04T20:16:44"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      
      stdio.h restored to tcl.h for the
      sake of the SEEK_* #define's
      and for the sake of many
      extensions that have come to
      depend on it being there.
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Rejected"
    8. status changed to: "Closed"
    9. username: "dgp"