summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-26 14:29:58 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-26 14:29:58 (GMT)
commit3604d53d3f64cca36cb6884d708d4e6895ffdb2b (patch)
treef164794334a6f3524ad8060a06d13b40aa1231a2 /unix
parent3b82cae97ddc15fca3c3b101e586256504bb91f7 (diff)
downloadtcl-3604d53d3f64cca36cb6884d708d4e6895ffdb2b.zip
tcl-3604d53d3f64cca36cb6884d708d4e6895ffdb2b.tar.gz
tcl-3604d53d3f64cca36cb6884d708d4e6895ffdb2b.tar.bz2
Removed functions marked deprecated or obsolete for a long time: Tcl_Backslash, Tcl_EvalFile, Tcl_GlobalEvalObj, Tcl_GlobalEval, Tcl_EvalTokens.
Remove Tcl_FindExecutable from stub table: It is needed by embedders, not extenders. Remove TclpGetDate, TclpGmtime, TclpLocaltime: it isn't use anywhere since the new clock implementation. Remove TclWinConvertWSAError, it's the same as TclWinConvertError.
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixTime.c120
1 files changed, 0 insertions, 120 deletions
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index c7921fe..6e8c5f4 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -20,18 +20,6 @@
#define IsLeapYear(x) (((x)%4 == 0) && ((x)%100 != 0 || (x)%400 == 0))
/*
- * TclpGetDate is coded to return a pointer to a 'struct tm'. For thread
- * safety, this structure must be in thread-specific data. The 'tmKey'
- * variable is the key to this buffer.
- */
-
-static Tcl_ThreadDataKey tmKey;
-typedef struct ThreadSpecificData {
- struct tm gmtime_buf;
- struct tm localtime_buf;
-} ThreadSpecificData;
-
-/*
* If we fall back on the thread-unsafe versions of gmtime and localtime, use
* this mutex to try to protect them.
*/
@@ -251,114 +239,6 @@ Tcl_GetTime(
/*
*----------------------------------------------------------------------
*
- * TclpGetDate --
- *
- * This function converts between seconds and struct tm. If useGMT is
- * true, then the returned date will be in Greenwich Mean Time (GMT).
- * Otherwise, it will be in the local time zone.
- *
- * Results:
- * Returns a static tm structure.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-struct tm *
-TclpGetDate(
- const time_t *time,
- int useGMT)
-{
- if (useGMT) {
- return TclpGmtime(time);
- } else {
- return TclpLocaltime(time);
- }
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TclpGmtime --
- *
- * Wrapper around the 'gmtime' library function to make it thread safe.
- *
- * Results:
- * Returns a pointer to a 'struct tm' in thread-specific data.
- *
- * Side effects:
- * Invokes gmtime or gmtime_r as appropriate.
- *
- *----------------------------------------------------------------------
- */
-
-struct tm *
-TclpGmtime(
- const time_t *timePtr) /* Pointer to the number of seconds since the
- * local system's epoch */
-{
- /*
- * Get a thread-local buffer to hold the returned time.
- */
-
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tmKey);
-
-#ifdef HAVE_GMTIME_R
- gmtime_r(timePtr, &tsdPtr->gmtime_buf);
-#else
- Tcl_MutexLock(&tmMutex);
- memcpy(&tsdPtr->gmtime_buf, gmtime(timePtr), sizeof(struct tm));
- Tcl_MutexUnlock(&tmMutex);
-#endif
-
- return &tsdPtr->gmtime_buf;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TclpLocaltime --
- *
- * Wrapper around the 'localtime' library function to make it thread
- * safe.
- *
- * Results:
- * Returns a pointer to a 'struct tm' in thread-specific data.
- *
- * Side effects:
- * Invokes localtime or localtime_r as appropriate.
- *
- *----------------------------------------------------------------------
- */
-
-struct tm *
-TclpLocaltime(
- const time_t *timePtr) /* Pointer to the number of seconds since the
- * local system's epoch */
-{
- /*
- * Get a thread-local buffer to hold the returned time.
- */
-
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tmKey);
-
- SetTZIfNecessary();
-#ifdef HAVE_LOCALTIME_R
- localtime_r(timePtr, &tsdPtr->localtime_buf);
-#else
- Tcl_MutexLock(&tmMutex);
- memcpy(&tsdPtr->localtime_buf, localtime(timePtr), sizeof(struct tm));
- Tcl_MutexUnlock(&tmMutex);
-#endif
-
- return &tsdPtr->localtime_buf;
-}
-
-/*
- *----------------------------------------------------------------------
- *
* Tcl_SetTimeProc --
*
* TIP #233 (Virtualized Time): Registers two handlers for the