Artifacts Associated With Ticket 926486ffffffffffffffffffffffffffffffffff
Ticket change [6e6941cb18] (rid 100142) by dgp on 2004-03-31 07:09:12:
- assignee initialized to: "jenglish"
- cmimetype initialized to: "text/plain"
- 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.
- foundin initialized to: "obsolete: 8.5a2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "None"
- title initialized to: "remove stdio.h from tcl.h ?"
- type initialized to: "Bug"
Ticket change [abfc0b2bf8] (rid 101214) by dkf on 2004-03-31 15:53:33:
- 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?
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [533243bc32] (rid 126441) by jenglish on 2004-03-31 21:51:10:
- 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.
- login: "jenglish"
- mimetype: "text/plain"
- username: "jenglish"
- icomment:
Ticket change [8ce69e1221] (rid 127814) by tauvan on 2004-04-05 11:26:59:
- 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".
- login: "tauvan"
- mimetype: "text/plain"
- username: "tauvan"
- icomment:
Ticket change [9e4ac36a11] (rid 96450) by jenglish on 2004-04-25 21:37:54:
- 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.
- login: "jenglish"
- mimetype: "text/plain"
- username: "jenglish"
- icomment:
Ticket change [3777447893] (rid 107284) by dgp on 2004-04-26 03:11:59:
- assignee changed to: "dgp"
- closedate changed to: "2004-04-25T20:11:59"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 fixed in HEAD.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"
Ticket change [58c3b8f294] (rid 117858) by dgp on 2004-04-30 20:32:20:
- assignee changed to: "jenglish"
- 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.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Remind"
- status changed to: "Open"
- username: "dgp"
Ticket change [e278d521db] (rid 87635) by tauvan on 2004-05-01 01:15:26:
- 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?
- login: "tauvan"
- mimetype: "text/plain"
- username: "tauvan"
- icomment:
Ticket change [ebcf7351ee] (rid 103593) by tauvan on 2004-05-01 01:25:32:
- icomment:
Logged In: YES user_id=1011552 Yes, there is mine is in unistd.h!
- login: "tauvan"
- mimetype: "text/plain"
- username: "tauvan"
- icomment:
Ticket change [b06fb5f68b] (rid 97979) by tauvan on 2004-05-01 02:55:46:
- 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>.
- login: "tauvan"
- mimetype: "text/plain"
- username: "tauvan"
- icomment:
Ticket change [317795acdf] (rid 93431) by dgp on 2004-06-05 03:16:44:
- assignee changed to: "dgp"
- closedate changed to: "2004-06-04T20:16:44"
- closer changed to: "dgp"
- 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.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Rejected"
- status changed to: "Closed"
- username: "dgp"