summaryrefslogtreecommitdiffstats
path: root/win/tclWinTime.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix for FreeBSD, and remove support for older FreeBSD versions. Patch by ↵jan.nijtmans2013-05-191-2/+2
|\ | | | | | | Pietro Cerutti
| * - eliminate compiler warning when compiling with Visual Studio.jan.nijtmans2013-05-171-2/+2
| | | | | | - Make sure that _ftime() from msvcrt.dll is used, not ftime() from mingw (which might use 64-bit time_t)
* | make some more internal tables constjan.nijtmans2012-04-231-3/+3
|\ \ | |/
| * make some more internal tables constjan.nijtmans2012-04-231-3/+3
| | | | | | On cygwin, install dll's in /usr/bin, not in /usr/lib
| * [Bug 3388350] mingw64 compiler warningsjan.nijtmans2011-08-151-1/+1
| |
* | Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
|\ \ | |/ | | more harm than good. Purged them.
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | more harm than good. Purged them.
| * * generic/tclInt.decls: Yet another round of attemptingKevin B Kenny2007-04-211-3/+3
| | | | | | | | | | | | | | | | | | * generic/tclInt.h: to get the correct type signature * unix/tclUnixPort.h: for TclpLocaltime and TclpGmtime. * unix/tclUnixTime.c: CONST TclpTime_t is a 'time_t *CONST' * win/tclWinTime.c: and not a 'CONST time_t*'! * generic/tclIntDecls.h: [Bug 1677275] * generic/tclIntPlatDecls.h: Regenerated.
| * * win/makefile.vc: Updated MSVC build to properly deal withpatthoyts2006-09-261-3/+3
| | | | | | | | | | | | | | | | * win/nmakehlp.c: MSVC8 and AMD64 target. Backport from 8.5 * win/rules.vc: * generic/tcl.h: Fixed stat definition for MSVC8 AMD64. * win/tclWinSock.c: Casting type police. * win/tclWinTime.c:
| * Enable building Tcl with Microsoft's latest compiler offeringpatthoyts2006-06-141-9/+9
| | | | | | | | | | | | (VS2005). We have to handle a number of oddities as they have deprecated most of the standard C library and now generate manifest files to be linked into the binaries. SF bug #1424909
| * * win/tclWinTime.c (TclpGetDate): use time_t for 'time'hobbs2005-03-301-9/+6
| |
| * replaced 'long' times with wides, to cope with Win64Kevin B Kenny2005-03-151-2/+2
| |
| * added CONST to TclpLocaltime and TclpGmtime param throughoutKevin B Kenny2004-10-281-3/+3
| |
| * * generic/tcl.h: Corrected Tcl_WideInt declarations so that the mingw Kevin B Kenny2004-06-051-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build works again. * generic/tclInt.decls: Changes to the tests for * generic/tclIntPlatDecls.h: clock frequency in Tcl_WinTime * generic/tclStubInit.c: so that any clock frequency * tests/platform.test (platform-1.3): is accepted provided that * win/tclWin32Dll.c (TclWinCPUID): all CPU's in the system share * win/tclWinTest.c (TestwincpuidCmd): a common chip, and hence, * win/tclWinTime.c (Tcl_GetTime): presumably, a common clock. This change necessitated a small burst of assembly code to read CPU ID information, which was added as TclWinCPUID in the internal Stubs. To test this code in the common case of a single-processor machine, a 'testwincpuid' command was added to tclWinTest.c, and a test case in platform.test. Thanks to Jeff Godfrey and Richard Suchenwirth for reporting this bug. [Bug #976722]
| * * generic/tclInt.decls: Restored TclpTime_t kludge to all Kevin B Kenny2004-05-171-8/+11
| | | | | | | | | | | | | | * generic/tclIntPlatDecls.h: places where it appeared before the * unix/tclUnixPort.h changes of 14 May, because use of * unix/tclUnixTime.h native time_t in its place requires * win/tclWinTime.h: the 8.5 header reforms. [Bug #955146]
| * 2004-05-14 Kevin B. Kenny <kennykb@acm.org> Kevin B Kenny2004-05-141-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.decls: Promoted TclpLocaltime and TclpGmtime * generic/tclIntDecls.h: from Unix-specific stubs to the generic * generic/tclIntPlatDecls.h: internal Stubs table. Reran 'genstubs' * generic/tclStubInit.c: * unix/tclUnixPort.h: * generic/tclClock.c: Changed a buggy 'GMT' timezone specification to the correct 'GMT0'. [Bug #922848] * unix/tclUnixThrd.c: Moved TclpGmtime and TclpLocaltime to unix/tclUnixTime.c where they belong. * unix/tclUnixTime.c (TclpGmtime, TclpLocaltime, TclpGetTimeZone, ThreadSafeGMTime [removed], ThreadSafeLocalTime [removed], SetTZIfNecessary, CleanupMemory): Restructured to make sure that the same mutex protects all calls to localtime, gmtime, and tzset. Added a check in front of those calls to make sure that the TZ env var hasn't changed since the last call to tzset, and repeat tzset if necessary. [Bug #942078] Removed a buggy test of the Daylight Saving Time information in 'gettimeofday' in favor of applying 'localtime' to a known value. [Bug #922848] * tests/clock.test (clock-3.14): Added test to make sure that changes to $env(TZ) take effect immediately. * win/tclWinTime.c (TclpLocaltime, TclpGmtime): Added porting layer for 'localtime' and 'gmtime' calls.
| * Corrected use of types to make compilation compatible with VC++5.Kevin B Kenny2003-04-151-40/+38
| |
| * Fixed Bug 710310 (duplicate test numbers in clock.test). Made major Kevin B Kenny2003-04-121-121/+240
| | | | | | | | | | changes to tclWinTime.c and related code to improve loop filter stability.
* | ANSIfydkf2005-11-041-56/+60
| |
* | Applied patch #1096916 to support building with MSVC 8.patthoyts2005-11-031-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * generic/regerror.c: Avoid use of reserved word. * generic/tcl.h: Select the right Tcl_Stat structure * generic/tclDate.c: Casts to handle 64 bit time_t case. * tests/env.test: Include essential envvar on Win32 * win/nmakehlp.c: Handle new return codes. * win/makefile.vc: Use the selected options. * win/rules.vc: Check options are applicable * win/tclWinPort.h: Disable deprecated function warnings * win/tclWinSock.c: Provide default value to avoid warning. * win/tclWinTime.c: Add casts to handle 64bit time_t type.
* | Getting more systematic about styledkf2005-07-241-467/+427
| |
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
| |
* | * generic/tclStubInit.c: Regenerated the stubs support code fromandreas_kupries2005-01-211-3/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclDecls.h: the modified tcl.decls (TIP #233, see below). * doc/GetTime.3: Implemented TIP #233, i.e. the * generic/tcl.decls: 'Virtualization of Tcl's Sense of Time'. * generic/tcl.h: Declared, implemented, and documented the * generic/tclInt.h: specified new API functions. Moved the * unix/tclUnixEvent.c: native (OS) access to time information * unix/tclUnixNotfy.c: into standard handler functions. Inserted * unix/tclUnixTime.c: hooks calling on the handlers where native * win/tclWinNotify.c: access was done before, and where scaling * win/tclWinTime.c: between domains (real/virtual) is required.
* | * generic/tclTimer.c: Removed a premature optimisation thatKevin B Kenny2004-09-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | attempted to store the assoc data in the client data; the optimisation caused a bug that [after] would overwrite its imports. [Bug 1016167] * library/clock.tcl (InitTZData, ClearCaches): Changed so that the in-memory time zone :UTC (and its aliases) always gets reinitialised, in case tzdata is absent. [Bug 1019537, 1023779] * library/tzdata/*: Regenerated. * tests/clock.test (clock-31.*, clock-39.1): Corrected a problem where the 'system' locale tests fail on a non-English Windows machine. [Bug 1023761]. Added a test to make sure that alias time zones load correctly. [Bug 1023779]. * tools/tclZIC.tcl (writeLinks): Corrected a problem where alias time zone names were written incorrectly, causing them to fail to load at run time. [Bug 1023779]. * win/tclWinTime.c (Tcl_GetTime): Eliminated CPUID tests on Win64 - assuming that HAL vendors now do a better job of keeping the performance counters synchronized among CPU's. [Bug 1020445]
* | * generic/tcl.h: Corrected Tcl_WideInt declarations so that the mingw Kevin B Kenny2004-06-051-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build works again. * generic/tclDecls.h: Changes to the tests for * generic/tclInt.decls: clock frequency in * generic/tclIntDecls.h: Tcl_WinTime * generic/tclIntPlatDecls.h: so that any clock frequency * generic/tclPlatDecls.h: is accepted provided that * generic/tclStubInit.c: all CPU's in the system share * tests/platform.test (platform-1.3): a common chip, and hence, * win/tclWin32Dll.c (TclWinCPUID): presumably, a common clock. * win/tclWinTest.c (TestwincpuidCmd) This change necessitated a * win/tclWinTime.c (Tcl_GetTime): small burst of assembly code to read CPU ID information, which was added as TclWinCPUID in the internal Stubs. To test this code in the common case of a single-processor machine, a 'testwincpuid' command was added to tclWinTest.c, and a test case in platform.test. Thanks to Jeff Godfrey and Richard Suchenwirth for reporting this bug. [Bug #976722]
* | 2004-05-14 Kevin B. Kenny <kennykb@acm.org> Kevin B Kenny2004-05-141-2/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.decls: Promoted TclpLocaltime and TclpGmtime * generic/tclIntDecls.h: from Unix-specific stubs to the generic * generic/tclIntPlatDecls.h: internal Stubs table. Reran 'genstubs' * generic/tclStubInit.c: * unix/tclUnixPort.h: * generic/tclClock.c: Changed a buggy 'GMT' timezone specification to the correct 'GMT0'. [Bug #922848] * unix/tclUnixThrd.c: Moved TclpGmtime and TclpLocaltime to unix/tclUnixTime.c where they belong. * unix/tclUnixTime.c (TclpGmtime, TclpLocaltime, TclpGetTimeZone, ThreadSafeGMTime [removed], ThreadSafeLocalTime [removed], SetTZIfNecessary, CleanupMemory): Restructured to make sure that the same mutex protects all calls to localtime, gmtime, and tzset. Added a check in front of those calls to make sure that the TZ env var hasn't changed since the last call to tzset, and repeat tzset if necessary. [Bug #942078] Removed a buggy test of the Daylight Saving Time information in 'gettimeofday' in favor of applying 'localtime' to a known value. [Bug #922848] * tests/clock.test (clock-3.14): Added test to make sure that changes to $env(TZ) take effect immediately. * win/tclWinTime.c (TclpLocaltime, TclpGmtime): Added porting layer for 'localtime' and 'gmtime' calls.
* | * win/tclWinTime.c: If the Tcl_ExitProc (StopCalibration) isdavygrvy2004-04-231-2/+6
| | | | | | | | | | called from the stack frame of DllMain's PROCESS_DETACH, the wait operation should timeout and continue.
* | Patch 922727 committed. Implements three changes:dgp2004-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: Reworked the Tcl header files into a clean * unix/tclUnixPort.h: hierarchy where tcl.h < tclPort.h < tclInt.h * win/tclWinInt.h: and every C source file should #include * win/tclWinPort.h: at most one of those files to satisfy its declaration needs. tclWinInt.h and tclWinPort.h also better organized so that tclWinPort.h includes the Windows implementation of cross-platform declarations, while tclWinInt.h makes declarations that are available on Windows only. * generic/tclBinary.c (TCL_NO_MATH): Deleted the generic/tclMath.h * generic/tclMath.h (removed): header file. The internal Tcl * macosx/Makefile (PRIVATE_HEADERS): header, tclInt.h, has a * win/tcl.dsp: #include <math.h> directly, and file external to Tcl needing libm should do the same. * win/Makefile.in (WIN_OBJS): Deleted the win/tclWinMtherr.c file. * win/makefile.bc (TCLOBJS): It's a vestige from matherr() days * win/makefile.vc (TCLOBJS): gone by. * win/tcl.dsp: * win/tclWinMtherr.c (removed):
* | Made HEAD build on Windows VC++ again.Kevin B Kenny2004-03-191-10/+10
| |
* | * generic/tclIntDecls.h: Removed TclpTime_t. It wasn't really needed,rmax2004-03-181-10/+9
| | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: but caused warnings related to * generic/tclInt.decls: strict aliasing with GCC 3.3. * generic/tclClock.c: * generic/tclDate.c: * generic/tclGetDate.y: * win/tclWinTime.c: * unix/tclUnixTime.c:
* | * win/tclWinFile.c (TclpUtime) : utimbuf struct not a problemdavygrvy2003-12-161-1/+14
| | | | | | | | | | | | | | | | | | with Borland. * win/tclWinTime.c (TclpGetDate) : Borland's localtime() has a slight behavioral difference. From Helmut Giese <hgiese@ratiosoft.com> [Patch 758097].
* | * win/tclWinTime.c: Changed use of '_timezone' to 'timezone' asdavygrvy2003-08-271-7/+5
| | | | | | | | | | this difference is already adjusted for in tclWinPort.h. Removed unreferenced posixEpoch file-scope global.
* | Add tests to detect and avoid division by zero in the windows precisiondrh2003-05-241-4/+20
| | | | | | | | timer calibration logic.
* | * compat/strftime.c: Modified TclpStrftime to return its Kevin B Kenny2003-05-181-1/+2
| | | | | | | | | | | | | | | | * generic/tclClock.c: result in UTF-8 encoding, and removed * mac/tclMacTime.c: the conversion from system encoding to * unix/tclUnixTime.c: UTF-8 from [clock format]. Needed to * win/tclWinTime.c: avoid double conversion of the timezone name on Windows systems. [Bug 624408]
* | Corrected use of types to make compilation compatible with VC++5.Kevin B Kenny2003-04-151-37/+37
| |
* | * win/configure: Regen.mdejong2003-04-141-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * win/configure.in: Add check for FINDEX_INFO_LEVELS from winbase.h, known to be a problem in VC++ 5.2. Define HAVE_NO_FINDEX_ENUMS if the define does not exist. * win/tclWinFile.c: Put declarations for FINDEX_INFO_LEVELS and FINDEX_SEARCH_OPS inside a check for HAVE_NO_FINDEX_ENUMS so that these are not declared twice. This fixes the Mingw build. * win/tclWinTime.c: Rework the init of timeInfo so that the number or initializers matches the declaration. This was broken under Mingw. Add cast to avoid compile warning when calling the AccumulateSample function.
* | Implemented TIP #124 (clock clicks -microseconds and Tcl_WideInt Kevin B Kenny2003-04-121-121/+240
|/ | | | | | return values). Fixed Bug 710310 (duplicate test numbers in clock.test). Made major changes to tclWinTime.c and related code to improve loop filter stability.
* * win/tclWinTime.c: Added code to test and compensate for forward Kevin B Kenny2003-02-141-13/+29
| | | | | | | | | | | | | | | leaps of the performance counter. See the MSDN Knowledge Base article Q274323 for the hardware problem that makes this necessary on certain machines. * tests/winTime.test: Revised winTime-2.1 - it had a tolerance of thousands of seconds, rather than milliseconds. (What's six orders of magnitude among friends? Both the above changes are triggered by a problem reported at http://aspn.activestate.com/ASPN/Mail/Message/ActiveTcl/1536811 although the developers find it difficult to believe that it accounts for the observed behavior and suspect a fault in the RTC chip.
* * win/configure: Regen.mdejong2003-01-271-11/+17
| | | | | | | | * win/configure.in: Add test that checks to see if the compiler can cast to a union type. * win/tclWinTime.c: Squelch compiler warning about union initializer by casting to union type when compiling with gcc.
* * win/tclWinConsole.c:davygrvy2002-11-261-2/+2
| | | | | | | | | | | | | | | | * win/tclWinPipe.c: * win/tclWinSerial.c: * win/tclWinSock.c: * win/tclWinThrd.c: * win/tclWinTime.c: General cleanup of all worker threads used by the channel drivers. Eliminates the normal case where the worker thread is terminated ('cept the winsock one). Instead, use kernel events to signal a clean exit. Only when the worker thread is blocked on an I/O call is the thread terminated. Essentially, this makes all other channel worker threads behave like the PipeReaderThread() function for it's cleaner exit behavior. This appears to fix [Bug 597924] but needs 3rd party confirmation to close the issue.
* * win/tclWinTime.c: Added code to set an exit handler thatKevin B Kenny2002-10-091-5/+63
| | | | | | terminates the thread that calibrates the performance counter, so that the thread won't outlive unloading the Tcl DLL. [Tcl bug 620735].
* Made tests for clock frequency more permissive to cope with Win98SE beingKevin B Kenny2002-04-011-5/+16
| | | | | observed to return 1.19318 in place of 1.193182 MHz as the performance counter frequency.
* added TIP#73 patch #483500 from Kevin Kenny.hobbs2001-11-211-6/+6
| | | | This deprecates TclpGetTime in favor of new Tcl_GetTime.
* * win/tclWinTime.c: More Borland compatibility fixes.davygrvy2001-09-061-2/+5
| | | | [Patch: 436116]
* * win/tclWinTime.c (CalibrationThread): added lint return value tohobbs2000-12-101-3/+4
| | | | prevent compiler warning. [Bug #125005]
* Applied the patch for TIP #7 from Kevin Kenny.andreas_kupries2000-11-211-7/+408
| | | | See http://www.cs.man.ac.uk/fellowsd-bin/TIP/7.html
* * win/tclWinTime.c: fixed handling of %Z on NT for time zoneshobbs1999-12-011-6/+9
| | | | that don't have DST.
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-29/+93
|
* Merged stubs changes into mainline for 8.0stanton1999-03-101-3/+5
|
* Replaced SCCS strings, fixed binary filescore_8_0_3stanton1998-09-141-1/+1
|