diff options
author | ashok <ashok> | 2016-07-09 08:27:00 (GMT) |
---|---|---|
committer | ashok <ashok> | 2016-07-09 08:27:00 (GMT) |
commit | 48e3873f199817b52d54a4d802966b508917d200 (patch) | |
tree | bdc4cefb1087197e872b1a580caeaba3bf124e84 /win/tclWinPort.h | |
parent | 57a42f683c5b09c2b66da7f1b34fabd3376f31f6 (diff) | |
download | tcl-48e3873f199817b52d54a4d802966b508917d200.zip tcl-48e3873f199817b52d54a4d802966b508917d200.tar.gz tcl-48e3873f199817b52d54a4d802966b508917d200.tar.bz2 |
Bugfix [ae61a67192]. file {stat, type, size} etc. support for built-in special Windows files/devices like CON.
Diffstat (limited to 'win/tclWinPort.h')
-rw-r--r-- | win/tclWinPort.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/win/tclWinPort.h b/win/tclWinPort.h index ca6b2bf..b486466 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -360,6 +360,20 @@ typedef DWORD_PTR * PDWORD_PTR; # define S_IFLNK 0120000 /* Symbolic Link */ #endif +/* + * Windows compilers do not define S_IFBLK. However, Tcl uses it in + * GetTypeFromMode to identify blockSpecial devices based on the + * value in the statsbuf st_mode field. We have no other way to pass this + * from NativeStat on Windows so are forced to define it here. + * The definition here is essentially what is seen on Linux and MingW. + * XXX - the root problem is Tcl using Unix definitions instead of + * abstracting the structure into a platform independent one. Sigh - perhaps + * Tcl 9 + */ +#ifndef S_IFBLK +# define S_IFBLK (S_IFDIR | S_IFCHR) +#endif + #ifndef S_ISREG # ifdef S_IFREG # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) |