diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-03-28 13:32:37 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-03-28 13:32:37 (GMT) |
commit | 47e821e8297b9b9d7bb295a11f35c0307f2c1a7a (patch) | |
tree | 968af4744acfc6496b9611741040c3da171cb682 /unix/tclUnixFile.c | |
parent | 6540c1e7abc493b3684a2b1312717329494b96b1 (diff) | |
parent | 1251bcbcc6272da5c31c077c03ce238cfde19844 (diff) | |
download | tcl-47e821e8297b9b9d7bb295a11f35c0307f2c1a7a.zip tcl-47e821e8297b9b9d7bb295a11f35c0307f2c1a7a.tar.gz tcl-47e821e8297b9b9d7bb295a11f35c0307f2c1a7a.tar.bz2 |
merge trunk
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 c8afeb2..fe3c608 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -1178,6 +1178,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: |