summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-03-15 21:03:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-03-15 21:03:06 (GMT)
commit5841a02367f05ffbefe36849606d77718a556cb2 (patch)
tree925f152d32d79c91ee0cf085598a2e2ec7210e16 /generic/tcl.h
parent694826cd4f14b00837bf163b8e22f3c01dd2b2db (diff)
parent87085c466a1fdc5cfdb3cc6ce2659b4371c0b1b3 (diff)
downloadtcl-5841a02367f05ffbefe36849606d77718a556cb2.zip
tcl-5841a02367f05ffbefe36849606d77718a556cb2.tar.gz
tcl-5841a02367f05ffbefe36849606d77718a556cb2.tar.bz2
[Bug 3288345] Wrong Tcl_StatBuf used on Cygwin
Diffstat (limited to 'generic/tcl.h')
-rw-r--r--generic/tcl.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 21cd0c4..33fcb6f 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -352,7 +352,7 @@ typedef long LONG;
*/
#if !defined(TCL_WIDE_INT_TYPE)&&!defined(TCL_WIDE_INT_IS_LONG)
-# if defined(__WIN32__) && !defined(__CYGWIN__)
+# if defined(__WIN32__)
# define TCL_WIDE_INT_TYPE __int64
# ifdef __BORLANDC__
typedef struct stati64 Tcl_StatBuf;
@@ -415,7 +415,21 @@ typedef struct stat Tcl_StatBuf;
* or some other strange platform.
*/
# ifndef TCL_LL_MODIFIER
-# ifdef HAVE_STRUCT_STAT64
+# ifdef __CYGWIN__
+typedef struct _stat32i64 {
+ dev_t st_dev;
+ ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ dev_t st_rdev;
+ long long st_size;
+ struct {long tv_sec;} st_atim;
+ struct {long tv_sec;} st_mtim;
+ struct {long tv_sec;} st_ctim;
+} Tcl_StatBuf;
+# elif defined(HAVE_STRUCT_STAT64)
typedef struct stat64 Tcl_StatBuf;
# else
typedef struct stat Tcl_StatBuf;
@@ -427,7 +441,7 @@ typedef struct stat Tcl_StatBuf;
# define Tcl_WideAsDouble(val) ((double)((Tcl_WideInt)(val)))
# define Tcl_DoubleAsWide(val) ((Tcl_WideInt)((double)(val)))
#endif /* TCL_WIDE_INT_IS_LONG */
-
+
/*
* Data structures defined opaquely in this module. The definitions below just
* provide dummy types. A few fields are made visible in Tcl_Interp