Overview
| Artifact ID: | 68e3867f9d8015ca0dee3a07eb824dc80ad3cbd7 |
|---|---|
| Ticket: | 945570ffffffffffffffffffffffffffffffffff
public routines need private #define's |
| User & Date: | dgp on 2004-04-30 20:19:02 |
Changes
- assignee changed to: "vincentdarley"
- cmimetype changed to: "text/plain"
- comment changed to:
For C functions that are part of Tcl's documented public interface, a #include <tcl.h> should be all that's needed to make use of them. However, several of the filesystem routines require additional #include's. Tcl_FSAccess() needs the values F_OK, R_OK, etc. for passing in as the "mode" argument. tcl.h does not define them; callers are required to either #include <tclPort.h> or figure out for themselves what system header (if any) will fill the gap. Tcl_FSSeek() needs the values SEEK_SET, etc. tcl.h does not define them (see Tcl Bug 926486); callers are required to #include <stdio.h> or figure out configure for the platform. Tcl_FSStat() takes a (Tcl_StatBuf *) argument, and then the caller needs declarations about the struct and its fields to do anything with the result. This may include the time_t and mode_t types, and various values and macros like S_IFREG and S_ISREG(). This all requires extra configuration to be sure suitable header files (such as sys/stat.h and/or sys/types.h) are included. The Tcl_FSOpenFileChannelProc() of a Tcl_FIlesystem is passed a "mode" argument that requires values like O_RDONLY, O_EXCL, etc for decoding. tcl.h does not #define these values; callers are required to either #include <fcntl.h> or figure out for themselves what system header to use. It appears that a better solution for all these interfaces would be for tcl.h itself to #define the values needed by its public interfaces.
- foundin changed to: "obsolete: 8.5a2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dgp"
- subsystem changed to: "37. File System"
- title changed to: "public routines need private #define's"
- type changed to: "Bug"