diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-07-12 14:03:36 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-07-12 14:03:36 (GMT) |
commit | 800148e0621ab1e28457aa915d37dd5c36c1ba77 (patch) | |
tree | 17bd980886aaf673da2fc11108ce0c8ca92b3b89 /generic | |
parent | 71e7049f8ea65780583e847f2b3055b519395517 (diff) | |
parent | bcd1ebff474ba386f8fb7db75692a39ce5bcb8ca (diff) | |
download | tcl-800148e0621ab1e28457aa915d37dd5c36c1ba77.zip tcl-800148e0621ab1e28457aa915d37dd5c36c1ba77.tar.gz tcl-800148e0621ab1e28457aa915d37dd5c36c1ba77.tar.bz2 |
Fix "file owned" for Cygwin: st_uid is only 16-bit there.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCmdAH.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 13d3df5..88cc17d 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -1596,14 +1596,19 @@ FileAttrIsOwnedCmd( int objc, Tcl_Obj *const objv[]) { +#ifdef __CYGWIN__ +#define geteuid() (short)(geteuid)() +#endif +#if !defined(_WIN32) Tcl_StatBuf buf; +#endif int value = 0; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); return TCL_ERROR; } -#if defined(_WIN32) || defined(__CYGWIN__) +#if defined(_WIN32) value = TclWinFileOwned(objv[1]); #else if (GetStatBuf(NULL, objv[1], Tcl_FSStat, &buf) == TCL_OK) { |