summaryrefslogtreecommitdiffstats
path: root/win/tclWinNotify.c
Commit message (Collapse)AuthorAgeFilesLines
* Correct spelling errors in comments and documentation, but also a ↵pooryorick2023-04-121-1/+1
|\ | | | | | | non-comment corrections in history.tcl and tcltest.test.
| * Correct spelling errors in comments and documentation, but also a non-comment pooryorick2023-04-121-1/+1
| | | | | | corrections in history.tcl and tcltest.test.
* | More -Wconversion warning fixesjan.nijtmans2023-03-081-8/+8
| |
* | Merge 8.7jan.nijtmans2021-08-231-5/+5
|\ \ | |/
| * Make everything compile warning-free when TCL_THREADS=0jan.nijtmans2021-08-231-5/+5
| |\
* | \ Merge 8.7jan.nijtmans2021-08-201-0/+49
|\ \ \ | |/ /
| * | tip#511 proposed implementationjan.nijtmans2021-08-171-0/+49
| | |
* | | Merge 8.7jan.nijtmans2021-04-081-40/+0
|\ \ \ | |/ /
| * | Remove TclpCreateFileHandler/TclpDeleteFileHandler on windows. The linker ↵jan.nijtmans2021-04-081-40/+0
| | | | | | | | | | | | should complain when even trying to create something calling those functions.
* | | Clean up the notifier code to not spread the hooks quite so widelydkf2021-04-031-241/+253
|\ \ \ | |/ /
| * | Refactoring, ahoydkf2021-03-301-241/+252
| | |
* | | Merge 8.7jan.nijtmans2020-12-081-1/+1
|\ \ \ | |/ /
| * | Add -finput-charset=UTF-8 and -fextended-identifiers to gcc (and clang). All ↵jan.nijtmans2020-12-081-1/+1
| | | | | | | | | | | | C sources can now use UTF-8, as far as gcc/clang/msvc support it. Not used yet
* | | Merge 8.7jan.nijtmans2020-07-211-2/+2
|\ \ \ | |/ /
| * | Merge 8.6jan.nijtmans2020-07-201-2/+2
| |\ \ | | |/
* | | Internal API simplifications: Don't use types like HINSTANCE/HMODULE any ↵jan.nijtmans2020-03-311-3/+3
|/ / | | | | | | more, just void*. Has effect only on Win32 and Cygwin.
* | Merge 8.6jan.nijtmans2019-09-191-3/+3
|\ \ | |/
| * Some more *A() -> *W() Win32 API changes, making Unicode calls Explicit.jan.nijtmans2019-09-191-7/+7
| |
* | Merge 8.6. Missing cast in Tcl_WinTCharToUtf() macro (when compiling without ↵jan.nijtmans2019-09-191-8/+8
|\ \ | |/ | | | | -DUNICODE)
| * TCHAR -> WCHAR converions (and corresponding Win32 API call changes), since ↵jan.nijtmans2019-09-181-16/+16
| | | | | | | | we are impicitly compiling with -DUNICODE
* | Eliminate more usage of C++-specific keywords in C-code.jan.nijtmans2019-07-251-13/+14
| |
* | Code cleanup, like TCHAR -> WCHAR and TEXT("xxx") -> L"xxx", since we ↵jan.nijtmans2019-06-291-1/+1
| | | | | | | | always compile in UNICODE mode.
* | Minor code cleanup. jan.nijtmans2018-09-051-3/+1
| | | | | | | | | | win/tclWinPipe.c: Eliminate some compiler warnings on mingw-w64 win/tclWinNotify.c: Eliminate tsdPtr->timeout variable, since it's only being written to. other files: code cleanup, eliminate unnecessary type casts
* | Simplify use of "struct" keyword in many places.jan.nijtmans2016-06-301-1/+1
| |
* | merge trunkjan.nijtmans2016-03-301-4/+4
|\ \
| * | Eliminate AT_FORK_INIT_VALUE/RESET_ATFORK_MUTEX macro's, since other values ↵jan.nijtmans2016-03-291-4/+4
| |/ | | | | | | | | than the default are not supported anyway. This results in the elimination of (empty functions anyway) AtForkPrepare/AtForkParent. Also improve consistancy in some variable names. No change of functionality.
* | (experiment) Use TclpMasterLock() in stead of a separate notifierInitMutex. ↵jan.nijtmans2016-03-211-8/+18
|/ | | | One less mutex to be worried about.
* Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ | | | | cause more harm than good. Purged them (except in zlib files).
| * 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.h (tclOriginalNotifier):dgp2003-03-211-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclStubInit.c (tclOriginalNotifier): * mac/tclMacNotify.c (Tcl_SetTimer,Tcl_WaitForEvent): * unix/tclUnixNotfy.c (Tcl_SetTimer,Tcl_WaitForEvent, Tcl_CreateFileHandler,Tcl_DeleteFileHandler): * win/tclWinNotify.c (Tcl_SetTimer,Tcl_WaitForEvent): Some linkers apparently use a different representation for a pointer to a function within the same compilation unit and a pointer to a function in a different compilation unit. This causes checks like those in the original notifier procedures to fall into infinite loops. The fix is to store pointers to the original notifier procedures in a struct defined in the same compilation unit as the stubs tables, and compare against those values. [Bug 707174]
| * | installData.tcl: Make sure that copyDir only receives normalized paths.nijtmans2010-05-211-2/+2
| | | | | | | | | | | | | | | | | | tclPlatDecls.h: Fix <tchar.h> inclusion for CYGWIN. tclPathObj.c: Fix Tcl_SetStringObj usage for CYGWIN. *.c: Fix various minor other gcc warnings, like signed<->unsigned mismatch.
* | | Unnecessary type casts, See Tcl [Patch #2997087]nijtmans2010-05-111-3/+3
| | | | | | | | | | | | Don't duplicate CYGWIN timezone #define from tclPort.h in tclWinPort.h
* | | TCHAR-related fixes, making those files compile fine when TCHAR != charnijtmans2010-05-041-5/+6
| | | | | | | | | | | | Please see comments in [Freq 2965056] (2965056-1.patch).
* | | Eliminate various gcc warnings (in -Wextra mode)nijtmans2009-11-181-2/+2
| | |
* | | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-4/+4
| | |
* | | CONSTified 4 functions in the Notifier which all have a Tcl_Time* in it which isnijtmans2008-07-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | supposed to be a constant, but this was not reflected in the API: Tcl_SetTimer Tcl_WaitForEvent Tcl_ConditionWait Tcl_SetMaxBlockTime Introduced a CONST86, so extensions which have their own Notifier (are there any?) can be modified to compile against both Tcl 8.5 and Tcl 8.6. This change complies with TIP #24
* | | TIP 285 ImplementationJoe Mistachkin2008-06-131-2/+2
| | |
* | | * generic/tclInt.h: revise Tcl_SetNotifier() to use adas2008-04-161-217/+225
|/ / | | | | | | | | | | | | | | * generic/tclNotify.c: module-scope hooks table instead of * generic/tclStubInit.c: runtime stubs-table modification; * macosx/tclMacOSXNotify.c: ensure all hookable notifier functions * win/tclWinNotify.c: check for hooks; remove hook checks in * unix/tclUnixNotfy.c: notifier API callers. [Patch 1938497]
* | ANSIfydkf2005-11-041-10/+10
| |
* | Getting more systematic about styledkf2005-07-241-114/+120
| |
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
| |
* | * compat/string.h: fixed memchr() protoype for __APPLE__ so that wedas2005-04-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build on Mac OS X 10.1 again. * generic/tclNotify.c (TclFinalizeNotifier): fixed notifier not being finalized in unthreaded core (was testing for notifier initialization in current thread by checking thread id != 0 but thread id is always 0 in untreaded core). * win/tclWinNotify.c (Tcl_WaitForEvent): * unix/tclUnixNotfy.c (Tcl_WaitForEvent): don't call ScaleTimeProc for zero wait times (as specified in TIP 233). * unix/Makefile.in: added @PLAT_SRCS@ to SRCS and split out NOTIFY_SRCS from UNIX_SRCS for parity with UNIX_OBJS & NOTIFY_OBJS. * unix/tcl.m4 (Darwin): added configure checks for recently added linker flags -single_module and -search_paths_first to allow building with older tools (and on Mac OS X 10.1), use -single_module in SHLIB_LD and not just T{CL,K}_SHLIB_LD_EXTRAS, added unexporting from Tk of symbols from libtclstub to avoid duplicate symbol warnings, added PLAT_SRCS definition for Mac OS X, defined MODULE_SCOPE to __private_extern__. (SC_MISSING_POSIX_HEADERS): added caching of dirent.h check. * unix/configure: autoconf-2.59
* | * generic/tclStubInit.c: Regenerated the stubs support code fromandreas_kupries2005-01-211-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | 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):
* | * win/tclWinNotify.c: Fixed a mistake where the return value ofdavygrvy2004-03-161-3/+2
| | | | | | | | | | | | | | | | MsgWaitForMultipleObjectsEx for "a message is in the queue" wasn't accurate. I removed the check on the case result==(WAIT_OBJECT_0 + 1) This was having the error of falling into GetMessage and waiting there by accident, which wasn't alertable through Tcl_AlertNotifier. I'll do some more study on this and try to find-out why.
* | * win/tclWinNotify.c (Tcl_WaitForEvent) : Allows an idling notifier to servicedavygrvy2004-03-031-5/+15
| | | | | | | | | | | | | | | | "Asynchronous Procedure Calls" from its wait state. Only useful for extension authors who decide they might want to try "completion routines" with WriteFileEx(), as an example. From experience, I recommend that "completion ports" should be used instead as the execution of the callbacks are more managable.
* | All uses of 'panic' (the macro) changeddavygrvy2003-12-241-2/+2
| | | | | | | | | | | | | | to 'Tcl_Panic' (the function). The #define of panic in tcl.h clearly states it is deprecated in the comments. [Patch 865264]
* | * generic/tclInt.h (tclOriginalNotifier):dgp2003-03-211-3/+5
|/ | | | | | | | | | | | | | | * generic/tclStubInit.c (tclOriginalNotifier): * mac/tclMacNotify.c (Tcl_SetTimer,Tcl_WaitForEvent): * unix/tclUnixNotfy.c (Tcl_SetTimer,Tcl_WaitForEvent, Tcl_CreateFileHandler,Tcl_DeleteFileHandler): * win/tclWinNotify.c (Tcl_SetTimer,Tcl_WaitForEvent): Some linkers apparently use a different representation for a pointer to a function within the same compilation unit and a pointer to a function in a different compilation unit. This causes checks like those in the original notifier procedures to fall into infinite loops. The fix is to store pointers to the original notifier procedures in a struct defined in the same compilation unit as the stubs tables, and compare against those values. [Bug 707174]
* * win/tclWin32Dll.c (squelch_warnings): Squelchmdejong2003-01-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | compiler warnings from SEH ASM code. * win/tclWinChan.c (squelch_warnings): Squelch compiler warnings from SEH ASM code. * win/tclWinDde.c: Add casts to avoid compiler warnings. Pass pointer to DWORD instead of int to avoid compiler warnings. * win/tclWinFCmd.c (squelch_warnings): Add casts and fixup decls to avoid compiler warnings. Squelch compiler warnings from SEH ASM code. * win/tclWinFile.c: Add casts and fixup decls to avoid compiler warnings. Remove unused variable. * win/tclWinNotify.c: Declare as DWORD instead of int to avoid compiler warning. * win/tclWinReg.c: Add casts to avoid compiler warning. Fix assignment in if expression bug. * win/tclWinSerial.c: Add casts to avoid compiler warnings. Remove unused variable. * win/tclWinSock.c: Add casts and fixup decls to avoid compiler warnings.