summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/CrtChannel.32
-rw-r--r--doc/FileSystem.36
-rw-r--r--doc/IntObj.32
-rw-r--r--doc/OpenFileChnl.38
-rw-r--r--doc/file.n20
-rw-r--r--doc/re_syntax.n8
-rw-r--r--generic/tcl.decls16
-rw-r--r--generic/tcl.h49
-rw-r--r--generic/tclAlloc.c2
-rw-r--r--generic/tclDecls.h32
-rw-r--r--generic/tclFileName.c22
-rw-r--r--generic/tclIO.c14
-rw-r--r--generic/tclIOGT.c10
-rw-r--r--generic/tclIORChan.c8
-rw-r--r--generic/tclIORTrans.c8
-rw-r--r--generic/tclInt.decls2
-rw-r--r--generic/tclInt.h8
-rw-r--r--generic/tclIntDecls.h4
-rw-r--r--generic/tclMain.c5
-rw-r--r--generic/tclStrToD.c18
-rw-r--r--generic/tclThreadTest.c4
-rw-r--r--generic/tclZipfs.c12
-rw-r--r--libtommath/tommath.h45
-rw-r--r--macosx/Tcl-Common.xcconfig2
-rw-r--r--macosx/tclMacOSXNotify.c2
-rw-r--r--tests/fCmd.test58
-rw-r--r--tests/winFCmd.test43
-rwxr-xr-xunix/configure43
-rw-r--r--unix/tcl.m437
-rw-r--r--unix/tclConfig.h.in7
-rw-r--r--unix/tclUnixChan.c14
-rw-r--r--unix/tclUnixPort.h8
-rw-r--r--unix/tclUnixTime.c14
-rwxr-xr-xwin/configure8
-rw-r--r--win/configure.ac2
-rw-r--r--win/nmakehlp.c9
-rw-r--r--win/tcl.m48
-rw-r--r--win/tclWin32Dll.c14
-rw-r--r--win/tclWinChan.c16
-rw-r--r--win/tclWinFile.c19
-rw-r--r--win/tclWinInit.c17
-rw-r--r--win/tclWinInt.h10
-rw-r--r--win/tclWinPipe.c4
-rw-r--r--win/tclWinPort.h44
-rw-r--r--win/tclWinThrd.c4
-rw-r--r--win/tclWinTime.c92
-rw-r--r--win/tclsh.exe.manifest.in2
47 files changed, 259 insertions, 523 deletions
diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3
index f64a190..299bc29 100644
--- a/doc/CrtChannel.3
+++ b/doc/CrtChannel.3
@@ -762,7 +762,7 @@ length. It can be NULL.
.CS
typedef int \fBTcl_DriverTruncateProc\fR(
void *\fIinstanceData\fR,
- Tcl_WideInt \fIlength\fR);
+ long long \fIlength\fR);
.CE
.PP
\fIInstanceData\fR is the same as the value passed to
diff --git a/doc/FileSystem.3 b/doc/FileSystem.3
index eb388a2..6b7e634 100644
--- a/doc/FileSystem.3
+++ b/doc/FileSystem.3
@@ -144,7 +144,7 @@ Tcl_Obj *
Tcl_StatBuf *
\fBTcl_AllocStatBuf\fR()
.sp
-Tcl_WideInt
+long long
\fBTcl_GetAccessTimeFromStat\fR(\fIstatPtr\fR)
.sp
unsigned
@@ -153,7 +153,7 @@ unsigned
Tcl_WideUInt
\fBTcl_GetBlocksFromStat\fR(\fIstatPtr\fR)
.sp
-Tcl_WideInt
+long long
\fBTcl_GetChangeTimeFromStat\fR(\fIstatPtr\fR)
.sp
int
@@ -174,7 +174,7 @@ int
unsigned
\fBTcl_GetModeFromStat\fR(\fIstatPtr\fR)
.sp
-Tcl_WideInt
+long long
\fBTcl_GetModificationTimeFromStat\fR(\fIstatPtr\fR)
.sp
Tcl_WideUInt
diff --git a/doc/IntObj.3 b/doc/IntObj.3
index e793303..36bfa7d 100644
--- a/doc/IntObj.3
+++ b/doc/IntObj.3
@@ -102,7 +102,7 @@ are provided by the C language standard. The \fBTcl_WideInt\fR type is a
typedef defined to be whatever signed integral type covers at least the
64-bit integer range (-9223372036854775808 to 9223372036854775807). Depending
on the platform and the C compiler, the actual type might be
-\fBlong long int\fR, \fB__int64\fR, or something else.
+\fBlong long int\fR, or something else.
The \fBmp_int\fR type is a multiple-precision integer type defined
by the LibTomMath multiple-precision integer library.
.PP
diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3
index d48a35c..23b0863 100644
--- a/doc/OpenFileChnl.3
+++ b/doc/OpenFileChnl.3
@@ -92,10 +92,10 @@ int
int
\fBTcl_OutputBuffered\fR(\fIchannel\fR)
.sp
-Tcl_WideInt
+long long
\fBTcl_Seek\fR(\fIchannel, offset, seekMode\fR)
.sp
-Tcl_WideInt
+long long
\fBTcl_Tell\fR(\fIchannel\fR)
.sp
int
@@ -190,7 +190,7 @@ A buffer containing the bytes to output to the channel.
.AP size_t bytesToWrite in
The number of bytes to consume from \fIcharBuf\fR or \fIbyteBuf\fR and
output to the channel.
-.AP Tcl_WideInt offset in
+.AP "long long" offset in
How far to move the access point in the channel at which the next input or
output operation will be applied, measured in bytes from the position
given by \fIseekMode\fR. May be either positive or negative.
@@ -198,7 +198,7 @@ given by \fIseekMode\fR. May be either positive or negative.
Relative to which point to seek; used with \fIoffset\fR to calculate the new
access point for the channel. Legal values are \fBSEEK_SET\fR,
\fBSEEK_CUR\fR, and \fBSEEK_END\fR.
-.AP Tcl_WideInt length in
+.AP "long long" length in
The (non-negative) length to truncate the channel the channel to.
.AP "const char" *optionName in
The name of an option applicable to this channel, such as \fB\-blocking\fR.
diff --git a/doc/file.n b/doc/file.n
index da602fd..292c3b8 100644
--- a/doc/file.n
+++ b/doc/file.n
@@ -50,16 +50,16 @@ can be given to the command, but it returns a group name. \fB\-owner\fR gets
or sets the user name of the owner of the file. The command returns the
owner name, but the numerical id can be passed when setting the
owner. \fB\-permissions\fR sets or retrieves the octal code that chmod(1)
-uses. This command does also has limited support for setting using the
-symbolic attributes for chmod(1), of the form [ugo]?[[+\-=][rwxst],[...]],
-where multiple symbolic attributes can be separated by commas (example:
-\fBu+s,go\-rw\fR add sticky bit for user, remove read and write
-permissions for group and other). A simplified \fBls\fR style string,
-of the form rwxrwxrwx (must be 9 characters), is also supported
-(example: \fBrwxr\-xr\-t\fR is equivalent to 01755).
-On versions of Unix supporting file flags, \fB\-readonly\fR gives the
-value or sets or clears the readonly attribute of the file,
-i.e. the user immutable flag \fBuchg\fR to chflags(1).
+uses. This option also provides limited support for setting permissions
+using the symbolic notation used by the Unix chmod(1) command, following the
+form [ugo]?[[+-=][rwxst],[...]]. Multiple permission specifications may be
+given, separated by commas. E.g., \fBu+s,go-rw\fR would set the setuid bit
+for a file's owner as well as remove read and write permission for the file's
+group and other users. A simplified \fBls\fR style string, of the form
+rwxrwxrwx (must be 9 characters), is also supported (example:
+\fBrwxr\-xr\-t\fR is equivalent to 01755). On versions of Unix supporting
+file flags, \fB\-readonly\fR gives the value or sets or clears the readonly
+attribute of the file, i.e. the user immutable flag \fBuchg\fR to chflags(1).
.PP
On Windows, \fB\-archive\fR gives the value or sets or clears the
archive attribute of the file. \fB\-hidden\fR gives the value or sets
diff --git a/doc/re_syntax.n b/doc/re_syntax.n
index de08db9..62bb4af 100644
--- a/doc/re_syntax.n
+++ b/doc/re_syntax.n
@@ -138,22 +138,22 @@ later, under \fBESCAPES\fR.
\fB^\fR
.
matches at the beginning of the string or a line (according to whether
-matching is line-sensitive or not, as described in \fBMATCHING\fR,
+matching is newline-sensitive or not, as described in \fBMATCHING\fR,
below).
.TP
\fB$\fR
.
matches at the end of the string or a line (according to whether
-matching is line-sensitive or not, as described in \fBMATCHING\fR,
+matching is newline-sensitive or not, as described in \fBMATCHING\fR,
below).
.RS
.PP
The difference between string and line matching modes is immaterial
when the string does not contain a newline character. The \fB\eA\fR
-and \fB\eZ\fR constraint escapes have a similar purpose, but are
+and \fB\eZ\fR constraint escapes have a similar purpose but are
always constraints for the overall string.
.PP
-The default line-sensitvity depends on the command that uses the
+The default newline-sensitivity depends on the command that uses the
regular expression, and can be overridden as described in
\fBMETASYNTAX\fR, below.
.RE
diff --git a/generic/tcl.decls b/generic/tcl.decls
index dc57324..3375da5 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -1813,10 +1813,10 @@ declare 490 {
Tcl_StatBuf *Tcl_AllocStatBuf(void)
}
declare 491 {
- Tcl_WideInt Tcl_Seek(Tcl_Channel chan, Tcl_WideInt offset, int mode)
+ long long Tcl_Seek(Tcl_Channel chan, long long offset, int mode)
}
declare 492 {
- Tcl_WideInt Tcl_Tell(Tcl_Channel chan)
+ long long Tcl_Tell(Tcl_Channel chan)
}
# TIP#91 (back-compat enhancements for channels) dkf
@@ -2088,7 +2088,7 @@ declare 559 {
# TIP #208 ('chan' command) jeffh
declare 560 {
- int Tcl_TruncateChannel(Tcl_Channel chan, Tcl_WideInt length)
+ int Tcl_TruncateChannel(Tcl_Channel chan, long long length)
}
declare 561 {
Tcl_DriverTruncateProc *Tcl_ChannelTruncateProc(
@@ -2239,19 +2239,19 @@ declare 595 {
int Tcl_GetDeviceTypeFromStat(const Tcl_StatBuf *statPtr)
}
declare 596 {
- Tcl_WideInt Tcl_GetAccessTimeFromStat(const Tcl_StatBuf *statPtr)
+ long long Tcl_GetAccessTimeFromStat(const Tcl_StatBuf *statPtr)
}
declare 597 {
- Tcl_WideInt Tcl_GetModificationTimeFromStat(const Tcl_StatBuf *statPtr)
+ long long Tcl_GetModificationTimeFromStat(const Tcl_StatBuf *statPtr)
}
declare 598 {
- Tcl_WideInt Tcl_GetChangeTimeFromStat(const Tcl_StatBuf *statPtr)
+ long long Tcl_GetChangeTimeFromStat(const Tcl_StatBuf *statPtr)
}
declare 599 {
- Tcl_WideUInt Tcl_GetSizeFromStat(const Tcl_StatBuf *statPtr)
+ unsigned long long Tcl_GetSizeFromStat(const Tcl_StatBuf *statPtr)
}
declare 600 {
- Tcl_WideUInt Tcl_GetBlocksFromStat(const Tcl_StatBuf *statPtr)
+ unsigned long long Tcl_GetBlocksFromStat(const Tcl_StatBuf *statPtr)
}
declare 601 {
unsigned Tcl_GetBlockSizeFromStat(const Tcl_StatBuf *statPtr)
diff --git a/generic/tcl.h b/generic/tcl.h
index 5e5c877..a0d8edc 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -101,7 +101,11 @@ extern "C" {
#include <stdio.h>
#if defined(__GNUC__) && (__GNUC__ > 2)
-# define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b)))
+# if defined(_WIN32) && defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO
+# define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__MINGW_PRINTF_FORMAT, a, b)))
+# else
+# define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b)))
+# endif
# define TCL_NORETURN __attribute__ ((noreturn))
# define TCL_NOINLINE __attribute__ ((noinline))
# define TCL_NORETURN1 __attribute__ ((noreturn))
@@ -148,8 +152,7 @@ extern "C" {
* MSVCRT.
*/
-#if (defined(_WIN32) && (defined(_MSC_VER) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0550)) || defined(__LCC__) || defined(__WATCOMC__) || (defined(__GNUC__) && defined(__declspec))))
-# define HAVE_DECLSPEC 1
+#ifdef _WIN32
# ifdef STATIC_BUILD
# define DLLIMPORT
# define DLLEXPORT
@@ -231,11 +234,9 @@ typedef void *ClientData;
#ifdef __APPLE__
# ifdef __LP64__
-# undef TCL_WIDE_INT_TYPE
# define TCL_WIDE_INT_IS_LONG 1
# define TCL_CFG_DO64BIT 1
# else /* !__LP64__ */
-# define TCL_WIDE_INT_TYPE long long
# undef TCL_WIDE_INT_IS_LONG
# undef TCL_CFG_DO64BIT
# endif /* __LP64__ */
@@ -263,26 +264,16 @@ typedef void *ClientData;
* sprintf(...,"%" TCL_LL_MODIFIER "d",...).
*/
-#if !defined(TCL_WIDE_INT_TYPE)&&!defined(TCL_WIDE_INT_IS_LONG)
-# if defined(_WIN32) && (!defined(__USE_MINGW_ANSI_STDIO) || !__USE_MINGW_ANSI_STDIO)
-# define TCL_WIDE_INT_TYPE __int64
-# define TCL_LL_MODIFIER "I64"
-# if defined(_WIN64)
-# define TCL_Z_MODIFIER "I"
-# endif
-# elif defined(__GNUC__)
-# define TCL_Z_MODIFIER "z"
-# else /* ! _WIN32 && ! __GNUC__ */
+#if !defined(TCL_WIDE_INT_TYPE) && !defined(TCL_WIDE_INT_IS_LONG) && !defined(_WIN32) && !defined(__GNUC__)
/*
* Don't know what platform it is and configure hasn't discovered what is
* going on for us. Try to guess...
*/
-# include <limits.h>
-# if defined(LLONG_MAX) && (LLONG_MAX == LONG_MAX)
-# define TCL_WIDE_INT_IS_LONG 1
-# endif
-# endif /* _WIN32 */
-#endif /* !TCL_WIDE_INT_TYPE & !TCL_WIDE_INT_IS_LONG */
+# include <limits.h>
+# if defined(LLONG_MAX) && (LLONG_MAX == LONG_MAX)
+# define TCL_WIDE_INT_IS_LONG 1
+# endif
+#endif
#ifndef TCL_WIDE_INT_TYPE
# define TCL_WIDE_INT_TYPE long long
@@ -292,11 +283,17 @@ typedef TCL_WIDE_INT_TYPE Tcl_WideInt;
typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
#ifndef TCL_LL_MODIFIER
-# define TCL_LL_MODIFIER "ll"
+# if defined(_WIN32) && (!defined(__USE_MINGW_ANSI_STDIO) || !__USE_MINGW_ANSI_STDIO)
+# define TCL_LL_MODIFIER "I64"
+# else
+# define TCL_LL_MODIFIER "ll"
+# endif
#endif /* !TCL_LL_MODIFIER */
#ifndef TCL_Z_MODIFIER
# if defined(__GNUC__) && !defined(_WIN32)
# define TCL_Z_MODIFIER "z"
+# elif defined(_WIN64)
+# define TCL_Z_MODIFIER TCL_LL_MODIFIER
# else
# define TCL_Z_MODIFIER ""
# endif
@@ -801,7 +798,7 @@ typedef struct Tcl_DString {
* 64-bit integers).
*/
-#define TCL_INTEGER_SPACE 24
+#define TCL_INTEGER_SPACE (3*(int)sizeof(Tcl_WideInt))
/*
* Flag values passed to Tcl_ConvertElement.
@@ -1264,8 +1261,8 @@ typedef int (Tcl_DriverGetHandleProc) (void *instanceData,
typedef int (Tcl_DriverFlushProc) (void *instanceData);
typedef int (Tcl_DriverHandlerProc) (void *instanceData,
int interestMask);
-typedef Tcl_WideInt (Tcl_DriverWideSeekProc) (void *instanceData,
- Tcl_WideInt offset, int mode, int *errorCodePtr);
+typedef long long (Tcl_DriverWideSeekProc) (void *instanceData,
+ long long offset, int mode, int *errorCodePtr);
/*
* TIP #218, Channel Thread Actions
*/
@@ -1275,7 +1272,7 @@ typedef void (Tcl_DriverThreadActionProc) (void *instanceData,
* TIP #208, File Truncation (etc.)
*/
typedef int (Tcl_DriverTruncateProc) (void *instanceData,
- Tcl_WideInt length);
+ long long length);
/*
* struct Tcl_ChannelType:
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c
index f9252d8..5070f96 100644
--- a/generic/tclAlloc.c
+++ b/generic/tclAlloc.c
@@ -31,7 +31,7 @@
* until Tcl uses config.h properly.
*/
-#if defined(_MSC_VER) || defined(__MSVCRT__) || defined(__BORLANDC__)
+#if defined(_MSC_VER) || defined(__MSVCRT__)
typedef size_t caddr_t;
#endif
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index b15d548..9a2e7a1 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -1298,10 +1298,10 @@ EXTERN void Tcl_SetWideIntObj(Tcl_Obj *objPtr,
/* 490 */
EXTERN Tcl_StatBuf * Tcl_AllocStatBuf(void);
/* 491 */
-EXTERN Tcl_WideInt Tcl_Seek(Tcl_Channel chan, Tcl_WideInt offset,
+EXTERN long long Tcl_Seek(Tcl_Channel chan, long long offset,
int mode);
/* 492 */
-EXTERN Tcl_WideInt Tcl_Tell(Tcl_Channel chan);
+EXTERN long long Tcl_Tell(Tcl_Channel chan);
/* 493 */
EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc(
const Tcl_ChannelType *chanTypePtr);
@@ -1498,7 +1498,7 @@ EXTERN int Tcl_TakeBignumFromObj(Tcl_Interp *interp,
Tcl_Obj *obj, void *value);
/* 560 */
EXTERN int Tcl_TruncateChannel(Tcl_Channel chan,
- Tcl_WideInt length);
+ long long length);
/* 561 */
EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc(
const Tcl_ChannelType *chanTypePtr);
@@ -1601,16 +1601,16 @@ EXTERN int Tcl_GetGroupIdFromStat(const Tcl_StatBuf *statPtr);
/* 595 */
EXTERN int Tcl_GetDeviceTypeFromStat(const Tcl_StatBuf *statPtr);
/* 596 */
-EXTERN Tcl_WideInt Tcl_GetAccessTimeFromStat(const Tcl_StatBuf *statPtr);
+EXTERN long long Tcl_GetAccessTimeFromStat(const Tcl_StatBuf *statPtr);
/* 597 */
-EXTERN Tcl_WideInt Tcl_GetModificationTimeFromStat(
+EXTERN long long Tcl_GetModificationTimeFromStat(
const Tcl_StatBuf *statPtr);
/* 598 */
-EXTERN Tcl_WideInt Tcl_GetChangeTimeFromStat(const Tcl_StatBuf *statPtr);
+EXTERN long long Tcl_GetChangeTimeFromStat(const Tcl_StatBuf *statPtr);
/* 599 */
-EXTERN Tcl_WideUInt Tcl_GetSizeFromStat(const Tcl_StatBuf *statPtr);
+EXTERN unsigned long long Tcl_GetSizeFromStat(const Tcl_StatBuf *statPtr);
/* 600 */
-EXTERN Tcl_WideUInt Tcl_GetBlocksFromStat(const Tcl_StatBuf *statPtr);
+EXTERN unsigned long long Tcl_GetBlocksFromStat(const Tcl_StatBuf *statPtr);
/* 601 */
EXTERN unsigned Tcl_GetBlockSizeFromStat(const Tcl_StatBuf *statPtr);
/* 602 */
@@ -2277,8 +2277,8 @@ typedef struct TclStubs {
Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */
void (*tcl_SetWideIntObj) (Tcl_Obj *objPtr, Tcl_WideInt wideValue); /* 489 */
Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */
- Tcl_WideInt (*tcl_Seek) (Tcl_Channel chan, Tcl_WideInt offset, int mode); /* 491 */
- Tcl_WideInt (*tcl_Tell) (Tcl_Channel chan); /* 492 */
+ long long (*tcl_Seek) (Tcl_Channel chan, long long offset, int mode); /* 491 */
+ long long (*tcl_Tell) (Tcl_Channel chan); /* 492 */
Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (const Tcl_ChannelType *chanTypePtr); /* 493 */
int (*tcl_DictObjPut) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Obj *keyPtr, Tcl_Obj *valuePtr); /* 494 */
int (*tcl_DictObjGet) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Obj *keyPtr, Tcl_Obj **valuePtrPtr); /* 495 */
@@ -2346,7 +2346,7 @@ typedef struct TclStubs {
void (*tcl_SetBignumObj) (Tcl_Obj *obj, void *value); /* 557 */
int (*tcl_GetBignumFromObj) (Tcl_Interp *interp, Tcl_Obj *obj, void *value); /* 558 */
int (*tcl_TakeBignumFromObj) (Tcl_Interp *interp, Tcl_Obj *obj, void *value); /* 559 */
- int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */
+ int (*tcl_TruncateChannel) (Tcl_Channel chan, long long length); /* 560 */
Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (const Tcl_ChannelType *chanTypePtr); /* 561 */
void (*tcl_SetChannelErrorInterp) (Tcl_Interp *interp, Tcl_Obj *msg); /* 562 */
void (*tcl_GetChannelErrorInterp) (Tcl_Interp *interp, Tcl_Obj **msg); /* 563 */
@@ -2382,11 +2382,11 @@ typedef struct TclStubs {
int (*tcl_GetUserIdFromStat) (const Tcl_StatBuf *statPtr); /* 593 */
int (*tcl_GetGroupIdFromStat) (const Tcl_StatBuf *statPtr); /* 594 */
int (*tcl_GetDeviceTypeFromStat) (const Tcl_StatBuf *statPtr); /* 595 */
- Tcl_WideInt (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf *statPtr); /* 596 */
- Tcl_WideInt (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf *statPtr); /* 597 */
- Tcl_WideInt (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf *statPtr); /* 598 */
- Tcl_WideUInt (*tcl_GetSizeFromStat) (const Tcl_StatBuf *statPtr); /* 599 */
- Tcl_WideUInt (*tcl_GetBlocksFromStat) (const Tcl_StatBuf *statPtr); /* 600 */
+ long long (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf *statPtr); /* 596 */
+ long long (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf *statPtr); /* 597 */
+ long long (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf *statPtr); /* 598 */
+ unsigned long long (*tcl_GetSizeFromStat) (const Tcl_StatBuf *statPtr); /* 599 */
+ unsigned long long (*tcl_GetBlocksFromStat) (const Tcl_StatBuf *statPtr); /* 600 */
unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf *statPtr); /* 601 */
int (*tcl_SetEnsembleParameterList) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *paramList); /* 602 */
int (*tcl_GetEnsembleParameterList) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **paramListPtr); /* 603 */
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index d381a5d..ca63a43 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -2603,44 +2603,44 @@ Tcl_GetDeviceTypeFromStat(
return (int) statPtr->st_rdev;
}
-Tcl_WideInt
+long long
Tcl_GetAccessTimeFromStat(
const Tcl_StatBuf *statPtr)
{
- return (Tcl_WideInt) statPtr->st_atime;
+ return (long long) statPtr->st_atime;
}
-Tcl_WideInt
+long long
Tcl_GetModificationTimeFromStat(
const Tcl_StatBuf *statPtr)
{
- return (Tcl_WideInt) statPtr->st_mtime;
+ return (long long) statPtr->st_mtime;
}
-Tcl_WideInt
+long long
Tcl_GetChangeTimeFromStat(
const Tcl_StatBuf *statPtr)
{
- return (Tcl_WideInt) statPtr->st_ctime;
+ return (long long) statPtr->st_ctime;
}
-Tcl_WideUInt
+unsigned long long
Tcl_GetSizeFromStat(
const Tcl_StatBuf *statPtr)
{
- return (Tcl_WideUInt) statPtr->st_size;
+ return (unsigned long long) statPtr->st_size;
}
-Tcl_WideUInt
+unsigned long long
Tcl_GetBlocksFromStat(
const Tcl_StatBuf *statPtr)
{
#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
- return (Tcl_WideUInt) statPtr->st_blocks;
+ return (unsigned long long) statPtr->st_blocks;
#else
unsigned blksize = Tcl_GetBlockSizeFromStat(statPtr);
- return ((Tcl_WideUInt) statPtr->st_size + blksize - 1) / blksize;
+ return ((unsigned long long) statPtr->st_size + blksize - 1) / blksize;
#endif
}
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 6c91ff7..c747ff8 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -6951,10 +6951,10 @@ GetInput(
*----------------------------------------------------------------------
*/
-Tcl_WideInt
+long long
Tcl_Seek(
Tcl_Channel chan, /* The channel on which to seek. */
- Tcl_WideInt offset, /* Offset to seek to. */
+ long long offset, /* Offset to seek to. */
int mode) /* Relative to which location to seek? */
{
Channel *chanPtr = (Channel *) chan;
@@ -6964,7 +6964,7 @@ Tcl_Seek(
int inputBuffered, outputBuffered;
/* # bytes held in buffers. */
int result; /* Of device driver operations. */
- Tcl_WideInt curPos; /* Position on the device. */
+ long long curPos; /* Position on the device. */
int wasAsync; /* Was the channel nonblocking before the seek
* operation? If so, must restore to
* non-blocking mode after the seek. */
@@ -7121,7 +7121,7 @@ Tcl_Seek(
*----------------------------------------------------------------------
*/
-Tcl_WideInt
+long long
Tcl_Tell(
Tcl_Channel chan) /* The channel to return pos for. */
{
@@ -7132,7 +7132,7 @@ Tcl_Tell(
int inputBuffered, outputBuffered;
/* # bytes held in buffers. */
int result; /* Of calling device driver. */
- Tcl_WideInt curPos; /* Position on device. */
+ long long curPos; /* Position on device. */
if (CheckChannelErrors(statePtr, TCL_WRITABLE | TCL_READABLE) != 0) {
return -1;
@@ -7213,7 +7213,7 @@ Tcl_Tell(
int
Tcl_TruncateChannel(
Tcl_Channel chan, /* Channel to truncate. */
- Tcl_WideInt length) /* Length to truncate it to. */
+ long long length) /* Length to truncate it to. */
{
Channel *chanPtr = (Channel *) chan;
Tcl_DriverTruncateProc *truncateProc =
@@ -9101,7 +9101,7 @@ TclCopyChannel(
Tcl_Interp *interp, /* Current interpreter. */
Tcl_Channel inChan, /* Channel to read from. */
Tcl_Channel outChan, /* Channel to write to. */
- Tcl_WideInt toRead, /* Amount of data to copy, or -1 for all. */
+ long long toRead, /* Amount of data to copy, or -1 for all. */
Tcl_Obj *cmdPtr) /* Pointer to script to execute or NULL. */
{
Channel *inPtr = (Channel *) inChan;
diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c
index 1564034..01256255 100644
--- a/generic/tclIOGT.c
+++ b/generic/tclIOGT.c
@@ -37,8 +37,8 @@ static void TransformWatchProc(ClientData instanceData, int mask);
static int TransformGetFileHandleProc(ClientData instanceData,
int direction, ClientData *handlePtr);
static int TransformNotifyProc(ClientData instanceData, int mask);
-static Tcl_WideInt TransformWideSeekProc(ClientData instanceData,
- Tcl_WideInt offset, int mode, int *errorCodePtr);
+static long long TransformWideSeekProc(ClientData instanceData,
+ long long offset, int mode, int *errorCodePtr);
/*
* Forward declarations of internal procedures. Secondly the procedures for
@@ -830,10 +830,10 @@ TransformOutputProc(
*----------------------------------------------------------------------
*/
-static Tcl_WideInt
+static long long
TransformWideSeekProc(
ClientData instanceData, /* The channel to manipulate. */
- Tcl_WideInt offset, /* Size of movement. */
+ long long offset, /* Size of movement. */
int mode, /* How to move. */
int *errorCodePtr) /* Location of error flag. */
{
@@ -842,7 +842,7 @@ TransformWideSeekProc(
const Tcl_ChannelType *parentType = Tcl_GetChannelType(parent);
Tcl_DriverWideSeekProc *parentWideSeekProc =
Tcl_ChannelWideSeekProc(parentType);
- ClientData parentData = Tcl_GetChannelInstanceData(parent);
+ void *parentData = Tcl_GetChannelInstanceData(parent);
if ((offset == 0) && (mode == SEEK_CUR)) {
/*
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index b96033d..5bcd88b 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -44,8 +44,8 @@ static void ReflectThread(ClientData clientData, int action);
static int ReflectEventRun(Tcl_Event *ev, int flags);
static int ReflectEventDelete(Tcl_Event *ev, ClientData cd);
#endif
-static Tcl_WideInt ReflectSeekWide(ClientData clientData,
- Tcl_WideInt offset, int mode, int *errorCodePtr);
+static long long ReflectSeekWide(ClientData clientData,
+ long long offset, int mode, int *errorCodePtr);
static int ReflectGetOption(ClientData clientData,
Tcl_Interp *interp, const char *optionName,
Tcl_DString *dsPtr);
@@ -1539,10 +1539,10 @@ ReflectOutput(
*----------------------------------------------------------------------
*/
-static Tcl_WideInt
+static long long
ReflectSeekWide(
ClientData clientData,
- Tcl_WideInt offset,
+ long long offset,
int seekMode,
int *errorCodePtr)
{
diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c
index 6218c37..07891ad 100644
--- a/generic/tclIORTrans.c
+++ b/generic/tclIORTrans.c
@@ -39,8 +39,8 @@ static int ReflectOutput(ClientData clientData, const char *buf,
int toWrite, int *errorCodePtr);
static void ReflectWatch(ClientData clientData, int mask);
static int ReflectBlock(ClientData clientData, int mode);
-static Tcl_WideInt ReflectSeekWide(ClientData clientData,
- Tcl_WideInt offset, int mode, int *errorCodePtr);
+static long long ReflectSeekWide(ClientData clientData,
+ long long offset, int mode, int *errorCodePtr);
static int ReflectGetOption(ClientData clientData,
Tcl_Interp *interp, const char *optionName,
Tcl_DString *dsPtr);
@@ -1319,10 +1319,10 @@ ReflectOutput(
*----------------------------------------------------------------------
*/
-static Tcl_WideInt
+static long long
ReflectSeekWide(
ClientData clientData,
- Tcl_WideInt offset,
+ long long offset,
int seekMode,
int *errorCodePtr)
{
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 9433b09..303492e 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -1014,7 +1014,7 @@ declare 247 {
declare 248 {
int TclCopyChannel(Tcl_Interp *interp, Tcl_Channel inChan,
- Tcl_Channel outChan, Tcl_WideInt toRead, Tcl_Obj *cmdPtr)
+ Tcl_Channel outChan, long long toRead, Tcl_Obj *cmdPtr)
}
declare 249 {
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 92945ca..d8fe381 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3212,19 +3212,19 @@ MODULE_SCOPE void TclFinalizeThreadDataThread(void);
MODULE_SCOPE void TclFinalizeThreadStorage(void);
#ifdef TCL_WIDE_CLICKS
-MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void);
-MODULE_SCOPE double TclpWideClicksToNanoseconds(Tcl_WideInt clicks);
+MODULE_SCOPE long long TclpGetWideClicks(void);
+MODULE_SCOPE double TclpWideClicksToNanoseconds(long long clicks);
MODULE_SCOPE double TclpWideClickInMicrosec(void);
#else
# ifdef _WIN32
# define TCL_WIDE_CLICKS 1
-MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void);
+MODULE_SCOPE long long TclpGetWideClicks(void);
MODULE_SCOPE double TclpWideClickInMicrosec(void);
# define TclpWideClicksToNanoseconds(clicks) \
((double)(clicks) * TclpWideClickInMicrosec() * 1000)
# endif
#endif
-MODULE_SCOPE Tcl_WideInt TclpGetMicroseconds(void);
+MODULE_SCOPE long long TclpGetMicroseconds(void);
MODULE_SCOPE int TclZlibInit(Tcl_Interp *interp);
MODULE_SCOPE void * TclpThreadCreateKey(void);
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index e870aac..2969f27 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -537,7 +537,7 @@ EXTERN void TclResetRewriteEnsemble(Tcl_Interp *interp,
/* 248 */
EXTERN int TclCopyChannel(Tcl_Interp *interp,
Tcl_Channel inChan, Tcl_Channel outChan,
- Tcl_WideInt toRead, Tcl_Obj *cmdPtr);
+ long long toRead, Tcl_Obj *cmdPtr);
/* 249 */
EXTERN char * TclDoubleDigits(double dv, int ndigits, int flags,
int *decpt, int *signum, char **endPtr);
@@ -836,7 +836,7 @@ typedef struct TclIntStubs {
Tcl_HashTable * (*tclGetNamespaceCommandTable) (Tcl_Namespace *nsPtr); /* 245 */
int (*tclInitRewriteEnsemble) (Tcl_Interp *interp, size_t numRemoved, size_t numInserted, Tcl_Obj *const *objv); /* 246 */
void (*tclResetRewriteEnsemble) (Tcl_Interp *interp, int isRootEnsemble); /* 247 */
- int (*tclCopyChannel) (Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, Tcl_WideInt toRead, Tcl_Obj *cmdPtr); /* 248 */
+ int (*tclCopyChannel) (Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, long long toRead, Tcl_Obj *cmdPtr); /* 248 */
char * (*tclDoubleDigits) (double dv, int ndigits, int flags, int *decpt, int *signum, char **endPtr); /* 249 */
void (*tclSetChildCancelFlags) (Tcl_Interp *interp, int flags, int force); /* 250 */
int (*tclRegisterLiteral) (void *envPtr, const char *bytes, size_t length, int flags); /* 251 */
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 2c91129..943ca84 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -64,11 +64,6 @@ NewNativeObj(
* source directory to make their own modified versions).
*/
-#if defined _MSC_VER && _MSC_VER < 1900
-/* isatty is always defined on MSVC 14.0, but not necessarily as CRTIMPORT. */
-extern CRTIMPORT int isatty(int fd);
-#endif
-
/*
* The thread-local variables for this file's functions.
*/
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index 31a0c6b..c52c888 100644
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -537,7 +537,7 @@ TclParseNumber(
int under = 0; /* Flag trailing '_' as error if true once
* number is accepted. */
-#define ALL_BITS ((Tcl_WideUInt)-1)
+#define ALL_BITS UWIDE_MAX
#define MOST_BITS (ALL_BITS >> 1)
/*
@@ -720,7 +720,7 @@ TclParseNumber(
&& (((size_t)shift >=
CHAR_BIT*sizeof(Tcl_WideUInt))
|| (octalSignificandWide >
- ((Tcl_WideUInt)-1 >> shift)))) {
+ (UWIDE_MAX >> shift)))) {
octalSignificandOverflow = 1;
err = mp_init_u64(&octalSignificandBig,
octalSignificandWide);
@@ -804,7 +804,7 @@ TclParseNumber(
if (significandWide != 0 &&
((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) ||
- significandWide > ((Tcl_WideUInt)-1 >> shift))) {
+ significandWide > (UWIDE_MAX >> shift))) {
significandOverflow = 1;
err = mp_init_u64(&significandBig,
significandWide);
@@ -856,7 +856,7 @@ TclParseNumber(
if (significandWide != 0 &&
((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) ||
- significandWide > ((Tcl_WideUInt)-1 >> shift))) {
+ significandWide > (UWIDE_MAX >> shift))) {
significandOverflow = 1;
err = mp_init_u64(&significandBig,
significandWide);
@@ -1530,7 +1530,7 @@ AccumulateDecimalDigit(
*wideRepPtr = digit;
return 0;
} else if (numZeros >= maxpow10_wide
- || w > ((Tcl_WideUInt)-1-digit)/pow10_wide[numZeros+1]) {
+ || w > (UWIDE_MAX-digit)/pow10_wide[numZeros+1]) {
/*
* Wide multiplication will overflow. Expand the number to a
* bignum and fall through into the bignum case.
@@ -5183,21 +5183,21 @@ TclFormatNaN(
#else
union {
double dv;
- Tcl_WideUInt iv;
+ unsigned long long iv;
} bitwhack;
bitwhack.dv = value;
if (n770_fp) {
bitwhack.iv = Nokia770Twiddle(bitwhack.iv);
}
- if (bitwhack.iv & ((Tcl_WideUInt) 1 << 63)) {
- bitwhack.iv &= ~ ((Tcl_WideUInt) 1 << 63);
+ if (bitwhack.iv & (1ULL << 63)) {
+ bitwhack.iv &= ~ (1ULL << 63);
*buffer++ = '-';
}
*buffer++ = 'N';
*buffer++ = 'a';
*buffer++ = 'N';
- bitwhack.iv &= (((Tcl_WideUInt) 1) << 51) - 1;
+ bitwhack.iv &= ((1ULL) << 51) - 1;
if (bitwhack.iv != 0) {
sprintf(buffer, "(%" TCL_LL_MODIFIER "x)", bitwhack.iv);
} else {
diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c
index 1de2455..f440ec0 100644
--- a/generic/tclThreadTest.c
+++ b/generic/tclThreadTest.c
@@ -368,9 +368,9 @@ ThreadObjCmd(
if (result == TCL_OK) {
Tcl_SetIntObj(Tcl_GetObjResult(interp), status);
} else {
- char buf[20];
+ char buf[TCL_INTEGER_SPACE];
- sprintf(buf, "%" TCL_LL_MODIFIER "d", id);
+ sprintf(buf, "%" TCL_LL_MODIFIER "d", (long long)id);
Tcl_AppendResult(interp, "cannot join thread ", buf, NULL);
}
return result;
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index 20d8ef6..f0c8ce9 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -228,7 +228,7 @@ typedef struct ZipFile {
typedef struct ZipEntry {
char *name; /* The full pathname of the virtual file */
ZipFile *zipFilePtr; /* The ZIP file holding this virtual file */
- Tcl_WideInt offset; /* Data offset into memory mapped ZIP file */
+ long long offset; /* Data offset into memory mapped ZIP file */
int numBytes; /* Uncompressed size of the virtual file */
int numCompressedBytes; /* Compressed size of the virtual file */
int compressMethod; /* Compress method */
@@ -332,7 +332,7 @@ static int ZipChannelClose(void *instanceData,
static Tcl_DriverGetHandleProc ZipChannelGetFile;
static int ZipChannelRead(void *instanceData, char *buf,
int toRead, int *errloc);
-static Tcl_WideInt ZipChannelWideSeek(void *instanceData, Tcl_WideInt offset,
+static long long ZipChannelWideSeek(void *instanceData, long long offset,
int mode, int *errloc);
static void ZipChannelWatchChannel(void *instanceData,
int mask);
@@ -2044,7 +2044,7 @@ ZipAddFile(
const char *zpath;
int crc, flush, zpathlen;
size_t nbyte, nbytecompr, len, olen, align = 0;
- Tcl_WideInt pos[3];
+ long long pos[3];
int mtime = 0, isNew, compMeth;
unsigned long keys[3], keys0[3];
char obuf[4096];
@@ -2398,7 +2398,7 @@ ZipFSMkZipOrImgObjCmd(
Tcl_Channel out;
int pwlen = 0, count, ret = TCL_ERROR, lobjc;
size_t len, slen = 0, i = 0;
- Tcl_WideInt pos[3];
+ long long pos[3];
Tcl_Obj **lobjv, *list = NULL;
ZipEntry *z;
Tcl_HashEntry *hPtr;
@@ -3430,10 +3430,10 @@ ZipChannelWrite(
*-------------------------------------------------------------------------
*/
-static Tcl_WideInt
+static long long
ZipChannelWideSeek(
void *instanceData,
- Tcl_WideInt offset,
+ long long offset,
int mode,
int *errloc)
{
diff --git a/libtommath/tommath.h b/libtommath/tommath.h
index 8f2867e..053bf09 100644
--- a/libtommath/tommath.h
+++ b/libtommath/tommath.h
@@ -237,22 +237,13 @@ TOOM_SQR_CUTOFF;
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 405)
# define MP_DEPRECATED(x) __attribute__((deprecated("replaced by " #x)))
-#elif defined(_MSC_VER) && _MSC_VER >= 1500
-# define MP_DEPRECATED(x) __declspec(deprecated("replaced by " #x))
-#else
-# define MP_DEPRECATED(x)
-#endif
-
-#ifndef MP_NO_DEPRECATED_PRAGMA
-#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 301)
# define PRIVATE_MP_DEPRECATED_PRAGMA(s) _Pragma(#s)
# define MP_DEPRECATED_PRAGMA(s) PRIVATE_MP_DEPRECATED_PRAGMA(GCC warning s)
#elif defined(_MSC_VER) && _MSC_VER >= 1500
+# define MP_DEPRECATED(x) __declspec(deprecated("replaced by " #x))
# define MP_DEPRECATED_PRAGMA(s) __pragma(message(s))
-#endif
-#endif
-
-#ifndef MP_DEPRECATED_PRAGMA
+#else
+# define MP_DEPRECATED(s)
# define MP_DEPRECATED_PRAGMA(s)
#endif
@@ -341,11 +332,7 @@ mp_err mp_init_u64(mp_int *a, uint64_t b) MP_WUR;
uint32_t mp_get_mag_u32(const mp_int *a) MP_WUR;
uint64_t mp_get_mag_u64(const mp_int *a) MP_WUR;
unsigned long mp_get_mag_ul(const mp_int *a) MP_WUR;
-#ifdef _MSC_VER
-#define mp_get_mag_ull(a) ((unsigned __int64)mp_get_mag_u64(a))
-#else
-unsigned long long mp_get_mag_ull(const mp_int *a) MP_WUR;
-#endif
+#define mp_get_mag_ull(a) ((unsigned long long)mp_get_mag_u64(a))
/* get integer, set integer (long) */
long mp_get_l(const mp_int *a) MP_WUR;
@@ -357,27 +344,15 @@ mp_err mp_init_l(mp_int *a, long b) MP_WUR;
void mp_set_ul(mp_int *a, unsigned long b);
mp_err mp_init_ul(mp_int *a, unsigned long b) MP_WUR;
-#ifdef _MSC_VER
/* get integer, set integer (long long) */
-#define mp_get_ll(a) ((__int64)mp_get_i64(a))
+#define mp_get_ll(a) ((long long)mp_get_i64(a))
#define mp_set_ll(a,b) mp_set_i64(a,b)
#define mp_init_ll(a,b) mp_init_i64(a,b)
/* get integer, set integer (unsigned long long) */
-#define mp_get_ull(a) ((unsigned __int64)mp_get_i64(a))
+#define mp_get_ull(a) ((unsigned long long)mp_get_i64(a))
#define mp_set_ull(a,b) mp_set_u64(a,b)
#define mp_init_ull(a,b) mp_init_u64(a,b)
-#else
-/* get integer, set integer (long long) */
-long long mp_get_ll(const mp_int *a) MP_WUR;
-void mp_set_ll(mp_int *a, long long b);
-mp_err mp_init_ll(mp_int *a, long long b) MP_WUR;
-
-/* get integer, set integer (unsigned long long) */
-#define mp_get_ull(a) ((unsigned long long)mp_get_ll(a))
-void mp_set_ull(mp_int *a, unsigned long long b);
-mp_err mp_init_ull(mp_int *a, unsigned long long b) MP_WUR;
-#endif
/* set to single unsigned digit, up to MP_DIGIT_MAX */
void mp_set(mp_int *a, mp_digit b);
@@ -386,14 +361,10 @@ mp_err mp_init_set(mp_int *a, mp_digit b) MP_WUR;
/* get integer, set integer and init with integer (deprecated) */
MP_DEPRECATED(mp_get_mag_u32/mp_get_u32) unsigned long mp_get_int(const mp_int *a) MP_WUR;
MP_DEPRECATED(mp_get_mag_ul/mp_get_ul) unsigned long mp_get_long(const mp_int *a) MP_WUR;
-#ifdef _MSC_VER
-MP_DEPRECATED(mp_get_mag_ull/mp_get_ull) unsigned __int64 mp_get_long_long(const mp_int *a) MP_WUR;
-#endif
+MP_DEPRECATED(mp_get_mag_ull/mp_get_ull) unsigned long long mp_get_long_long(const mp_int *a) MP_WUR;
MP_DEPRECATED(mp_set_ul) mp_err mp_set_int(mp_int *a, unsigned long b);
MP_DEPRECATED(mp_set_ul) mp_err mp_set_long(mp_int *a, unsigned long b);
-#ifdef _MSC_VER
-MP_DEPRECATED(mp_set_ull) mp_err mp_set_long_long(mp_int *a, unsigned __int64 b);
-#endif
+MP_DEPRECATED(mp_set_ull) mp_err mp_set_long_long(mp_int *a, unsigned long long b);
MP_DEPRECATED(mp_init_ul) mp_err mp_init_set_int(mp_int *a, unsigned long b) MP_WUR;
/* copy, b = a */
diff --git a/macosx/Tcl-Common.xcconfig b/macosx/Tcl-Common.xcconfig
index a2ab26e..84c6303 100644
--- a/macosx/Tcl-Common.xcconfig
+++ b/macosx/Tcl-Common.xcconfig
@@ -19,7 +19,7 @@ GCC_NO_COMMON_BLOCKS = YES
GCC_DYNAMIC_NO_PIC = YES
GCC_VERSION = 4.2
GCC = gcc-$(GCC_VERSION)
-WARNING_CFLAGS = -Wall -Wextra -Wshadow -Wwrite-strings -Wpointer-arith -Wc++-compat -Wdeclaration-after-statement -Winit-self -Wcast-align -Wdisabled-optimization -Winline $(WARNING_CFLAGS)
+WARNING_CFLAGS = -Wall -Wextra -Wshadow -Wwrite-strings -Wpointer-arith -Wc++-compat -Winit-self -Wcast-align -Wdisabled-optimization -Winline $(WARNING_CFLAGS)
BINDIR = $(PREFIX)/bin
CFLAGS = $(CFLAGS)
CPPFLAGS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET) $(CPPFLAGS)
diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c
index 453455b..f769e5b 100644
--- a/macosx/tclMacOSXNotify.c
+++ b/macosx/tclMacOSXNotify.c
@@ -239,7 +239,7 @@ static OSSpinLock notifierLock = SPINLOCK_INIT;
#define SpinLockLockDbg(p) \
if (!SpinLockTry(p)) { \
- Tcl_WideInt s = TclpGetWideClicks(), e; \
+ long long s = TclpGetWideClicks(), e; \
\
SpinLockLock(p); \
e = TclpGetWideClicks(); \
diff --git a/tests/fCmd.test b/tests/fCmd.test
index 1486a6b..6a909f8 100644
--- a/tests/fCmd.test
+++ b/tests/fCmd.test
@@ -22,8 +22,6 @@ cd [temporaryDirectory]
testConstraint testsetplatform [llength [info commands testsetplatform]]
testConstraint testchmod [llength [info commands testchmod]]
-testConstraint winVista 0
-testConstraint winXP 0
testConstraint winLessThan10 0
# Don't know how to determine this constraint correctly
testConstraint notNetworkFilesystem 0
@@ -66,17 +64,8 @@ if {[testConstraint unix]} {
}
# Also used in winFCmd...
-if {[testConstraint win]} {
- if {$::tcl_platform(osVersion) >= 5.0} {
- if {$::tcl_platform(osVersion) < 10.0} {
- testConstraint winLessThan10 1
- }
- if {$::tcl_platform(osVersion) >= 6.0} {
- testConstraint winVista 1
- } else {
- testConstraint win2000orXP 1
- }
- }
+if {[testConstraint win] && $::tcl_platform(osVersion) < 10.0} {
+ testConstraint winLessThan10 1
}
testConstraint darwin9 [expr {
@@ -795,18 +784,7 @@ test fCmd-9.3 {file rename: comprehensive: file to new name} -setup {
file rename tf2 tf4
list [lsort [glob tf*]] [file writable tf3] [file writable tf4]
} -result {{tf3 tf4} 1 0}
-test fCmd-9.4.a {file rename: comprehensive: dir to new name} -setup {
- cleanup
-} -constraints {win winXP testchmod} -body {
- file mkdir td1 td2
- testchmod 0o555 td2
- file rename td1 td3
- file rename td2 td4
- list [lsort [glob td*]] [file writable td3] [file writable td4]
-} -cleanup {
- cleanup
-} -result {{td3 td4} 1 0}
-test fCmd-9.4.b {file rename: comprehensive: dir to new name} -setup {
+test fCmd-9.4 {file rename: comprehensive: dir to new name} -setup {
cleanup
} -constraints {unix notRoot testchmod notDarwin9} -body {
file mkdir td1 td2
@@ -827,17 +805,7 @@ test fCmd-9.5 {file rename: comprehensive: file to self} -setup {
file rename -force tf2 tf2
list [contents tf1] [contents tf2] [file writable tf1] [file writable tf2]
} -result {tf1 tf2 1 0}
-test fCmd-9.6.a {file rename: comprehensive: dir to self} -setup {
- cleanup
-} -constraints {win winXP testchmod} -body {
- file mkdir td1
- file mkdir td2
- testchmod 0o555 td2
- file rename -force td1 .
- file rename -force td2 .
- list [lsort [glob td*]] [file writable td1] [file writable td2]
-} -result {{td1 td2} 1 0}
-test fCmd-9.6.b {file rename: comprehensive: dir to self} -setup {
+test fCmd-9.6 {file rename: comprehensive: dir to self} -setup {
cleanup
} -constraints {unix notRoot testchmod} -body {
file mkdir td1
@@ -915,16 +883,9 @@ test fCmd-9.9 {file rename: comprehensive: dir to non-empty dir} -setup {
file mkdir tds2
file mkdir [file join tdd1 tds1 xxx]
file mkdir [file join tdd2 tds2 xxx]
- if {!([testConstraint unix] || [testConstraint winVista])} {
- testchmod 0o555 tds2
- }
set a1 [list [catch {file rename -force tds1 tdd1} msg] $msg]
set a2 [list [catch {file rename -force tds2 tdd2} msg] $msg]
- if {[testConstraint unix] || [testConstraint winVista]} {
- set w2 0
- } else {
- set w2 [file writable tds2]
- }
+ set w2 0
list [lsort [glob td*]] $a1 $a2 [file writable tds1] $w2
} -match glob -result \
[subst {{tdd1 tdd2 tds1 tds2} {1 {error renaming "tds1" to "[file join tdd1 tds1]": file *}} {1 {error renaming "tds2" to "[file join tdd2 tds2]": file *}} 1 0}]
@@ -946,16 +907,9 @@ test fCmd-9.11 {file rename: comprehensive: dir to new name and dir} -setup {
file mkdir td1
file mkdir td2
file mkdir td3
- if {!([testConstraint unix] || [testConstraint winVista])} {
- testchmod 0o555 td2
- }
file rename td1 [file join td3 td3]
file rename td2 [file join td3 td4]
- if {[testConstraint unix] || [testConstraint winVista]} {
- set w4 0
- } else {
- set w4 [file writable [file join td3 td4]]
- }
+ set w4 0
list [lsort [glob td*]] [lsort [glob -directory td3 t*]] \
[file writable [file join td3 td3]] $w4
} -result [subst {td3 {[file join td3 td3] [file join td3 td4]} 1 0}]
diff --git a/tests/winFCmd.test b/tests/winFCmd.test
index c60952a..d118725 100644
--- a/tests/winFCmd.test
+++ b/tests/winFCmd.test
@@ -20,8 +20,6 @@ catch [list package require -exact tcl::test [info patchlevel]]
# Initialise the test constraints
-testConstraint winVista 0
-testConstraint winXP 0
testConstraint testvolumetype [llength [info commands testvolumetype]]
testConstraint testfile [llength [info commands testfile]]
testConstraint testchmod [llength [info commands testchmod]]
@@ -59,14 +57,6 @@ proc cleanup {args} {
}
}
-if {[testConstraint win]} {
- if {$::tcl_platform(osVersion) >= 5.0} {
- testConstraint winVista 1
- } else {
- testConstraint winXP 1
- }
-}
-
# find a CD-ROM so we can test read-only filesystems.
proc findfile {dir} {
@@ -206,11 +196,6 @@ test winFCmd-1.12 {TclpRenameFile: errno: EACCES} -setup {
} -cleanup {
catch {close $fd}
} -returnCodes error -result EACCES
-test winFCmd-1.13 {TclpRenameFile: errno: EACCES} -setup {
- cleanup
-} -constraints {win winXP testfile} -body {
- testfile mv nul tf1
-} -returnCodes error -result EINVAL
test winFCmd-1.15 {TclpRenameFile: errno: EEXIST} -setup {
cleanup
} -constraints {win testfile} -body {
@@ -234,11 +219,6 @@ test winFCmd-1.18 {TclpRenameFile: srcAttr == -1} -setup {
} -constraints {win testfile} -body {
testfile mv tf1 tf2
} -returnCodes error -result ENOENT
-test winFCmd-1.19 {TclpRenameFile: errno == EACCES} -setup {
- cleanup
-} -constraints {win winXP testfile} -body {
- testfile mv nul tf1
-} -returnCodes error -result EINVAL
test winFCmd-1.20 {TclpRenameFile: src is dir} -setup {
cleanup
} -constraints {win testfile} -body {
@@ -447,11 +427,6 @@ test winFCmd-2.6 {TclpCopyFile: errno: ENOENT} -setup {
} -cleanup {
cleanup
} -returnCodes error -result ENOENT
-test winFCmd-2.7 {TclpCopyFile: errno: EACCES} -setup {
- cleanup
-} -constraints {win winXP testfile} -body {
- testfile cp nul tf1
-} -returnCodes error -result EINVAL
test winFCmd-2.10 {TclpCopyFile: CopyFile succeeds} -setup {
cleanup
} -constraints {win testfile} -body {
@@ -642,7 +617,7 @@ test winFCmd-5.1 {TclpCopyDirectory: calls TraverseWinTree} -setup {
test winFCmd-6.1 {TclpRemoveDirectory: errno: EACCES} -setup {
cleanup
-} -constraints {winVista testfile testchmod knownMsvcBug notInCIenv} -body {
+} -constraints {win testfile testchmod knownMsvcBug notInCIenv} -body {
file mkdir td1
testchmod 0 td1
testfile rmdir td1
@@ -696,7 +671,7 @@ test winFCmd-6.8 {TclpRemoveDirectory: RemoveDirectory fails} -setup {
} -result {1 {tf1 ENOTDIR}}
test winFCmd-6.9 {TclpRemoveDirectory: errno == EACCES} -setup {
cleanup
-} -constraints {winVista testfile testchmod knownMsvcBug notInCIenv} -body {
+} -constraints {win testfile testchmod knownMsvcBug notInCIenv} -body {
file mkdir td1
testchmod 0 td1
testfile rmdir td1
@@ -714,7 +689,7 @@ test winFCmd-6.11 {TclpRemoveDirectory: attr == -1} -setup {
} -returnCodes error -match regexp -result {^/ E(ACCES|EXIST)$}
test winFCmd-6.13 {TclpRemoveDirectory: write-protected} -setup {
cleanup
-} -constraints {winVista testfile testchmod knownMsvcBug notInCIenv} -body {
+} -constraints {win testfile testchmod knownMsvcBug notInCIenv} -body {
file mkdir td1
testchmod 0 td1
testfile rmdir td1
@@ -943,7 +918,7 @@ test winFCmd-9.1 {TraversalDelete: DOTREE_F} -setup {
} -result {}
test winFCmd-9.3 {TraversalDelete: DOTREE_PRED} -setup {
cleanup
-} -constraints {winVista testfile testchmod knownMsvcBug notInCIenv} -body {
+} -constraints {win testfile testchmod knownMsvcBug notInCIenv} -body {
file mkdir td1/td2
testchmod 0 td1
testfile rmdir -force td1
@@ -1056,15 +1031,7 @@ test winFCmd-12.4 {ConvertFileNameFormat} -constraints {win} -setup {
test winFCmd-12.5 {ConvertFileNameFormat: absolute path} -body {
list [file attributes / -longname] [file attributes \\ -longname]
} -constraints {win} -result {/ /}
-test winFCmd-12.6 {ConvertFileNameFormat: absolute path with drive} -setup {
- catch {file delete -force -- c:/TclTmpC.1}
-} -constraints {win winXP} -body {
- createfile c:/TclTmpC.1 {}
- string tolower [file attributes c:/TclTmpC.1 -longname]
-} -cleanup {
- file delete -force -- c:/TclTmpC.1
-} -result [string tolower {c:/TclTmpC.1}]
-test winFCmd-12.6.2 {ConvertFileNameFormat: absolute path with drive (in temp folder)} -setup {
+test winFCmd-12.6 {ConvertFileNameFormat: absolute path with drive (in temp folder)} -setup {
catch {file delete -force -- $::env(TEMP)/td1}
} -constraints {win} -body {
createfile $::env(TEMP)/td1 {}
diff --git a/unix/configure b/unix/configure
index 6fcce60..ada75a6 100755
--- a/unix/configure
+++ b/unix/configure
@@ -5585,7 +5585,7 @@ then :
*++|*++-*)
;;
*)
- CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers -Wdeclaration-after-statement"
+ CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers"
;;
esac
@@ -7206,7 +7206,7 @@ then :
Darwin-*) ;;
IRIX*) ;;
Linux*|GNU*) ;;
- NetBSD-*|OpenBSD-*) ;;
+ NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;;
OSF1-V*) ;;
SCO_SV-3.2*) ;;
*) SHLIB_CFLAGS="-fPIC" ;;
@@ -7621,26 +7621,7 @@ then :
else $as_nop
tcl_cv_type_64bit=none
- # See if the compiler knows natively about __int64
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main (void)
-{
-__int64 value = (__int64) 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- tcl_type_64bit=__int64
-else $as_nop
- tcl_type_64bit="long long"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- # See if we should use long anyway Note that we substitute in the
+ # See if we could use long anyway Note that we substitute in the
# type that is our current guess for a 64-bit type inside this check
# program, so it should be modified only carefully...
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7650,7 +7631,7 @@ int
main (void)
{
switch (0) {
- case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
+ case 1: case (sizeof(long long)==sizeof(long)): ;
}
;
return 0;
@@ -7658,7 +7639,7 @@ switch (0) {
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
- tcl_cv_type_64bit=${tcl_type_64bit}
+ tcl_cv_type_64bit="long long"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
@@ -7670,12 +7651,6 @@ printf "%s\n" "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
-
-printf "%s\n" "#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}" >>confdefs.h
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5
-printf "%s\n" "${tcl_cv_type_64bit}" >&6; }
-
# Now check for auxiliary declarations
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
printf %s "checking for struct dirent64... " >&6; }
@@ -9244,14 +9219,6 @@ then :
fi
-# Obsolete code to be removed.
-if test $ac_cv_header_sys_time_h = yes; then
-
-printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-
-fi
-# End of obsolete code.
-
ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
if test "x$ac_cv_func_gmtime_r" = xyes
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 3f31cd9..5472e54 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -768,6 +768,7 @@ AC_DEFUN([SC_CONFIG_MANPAGES], [
# Defines the following var:
#
# system - System/platform/version identification code.
+#
#--------------------------------------------------------------------
AC_DEFUN([SC_CONFIG_SYSTEM], [
@@ -964,7 +965,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
*++|*++-*)
;;
*)
- CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers -Wdeclaration-after-statement"
+ CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers"
;;
esac
@@ -1446,7 +1447,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
tcl_cv_ld_search_paths_first, [
hold_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;]])],[tcl_cv_ld_search_paths_first=yes],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;]])],
+ [tcl_cv_ld_search_paths_first=yes],
[tcl_cv_ld_search_paths_first=no])
LDFLAGS=$hold_ldflags])
AS_IF([test $tcl_cv_ld_search_paths_first = yes], [
@@ -1784,7 +1786,7 @@ dnl # preprocessing tests use only CPPFLAGS.
Darwin-*) ;;
IRIX*) ;;
Linux*|GNU*) ;;
- NetBSD-*|OpenBSD-*) ;;
+ NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;;
OSF1-V*) ;;
SCO_SV-3.2*) ;;
*) SHLIB_CFLAGS="-fPIC" ;;
@@ -2115,20 +2117,7 @@ AC_DEFUN([SC_BLOCKING_STYLE], [
AC_DEFUN([SC_TIME_HANDLER], [
AC_CHECK_HEADERS(sys/time.h)
- m4_warn([obsolete],
-[Update your code to rely only on HAVE_SYS_TIME_H,
-then remove this warning and the obsolete code below it.
-All current systems provide time.h; it need not be checked for.
-Not all systems provide sys/time.h, but those that do, all allow
-you to include it and time.h simultaneously.])dnl
-AC_CHECK_HEADERS_ONCE([sys/time.h])
-# Obsolete code to be removed.
-if test $ac_cv_header_sys_time_h = yes; then
- AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
- and <time.h>. This macro is obsolete.])
-fi
-# End of obsolete code.
-
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
AC_CHECK_FUNCS(gmtime_r localtime_r mktime)
@@ -2363,7 +2352,6 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[
#
# Might define the following vars:
# TCL_WIDE_INT_IS_LONG
-# TCL_WIDE_INT_TYPE
# HAVE_STRUCT_DIRENT64, HAVE_DIR64
# HAVE_STRUCT_STAT64
# HAVE_TYPE_OFF64_T
@@ -2374,23 +2362,16 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
AC_MSG_CHECKING([for 64-bit integer type])
AC_CACHE_VAL(tcl_cv_type_64bit,[
tcl_cv_type_64bit=none
- # See if the compiler knows natively about __int64
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[__int64 value = (__int64) 0;]])],
- [tcl_type_64bit=__int64], [tcl_type_64bit="long long"])
- # See if we should use long anyway Note that we substitute in the
+ # See if we could use long anyway Note that we substitute in the
# type that is our current guess for a 64-bit type inside this check
# program, so it should be modified only carefully...
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[switch (0) {
- case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
- }]])],[tcl_cv_type_64bit=${tcl_type_64bit}],[])])
+ case 1: case (sizeof(long long)==sizeof(long)): ;
+ }]])],[tcl_cv_type_64bit="long long"],[])])
if test "${tcl_cv_type_64bit}" = none ; then
AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Do 'long' and 'long long' have the same size (64-bit)?])
AC_MSG_RESULT([yes])
else
- AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit},
- [What type should be used to define wide integers?])
- AC_MSG_RESULT([${tcl_cv_type_64bit}])
-
# Now check for auxiliary declarations
AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in
index 0767609..6a61bd0 100644
--- a/unix/tclConfig.h.in
+++ b/unix/tclConfig.h.in
@@ -438,16 +438,9 @@
/* Do 'long' and 'long long' have the same size (64-bit)? */
#undef TCL_WIDE_INT_IS_LONG
-/* What type should be used to define wide integers? */
-#undef TCL_WIDE_INT_TYPE
-
/* Tcl with external libtommath */
#undef TCL_WITH_EXTERNAL_TOMMATH
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
- macro is obsolete. */
-#undef TIME_WITH_SYS_TIME
-
/* Is getcwd Posix-compliant? */
#undef USEGETWD
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 03e9f2d..f7b6b2b 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -129,9 +129,9 @@ static int FileInputProc(void *instanceData, char *buf,
static int FileOutputProc(void *instanceData,
const char *buf, int toWrite, int *errorCode);
static int FileTruncateProc(void *instanceData,
- Tcl_WideInt length);
-static Tcl_WideInt FileWideSeekProc(void *instanceData,
- Tcl_WideInt offset, int mode, int *errorCode);
+ long long length);
+static long long FileWideSeekProc(void *instanceData,
+ long long offset, int mode, int *errorCode);
static void FileWatchProc(void *instanceData, int mask);
#ifdef SUPPORTS_TTY
static int TtyCloseProc(void *instanceData,
@@ -440,16 +440,16 @@ TtyCloseProc(
*----------------------------------------------------------------------
*/
-static Tcl_WideInt
+static long long
FileWideSeekProc(
void *instanceData, /* File state. */
- Tcl_WideInt offset, /* Offset to seek to. */
+ long long offset, /* Offset to seek to. */
int mode, /* Relative to where should we seek? Can be
* one of SEEK_START, SEEK_CUR or SEEK_END. */
int *errorCodePtr) /* To store error code. */
{
FileState *fsPtr = (FileState *)instanceData;
- Tcl_WideInt newLoc;
+ long long newLoc;
newLoc = TclOSseek(fsPtr->fd, (Tcl_SeekOffset) offset, mode);
@@ -1973,7 +1973,7 @@ Tcl_GetOpenFile(
static int
FileTruncateProc(
void *instanceData,
- Tcl_WideInt length)
+ long long length)
{
FileState *fsPtr = (FileState *)instanceData;
int result;
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index 77426c8..cefe603 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -139,16 +139,10 @@ extern "C" {
# include <sys/select.h>
#endif
#include <sys/stat.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
-#else
-# include <time.h>
-#endif
#endif
+#include <time.h>
#ifndef NO_SYS_WAIT_H
# include <sys/wait.h>
#endif
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index 9d56709..dc48a32 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -72,13 +72,13 @@ TclpGetSeconds(void)
*----------------------------------------------------------------------
*/
-Tcl_WideInt
+long long
TclpGetMicroseconds(void)
{
Tcl_Time time;
tclGetTimeProcPtr(&time, tclTimeClientData);
- return ((Tcl_WideInt)time.sec)*1000000 + time.usec;
+ return ((long long)time.sec)*1000000 + time.usec;
}
/*
@@ -149,19 +149,19 @@ TclpGetClicks(void)
*----------------------------------------------------------------------
*/
-Tcl_WideInt
+long long
TclpGetWideClicks(void)
{
- Tcl_WideInt now;
+ long long now;
if (tclGetTimeProcPtr != NativeGetTime) {
Tcl_Time time;
tclGetTimeProcPtr(&time, tclTimeClientData);
- now = ((Tcl_WideInt)time.sec)*1000000 + time.usec;
+ now = ((long long)time.sec)*1000000 + time.usec;
} else {
#ifdef MAC_OSX_TCL
- now = (Tcl_WideInt) (mach_absolute_time() & INT64_MAX);
+ now = (long long) (mach_absolute_time() & INT64_MAX);
#else
#error Wide high-resolution clicks not implemented on this platform
#endif
@@ -189,7 +189,7 @@ TclpGetWideClicks(void)
double
TclpWideClicksToNanoseconds(
- Tcl_WideInt clicks)
+ long long clicks)
{
double nsec;
diff --git a/win/configure b/win/configure
index 49c195b..dc7155b 100755
--- a/win/configure
+++ b/win/configure
@@ -4338,7 +4338,7 @@ printf "%s\n" "using shared flags" >&6; }
CFLAGS_WARNING="${CFLAGS_WARNING} -Wno-format"
;;
*)
- CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers -Wdeclaration-after-statement"
+ CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers"
;;
esac
@@ -4399,9 +4399,9 @@ else $as_nop
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
if test "$tcl_win_64bit" = "yes" ; then
- do64bit=amd64
- MACHINE="AMD64"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5
+ do64bit=amd64
+ MACHINE="AMD64"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5
printf "%s\n" " Using 64-bit $MACHINE mode" >&6; }
fi
;;
diff --git a/win/configure.ac b/win/configure.ac
index c38ac85..ae970a6 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -463,7 +463,7 @@ AC_SUBST(RC_DEFINE)
AC_SUBST(RC_DEFINES)
AC_SUBST(RES)
-AC_CONFIG_FILES(Makefile tclConfig.sh tclsh.exe.manifest)
+AC_CONFIG_FILES([Makefile tclConfig.sh tclsh.exe.manifest])
AC_OUTPUT
dnl Local Variables:
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index 7536ede..972e8b9 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -19,15 +19,6 @@
#include <stdio.h>
#include <math.h>
-/*
- * This library is required for x64 builds with _some_ versions of MSVC
- */
-#if defined(_M_IA64) || defined(_M_AMD64)
-#if _MSC_VER >= 1400 && _MSC_VER < 1500
-#pragma comment(lib, "bufferoverflowU")
-#endif
-#endif
-
/* ISO hack for dumb VC++ */
#ifdef _MSC_VER
#define snprintf _snprintf
diff --git a/win/tcl.m4 b/win/tcl.m4
index 1ecfa7d..b353898 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -673,7 +673,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_WARNING="${CFLAGS_WARNING} -Wno-format"
;;
*)
- CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers -Wdeclaration-after-statement"
+ CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers"
;;
esac
@@ -717,9 +717,9 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
[tcl_win_64bit=no]
)
if test "$tcl_win_64bit" = "yes" ; then
- do64bit=amd64
- MACHINE="AMD64"
- AC_MSG_RESULT([ Using 64-bit $MACHINE mode])
+ do64bit=amd64
+ MACHINE="AMD64"
+ AC_MSG_RESULT([ Using 64-bit $MACHINE mode])
fi
;;
esac
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index 8f32e61..752bf8e 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -25,14 +25,6 @@
static HINSTANCE hInstance; /* HINSTANCE of this DLL. */
/*
- * VC++ 5.x has no 'cpuid' assembler instruction, so we must emulate it
- */
-
-#if defined(_MSC_VER) && (_MSC_VER <= 1100) && defined (_M_IX86)
-#define cpuid __asm __emit 0fh __asm __emit 0a2h
-#endif
-
-/*
* The following declaration is for the VC++ DLL entry point.
*/
@@ -185,12 +177,12 @@ TclWinInit(
GetVersionExW(&os);
/*
- * We no longer support Win32s or Win9x or Windows CE, so just in case
- * someone manages to get a runtime there, make sure they know that.
+ * We no longer support Win32s or Win9x or Windows CE or Windows XP, so just
+ * in case someone manages to get a runtime there, make sure they know that.
*/
if (os.dwPlatformId != VER_PLATFORM_WIN32_NT) {
- Tcl_Panic("Windows NT is the only supported platform");
+ Tcl_Panic("Windows 7 is the minimum supported platform");
}
}
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index 48f25e7..e8b3051 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -85,14 +85,14 @@ static int FileInputProc(ClientData instanceData, char *buf,
int toRead, int *errorCode);
static int FileOutputProc(ClientData instanceData,
const char *buf, int toWrite, int *errorCode);
-static Tcl_WideInt FileWideSeekProc(ClientData instanceData,
- Tcl_WideInt offset, int mode, int *errorCode);
+static long long FileWideSeekProc(ClientData instanceData,
+ long long offset, int mode, int *errorCode);
static void FileSetupProc(ClientData clientData, int flags);
static void FileWatchProc(ClientData instanceData, int mask);
static void FileThreadActionProc(ClientData instanceData,
int action);
static int FileTruncateProc(ClientData instanceData,
- Tcl_WideInt length);
+ long long length);
static DWORD FileGetType(HANDLE handle);
static int NativeIsComPort(const WCHAR *nativeName);
@@ -459,10 +459,10 @@ FileCloseProc(
*----------------------------------------------------------------------
*/
-static Tcl_WideInt
+static long long
FileWideSeekProc(
ClientData instanceData, /* File state. */
- Tcl_WideInt offset, /* Offset to seek to. */
+ long long offset, /* Offset to seek to. */
int mode, /* Relative to where should we seek? */
int *errorCodePtr) /* To store error code. */
{
@@ -491,8 +491,8 @@ FileWideSeekProc(
return -1;
}
}
- return (((Tcl_WideInt)((unsigned)newPos))
- | ((Tcl_WideInt)newPosHigh << 32));
+ return (((long long)((unsigned)newPos))
+ | ((long long)newPosHigh << 32));
}
/*
@@ -514,7 +514,7 @@ FileWideSeekProc(
static int
FileTruncateProc(
ClientData instanceData, /* File state. */
- Tcl_WideInt length) /* Length to truncate at. */
+ long long length) /* Length to truncate at. */
{
FileInfo *infoPtr = (FileInfo *)instanceData;
LONG newPos, newPosHigh, oldPos, oldPosHigh;
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index d843b51..fbd49dc 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -29,7 +29,7 @@
*/
#define POSIX_EPOCH_AS_FILETIME \
- ((Tcl_WideInt) 116444736 * (Tcl_WideInt) 1000000000)
+ ((long long) 116444736 * (long long) 1000000000)
/*
* Declarations for 'link' related information. This information should come
@@ -264,12 +264,7 @@ WinLink(
TclWinConvertError(GetLastError());
} else if (linkAction & TCL_CREATE_SYMBOLIC_LINK) {
- if (!tclWinProcs.createSymbolicLink) {
- /*
- * Can't symlink files.
- */
- Tcl_SetErrno(EINVAL);
- } else if (tclWinProcs.createSymbolicLink(linkSourcePath, linkTargetPath,
+ if (CreateSymbolicLinkW(linkSourcePath, linkTargetPath,
0x2 /* SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE */)) {
/*
* Success!
@@ -2088,8 +2083,8 @@ NativeStat(
statPtr->st_ctime = ToCTime(data.ftCreationTime);
}
attr = data.dwFileAttributes;
- statPtr->st_size = ((Tcl_WideInt) data.nFileSizeLow) |
- (((Tcl_WideInt) data.nFileSizeHigh) << 32);
+ statPtr->st_size = ((long long) data.nFileSizeLow) |
+ (((long long) data.nFileSizeHigh) << 32);
/*
* On Unix, for directories, nlink apparently depends on the number of
@@ -2136,8 +2131,8 @@ NativeStat(
attr = data.dwFileAttributes;
- statPtr->st_size = ((Tcl_WideInt) data.nFileSizeLow) |
- (((Tcl_WideInt) data.nFileSizeHigh) << 32);
+ statPtr->st_size = ((long long) data.nFileSizeLow) |
+ (((long long) data.nFileSizeHigh) << 32);
statPtr->st_atime = ToCTime(data.ftLastAccessTime);
statPtr->st_mtime = ToCTime(data.ftLastWriteTime);
statPtr->st_ctime = ToCTime(data.ftCreationTime);
@@ -2299,7 +2294,7 @@ ToCTime(
convertedTime.HighPart = (LONG) fileTime.dwHighDateTime;
return (__time64_t) ((convertedTime.QuadPart -
- (Tcl_WideInt) POSIX_EPOCH_AS_FILETIME) / (Tcl_WideInt) 10000000);
+ (long long) POSIX_EPOCH_AS_FILETIME) / (long long) 10000000);
}
/*
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 7a4208f..e67e0cb 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -78,11 +78,6 @@ typedef struct {
/*
- * Windows version dependend functions
- */
-TclWinProcs tclWinProcs;
-
-/*
* The following arrays contain the human readable strings for the
* processor values.
*/
@@ -131,7 +126,6 @@ TclpInitPlatform(void)
{
WSADATA wsaData;
WORD wVersionRequested = MAKEWORD(2, 2);
- HMODULE handle;
tclPlatform = TCL_PLATFORM_WINDOWS;
@@ -150,17 +144,6 @@ TclpInitPlatform(void)
TclWinInit(GetModuleHandleW(NULL));
#endif
-
- /*
- * Fill available functions depending on windows version
- */
- handle = GetModuleHandleW(L"KERNEL32");
- tclWinProcs.cancelSynchronousIo =
- (BOOL (WINAPI *)(HANDLE))(void *)GetProcAddress(handle,
- "CancelSynchronousIo");
- tclWinProcs.createSymbolicLink =
- (BOOLEAN (WINAPI *)(LPCWSTR, LPCWSTR, DWORD))(void *)GetProcAddress(handle,
- "CreateSymbolicLinkW");
}
/*
diff --git a/win/tclWinInt.h b/win/tclWinInt.h
index 1a9c62b..d3d6680 100644
--- a/win/tclWinInt.h
+++ b/win/tclWinInt.h
@@ -32,16 +32,6 @@ typedef struct TCLEXCEPTION_REGISTRATION {
#endif
/*
- * Windows version dependend functions
- */
-typedef struct TclWinProcs {
- BOOL (WINAPI *cancelSynchronousIo)(HANDLE);
- BOOLEAN (WINAPI *createSymbolicLink)(LPCWSTR, LPCWSTR, DWORD);
-} TclWinProcs;
-
-MODULE_SCOPE TclWinProcs tclWinProcs;
-
-/*
* Declarations of functions that are not accessible by way of the
* stubs table.
*/
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index 2dc0bc9..5971b81 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -3575,9 +3575,7 @@ TclPipeThreadStop(
* Cancel all sync-IO of this thread (may be blocked there).
*/
- if (tclWinProcs.cancelSynchronousIo) {
- tclWinProcs.cancelSynchronousIo(hThread);
- }
+ CancelSynchronousIo(hThread);
/*
* Wait at most 20 milliseconds for the reader thread to close
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index 78559f5..cf530b4 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -26,14 +26,14 @@
/*
* We must specify the lower version we intend to support.
*
- * WINVER = 0x0501 means Windows XP and above
+ * WINVER = 0x0601 means Windows 7 and above
*/
#ifndef WINVER
-# define WINVER 0x0501
+# define WINVER 0x0601
#endif
#ifndef _WIN32_WINNT
-# define _WIN32_WINNT 0x0501
+# define _WIN32_WINNT 0x0601
#endif
#define WIN32_LEAN_AND_MEAN
@@ -111,11 +111,7 @@ typedef DWORD_PTR * PDWORD_PTR;
#ifndef __MWERKS__
#include <sys/stat.h>
#include <sys/timeb.h>
-# ifdef __BORLANDC__
-# include <utime.h>
-# else
-# include <sys/utime.h>
-# endif /* __BORLANDC__ */
+#include <sys/utime.h>
#endif /* __MWERKS__ */
/*
@@ -454,47 +450,21 @@ typedef DWORD_PTR * PDWORD_PTR;
#if defined(_MSC_VER) || defined(__MSVCRT__)
# define environ _environ
-# if defined(_MSC_VER) && (_MSC_VER < 1600)
-# define hypot _hypot
-# endif
# define exception _exception
# undef EDEADLOCK
-# if defined(_MSC_VER) && (_MSC_VER >= 1700)
+# if defined(_MSC_VER)
# define timezone _timezone
# endif
#endif /* _MSC_VER || __MSVCRT__ */
-/*
- * Borland's timezone and environ functions.
- */
-
-#ifdef __BORLANDC__
-# define timezone _timezone
-# define environ _environ
-#endif /* __BORLANDC__ */
-
-#ifdef __WATCOMC__
-# if !defined(__CHAR_SIGNED__)
-# error "You must use the -j switch to ensure char is signed."
-# endif
-#endif
-
-
-/*
- * MSVC 8.0 started to mark many standard C library functions depreciated
- * including the *printf family and others. Tell it to shut up.
- * (_MSC_VER is 1200 for VC6, 1300 or 1310 for vc7.net, 1400 for 8.0)
- */
#if defined(_MSC_VER)
# pragma warning(disable:4146)
# pragma warning(disable:4244)
#if !defined(_WIN64)
# pragma warning(disable:4305)
#endif
-# if _MSC_VER >= 1400
-# pragma warning(disable:4267)
-# pragma warning(disable:4996)
-# endif
+# pragma warning(disable:4267)
+# pragma warning(disable:4996)
#endif
/*
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index d86a3c5..0bffe21 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -222,7 +222,7 @@ TclpThreadCreate(
* on WIN64 sizeof void* != sizeof unsigned
*/
-#if defined(_MSC_VER) || defined(__MSVCRT__) || defined(__BORLANDC__)
+#if defined(_MSC_VER) || defined(__MSVCRT__)
tHandle = (HANDLE) _beginthreadex(NULL, (unsigned) stackSize,
(Tcl_ThreadCreateProc*) TclWinThreadStart, winThreadPtr,
0, (unsigned *)idPtr);
@@ -300,7 +300,7 @@ TclpThreadExit(
TclSignalExitThread(Tcl_GetCurrentThread(), status);
LeaveCriticalSection(&joinLock);
-#if defined(_MSC_VER) || defined(__MSVCRT__) || defined(__BORLANDC__)
+#if defined(_MSC_VER) || defined(__MSVCRT__)
_endthreadex((unsigned) status);
#else
ExitThread((DWORD) status);
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index 7f35a97..3c52451 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -58,9 +58,9 @@ typedef struct {
* Data used in developing the estimate of performance counter frequency
*/
- Tcl_WideUInt fileTimeSample[SAMPLES];
+ unsigned long long fileTimeSample[SAMPLES];
/* Last 64 samples of system time. */
- Tcl_WideInt perfCounterSample[SAMPLES];
+ long long perfCounterSample[SAMPLES];
/* Last 64 samples of performance counter. */
int sampleNo; /* Current sample number. */
} TimeInfo;
@@ -74,11 +74,11 @@ static TimeInfo timeInfo = {
(HANDLE) NULL,
(HANDLE) NULL,
#if defined(HAVE_CAST_TO_UNION) && !defined(__cplusplus)
- (LARGE_INTEGER) (Tcl_WideInt) 0,
+ (LARGE_INTEGER) (long long) 0,
(ULARGE_INTEGER) (DWORDLONG) 0,
- (LARGE_INTEGER) (Tcl_WideInt) 0,
- (LARGE_INTEGER) (Tcl_WideInt) 0,
- (LARGE_INTEGER) (Tcl_WideInt) 0,
+ (LARGE_INTEGER) (long long) 0,
+ (LARGE_INTEGER) (long long) 0,
+ (LARGE_INTEGER) (long long) 0,
#else
{0, 0},
{0, 0},
@@ -109,13 +109,13 @@ static struct {
static void StopCalibration(ClientData clientData);
static DWORD WINAPI CalibrationThread(LPVOID arg);
static void UpdateTimeEachSecond(void);
-static void ResetCounterSamples(Tcl_WideUInt fileTime,
- Tcl_WideInt perfCounter, Tcl_WideInt perfFreq);
-static Tcl_WideInt AccumulateSample(Tcl_WideInt perfCounter,
- Tcl_WideUInt fileTime);
+static void ResetCounterSamples(unsigned long long fileTime,
+ long long perfCounter, long long perfFreq);
+static long long AccumulateSample(long long perfCounter,
+ unsigned long long fileTime);
static void NativeScaleTime(Tcl_Time* timebuf,
ClientData clientData);
-static Tcl_WideInt NativeGetMicroseconds(void);
+static long long NativeGetMicroseconds(void);
static void NativeGetTime(Tcl_Time* timebuf,
ClientData clientData);
@@ -147,7 +147,7 @@ ClientData tclTimeClientData = NULL;
Tcl_WideUInt
TclpGetSeconds(void)
{
- Tcl_WideInt usecSincePosixEpoch;
+ long long usecSincePosixEpoch;
/* Try to use high resolution timer */
if ( tclGetTimeProcPtr == NativeGetTime
@@ -184,7 +184,7 @@ TclpGetSeconds(void)
Tcl_WideUInt
TclpGetClicks(void)
{
- Tcl_WideInt usecSincePosixEpoch;
+ long long usecSincePosixEpoch;
/* Try to use high resolution timer */
if ( tclGetTimeProcPtr == NativeGetTime
@@ -223,7 +223,7 @@ TclpGetClicks(void)
*----------------------------------------------------------------------
*/
-Tcl_WideInt
+long long
TclpGetWideClicks(void)
{
LARGE_INTEGER curCounter;
@@ -249,7 +249,7 @@ TclpGetWideClicks(void)
}
if (wideClick.perfCounter) {
if (QueryPerformanceCounter(&curCounter)) {
- return (Tcl_WideInt)curCounter.QuadPart;
+ return (long long)curCounter.QuadPart;
}
/* fallback using microseconds */
wideClick.perfCounter = 0;
@@ -304,10 +304,10 @@ TclpWideClickInMicrosec(void)
*----------------------------------------------------------------------
*/
-Tcl_WideInt
+long long
TclpGetMicroseconds(void)
{
- Tcl_WideInt usecSincePosixEpoch;
+ long long usecSincePosixEpoch;
/* Try to use high resolution timer */
if ( tclGetTimeProcPtr == NativeGetTime
@@ -323,7 +323,7 @@ TclpGetMicroseconds(void)
Tcl_Time now;
tclGetTimeProcPtr(&now, tclTimeClientData); /* Tcl_GetTime inlined */
- return (((Tcl_WideInt)now.sec) * 1000000) + now.usec;
+ return (((long long)now.sec) * 1000000) + now.usec;
}
}
@@ -353,7 +353,7 @@ void
Tcl_GetTime(
Tcl_Time *timePtr) /* Location to store time information. */
{
- Tcl_WideInt usecSincePosixEpoch;
+ long long usecSincePosixEpoch;
/* Try to use high resolution timer */
if ( tclGetTimeProcPtr == NativeGetTime
@@ -416,7 +416,7 @@ NativeScaleTime(
*----------------------------------------------------------------------
*/
-static inline Tcl_WideInt
+static inline long long
NativeCalc100NsTicks(
ULONGLONG fileTimeLastCall,
LONGLONG perfCounterLastCall,
@@ -427,7 +427,7 @@ NativeCalc100NsTicks(
((curCounter - perfCounterLastCall) * 10000000 / curCounterFreq);
}
-static Tcl_WideInt
+static long long
NativeGetMicroseconds(void)
{
/*
@@ -479,10 +479,10 @@ NativeGetMicroseconds(void)
/*
* The following lines would do an exact match on crystal
* frequency:
- * && timeInfo.nominalFreq.QuadPart != (Tcl_WideInt)1193182
- * && timeInfo.nominalFreq.QuadPart != (Tcl_WideInt)3579545
+ * && timeInfo.nominalFreq.QuadPart != (long long)1193182
+ * && timeInfo.nominalFreq.QuadPart != (long long)3579545
*/
- && timeInfo.nominalFreq.QuadPart > (Tcl_WideInt) 15000000){
+ && timeInfo.nominalFreq.QuadPart > (long long) 15000000){
/*
* As an exception, if every logical processor on the system
* is on the same chip, we use the performance counter anyway,
@@ -623,7 +623,7 @@ NativeGetTime(
Tcl_Time *timePtr,
TCL_UNUSED(ClientData))
{
- Tcl_WideInt usecSincePosixEpoch;
+ long long usecSincePosixEpoch;
/*
* Try to use high resolution timer.
@@ -785,12 +785,12 @@ UpdateTimeEachSecond(void)
static LARGE_INTEGER lastFileTime; /* File time of the previous calibration */
LARGE_INTEGER curFileTime; /* File time at the time this callback was
* scheduled. */
- Tcl_WideInt estFreq; /* Estimated perf counter frequency. */
- Tcl_WideInt vt0; /* Tcl time right now. */
- Tcl_WideInt vt1; /* Tcl time one second from now. */
- Tcl_WideInt tdiff; /* Difference between system clock and Tcl
+ long long estFreq; /* Estimated perf counter frequency. */
+ long long vt0; /* Tcl time right now. */
+ long long vt1; /* Tcl time one second from now. */
+ long long tdiff; /* Difference between system clock and Tcl
* time. */
- Tcl_WideInt driftFreq; /* Frequency needed to drift virtual time into
+ long long driftFreq; /* Frequency needed to drift virtual time into
* step over 1 second. */
/*
@@ -842,7 +842,7 @@ UpdateTimeEachSecond(void)
*/
estFreq = AccumulateSample(curPerfCounter.QuadPart,
- (Tcl_WideUInt) curFileTime.QuadPart);
+ (unsigned long long) curFileTime.QuadPart);
/*
* We want to adjust things so that time appears to be continuous.
@@ -907,7 +907,7 @@ UpdateTimeEachSecond(void)
* new calibrated values) and do a small adjustment (short time freeze)
*/
LARGE_INTEGER newPerfCounter;
- Tcl_WideInt nt0, nt1;
+ long long nt0, nt1;
QueryPerformanceCounter(&newPerfCounter);
nt0 = NativeCalc100NsTicks(timeInfo.fileTimeLastCall.QuadPart,
@@ -967,9 +967,9 @@ UpdateTimeEachSecond(void)
static void
ResetCounterSamples(
- Tcl_WideUInt fileTime, /* Current file time */
- Tcl_WideInt perfCounter, /* Current performance counter */
- Tcl_WideInt perfFreq) /* Target performance frequency */
+ unsigned long long fileTime, /* Current file time */
+ long long perfCounter, /* Current performance counter */
+ long long perfFreq) /* Target performance frequency */
{
int i;
for (i=SAMPLES-1 ; i>=0 ; --i) {
@@ -1007,20 +1007,20 @@ ResetCounterSamples(
* case).
*/
-static Tcl_WideInt
+static long long
AccumulateSample(
- Tcl_WideInt perfCounter,
- Tcl_WideUInt fileTime)
+ long long perfCounter,
+ unsigned long long fileTime)
{
- Tcl_WideUInt workFTSample; /* File time sample being removed from or
+ unsigned long long workFTSample; /* File time sample being removed from or
* added to the circular buffer. */
- Tcl_WideInt workPCSample; /* Performance counter sample being removed
+ long long workPCSample; /* Performance counter sample being removed
* from or added to the circular buffer. */
- Tcl_WideUInt lastFTSample; /* Last file time sample recorded */
- Tcl_WideInt lastPCSample; /* Last performance counter sample recorded */
- Tcl_WideInt FTdiff; /* Difference between last FT and current */
- Tcl_WideInt PCdiff; /* Difference between last PC and current */
- Tcl_WideInt estFreq; /* Estimated performance counter frequency */
+ unsigned long long lastFTSample; /* Last file time sample recorded */
+ long long lastPCSample; /* Last performance counter sample recorded */
+ long long FTdiff; /* Difference between last FT and current */
+ long long PCdiff; /* Difference between last PC and current */
+ long long estFreq; /* Estimated performance counter frequency */
/*
* Test for jumps and reset the samples if we have one.
@@ -1054,7 +1054,7 @@ AccumulateSample(
estFreq = 10000000 * (perfCounter - workPCSample)
/ (fileTime - workFTSample);
timeInfo.perfCounterSample[timeInfo.sampleNo] = perfCounter;
- timeInfo.fileTimeSample[timeInfo.sampleNo] = (Tcl_WideInt) fileTime;
+ timeInfo.fileTimeSample[timeInfo.sampleNo] = (long long) fileTime;
/*
* Advance the sample number.
diff --git a/win/tclsh.exe.manifest.in b/win/tclsh.exe.manifest.in
index 8b06fce..dd8a7c5 100644
--- a/win/tclsh.exe.manifest.in
+++ b/win/tclsh.exe.manifest.in
@@ -28,8 +28,6 @@
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
- <!-- Windows Vista -->
- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
</application>
</compatibility>
<asmv3:application>