diff options
| author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-03-15 21:03:06 (GMT) | 
|---|---|---|
| committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-03-15 21:03:06 (GMT) | 
| commit | 50df7d58f017fa63b1b1ebc733d1e3cac412fe0d (patch) | |
| tree | 925f152d32d79c91ee0cf085598a2e2ec7210e16 /unix/tclUnixFile.c | |
| parent | 180ed90a9fa30d1ae798dd7c40c1214767587e6a (diff) | |
| parent | ca989372b848154b5d9a1a74a6d374b8ff4d4f4b (diff) | |
| download | tcl-50df7d58f017fa63b1b1ebc733d1e3cac412fe0d.zip tcl-50df7d58f017fa63b1b1ebc733d1e3cac412fe0d.tar.gz tcl-50df7d58f017fa63b1b1ebc733d1e3cac412fe0d.tar.bz2 | |
[Bug 3288345] Wrong Tcl_StatBuf used on Cygwin
Diffstat (limited to 'unix/tclUnixFile.c')
| -rw-r--r-- | unix/tclUnixFile.c | 34 | 
1 files changed, 34 insertions, 0 deletions
| diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 2639d59..7d82d1d 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -1164,6 +1164,40 @@ TclpUtime(  {      return utime(Tcl_FSGetNativePath(pathPtr), tval);  } +#ifdef __CYGWIN__ +int TclOSstat(const char *name, Tcl_StatBuf *statBuf) { +    struct stat buf; +    int result = stat(name, &buf); +    statBuf->st_mode = buf.st_mode; +    statBuf->st_ino = buf.st_ino; +    statBuf->st_dev = buf.st_dev; +    statBuf->st_rdev = buf.st_rdev; +    statBuf->st_nlink = buf.st_nlink; +    statBuf->st_uid = buf.st_uid; +    statBuf->st_gid = buf.st_gid; +    statBuf->st_size = buf.st_size; +    statBuf->st_atime = buf.st_atime; +    statBuf->st_mtime = buf.st_mtime; +    statBuf->st_ctime = buf.st_ctime; +    return result; +} +int TclOSlstat(const char *name, Tcl_StatBuf *statBuf) { +    struct stat buf; +    int result = lstat(name, &buf); +    statBuf->st_mode = buf.st_mode; +    statBuf->st_ino = buf.st_ino; +    statBuf->st_dev = buf.st_dev; +    statBuf->st_rdev = buf.st_rdev; +    statBuf->st_nlink = buf.st_nlink; +    statBuf->st_uid = buf.st_uid; +    statBuf->st_gid = buf.st_gid; +    statBuf->st_size = buf.st_size; +    statBuf->st_atime = buf.st_atime; +    statBuf->st_mtime = buf.st_mtime; +    statBuf->st_ctime = buf.st_ctime; +    return result; +} +#endif  /*   * Local Variables: | 
