summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-06 11:13:22 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-06 11:13:22 (GMT)
commit44de3dd8dad74f8031286f0750738099156cef0c (patch)
tree55e16945b507be6af6378e5b57a741a93881574a
parent55edd253ffe75b5f8d2a8a2501a966f81515659a (diff)
downloadtcl-44de3dd8dad74f8031286f0750738099156cef0c.zip
tcl-44de3dd8dad74f8031286f0750738099156cef0c.tar.gz
tcl-44de3dd8dad74f8031286f0750738099156cef0c.tar.bz2
If compiled with TCL_NO_DEPRECATED, the functions TclpGetDate/TclpLocaltime/TclpGmtime can be removed: They are internal and not used for anything any more.
-rw-r--r--generic/tclBasic.c2
-rw-r--r--generic/tclStubInit.c22
-rwxr-xr-xtools/tcltk-man2html.tcl2
-rw-r--r--unix/tclUnixTime.c7
-rw-r--r--win/tclWinTime.c8
5 files changed, 29 insertions, 12 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 8e816a5..b29e19e 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -5880,7 +5880,6 @@ Tcl_Eval(
(void) Tcl_GetStringResult(interp);
return code;
}
-#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
@@ -5915,6 +5914,7 @@ Tcl_GlobalEvalObj(
{
return Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_GLOBAL);
}
+#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 7957389..3f0a8ff 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -287,17 +287,9 @@ static int formatInt(char *buffer, int n){
}
#define TclFormatInt (int(*)(char *, long))formatInt
-#endif
+#endif /* TCL_WIDE_INT_IS_LONG */
-#else /* UNIX and MAC */
-# ifdef TCL_NO_DEPRECATED
-# define TclpLocaltime_unix 0
-# define TclpGmtime_unix 0
-# else
-# define TclpLocaltime_unix TclpLocaltime
-# define TclpGmtime_unix TclpGmtime
-# endif
-#endif
+#endif /* __CYGWIN__ */
#ifdef TCL_NO_DEPRECATED
# define Tcl_SeekOld 0
@@ -351,9 +343,19 @@ static int formatInt(char *buffer, int n){
# define Tcl_EvalObj 0
# undef Tcl_GlobalEvalObj
# define Tcl_GlobalEvalObj 0
+# undef TclpGetDate
+# define TclpGetDate 0
+# undef TclpLocaltime
+# define TclpLocaltime 0
+# undef TclpGmtime
+# define TclpGmtime 0
+# define TclpLocaltime_unix 0
+# define TclpGmtime_unix 0
#else /* TCL_NO_DEPRECATED */
# define Tcl_SeekOld seekOld
# define Tcl_TellOld tellOld
+# define TclpLocaltime_unix TclpLocaltime
+# define TclpGmtime_unix TclpGmtime
static int
seekOld(
diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl
index 9a372b7..7ec6365 100755
--- a/tools/tcltk-man2html.tcl
+++ b/tools/tcltk-man2html.tcl
@@ -4,7 +4,7 @@ if {[catch {package require Tcl 8.6-} msg]} {
puts stderr "ERROR: $msg"
puts stderr "If running this script from 'make html', set the\
NATIVE_TCLSH environment\nvariable to point to an installed\
- tclsh8.6 (or the equivalent tclsh86.exe\non Windows)."
+ tclsh8.7 (or the equivalent tclsh87.exe\non Windows)."
exit 1
}
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index d634449..6a73ac2 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -22,6 +22,7 @@
* variable is the key to this buffer.
*/
+#ifndef TCL_NO_DEPRECATED
static Tcl_ThreadDataKey tmKey;
typedef struct {
struct tm gmtime_buf;
@@ -45,6 +46,8 @@ static char *lastTZ = NULL; /* Holds the last setting of the TZ
static void SetTZIfNecessary(void);
static void CleanupMemory(ClientData clientData);
+#endif /* TCL_NO_DEPRECATED */
+
static void NativeScaleTime(Tcl_Time *timebuf,
ClientData clientData);
static void NativeGetTime(Tcl_Time *timebuf,
@@ -263,6 +266,7 @@ Tcl_GetTime(
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
struct tm *
TclpGetDate(
const time_t *time,
@@ -352,6 +356,7 @@ TclpLocaltime(
return &tsdPtr->localtime_buf;
}
+#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
@@ -486,6 +491,7 @@ NativeGetTime(
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
static void
SetTZIfNecessary(void)
{
@@ -531,6 +537,7 @@ CleanupMemory(
{
ckfree(lastTZ);
}
+#endif /* TCL_NO_DEPRECATED */
/*
* Local Variables:
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index 81d9458..18702e7 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -27,6 +27,7 @@
* month, where index 1 is January.
*/
+#ifndef TCL_NO_DEPRECATED
static const int normalDays[] = {
-1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364
};
@@ -40,6 +41,7 @@ typedef struct {
struct tm tm; /* time information */
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
+#endif /* TCL_NO_DEPRECATED */
/*
* Data for managing high-resolution timers.
@@ -113,7 +115,9 @@ static TimeInfo timeInfo = {
* Declarations for functions defined later in this file.
*/
+#ifndef TCL_NO_DEPRECATED
static struct tm * ComputeGMT(const time_t *tp);
+#endif /* TCL_NO_DEPRECATED */
static void StopCalibration(ClientData clientData);
static DWORD WINAPI CalibrationThread(LPVOID arg);
static void UpdateTimeEachSecond(void);
@@ -522,6 +526,7 @@ StopCalibration(
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
struct tm *
TclpGetDate(
const time_t *t,
@@ -724,6 +729,7 @@ ComputeGMT(
return tmPtr;
}
+#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
@@ -1068,6 +1074,7 @@ AccumulateSample(
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
struct tm *
TclpGmtime(
const time_t *timePtr) /* Pointer to the number of seconds since the
@@ -1112,6 +1119,7 @@ TclpLocaltime(
return localtime(timePtr);
}
+#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------