summaryrefslogtreecommitdiffstats
path: root/win/tclWin32Dll.c
Commit message (Collapse)AuthorAgeFilesLines
* eliminate TclWinResetInterfaceEncodings, becausenijtmans2009-08-021-14/+14
| | | | | | it does exactly the same as TclWinEncodingsCleanup, make sure that tclWinProcs and tclWinTCharEncoding are always set and reset concurrently.
* Handle the GetUserName API call appropriately for wide/narrow versions. [Bug ↵patthoyts2009-07-011-3/+5
| | | | 2806622]
* Style improvements - invoking callbacks without visual junk.dkf2008-10-261-3/+3
|
* * doc/Exit.3: do not call Tcl_Finalize implicitlyhobbs2008-08-011-103/+4
| | | | | | | * generic/tclEvent.c: on DLL_PROCESS_DETACH as it may lead * win/tclWin32Dll.c (DllMain): to issues and the user should be explicitly calling Tcl_Finalize before unloading regardless. Clarify the docs to note the explicit need in embedded use.
* NRE implementation [Patch 2017110]Miguel Sofer2008-07-131-83/+1
|
* Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-111/+108
|
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* Prefer UINT_PTR to DWORD_PTR when casting pointers to integer types for ↵patthoyts2007-11-151-6/+6
| | | | greater portability (bug #1831253)
* * generic/tclBasic.c:Miguel Sofer2007-11-101-3/+3
| | | | | | | | | * generic/tclInt.h: * unix/tclUnixInit.c: * win/tclWin32Dll.c: restore simpler behaviour for stack checking, not adaptive to stack size changes after a thread is launched. Consensus is that "nobody does that", and so it is not worth the cost.
* minor code cleanup in TclpGetCStackParams; hoist a couple of structs from ↵Kevin B Kenny2007-11-101-15/+11
| | | | TSD into the activation record
* 2007-11-10 Kevin Kenny <kennykb@acm.org>Kevin B Kenny2007-11-101-158/+40
| | | | | | | | | | | * win/tclWin32Dll.c: Rewrote the Windows stack checking algorithm to use information from VirtualQuery to determine the bound of the stack. This change fixes a bug where the guard page of the stack was never restored after an overflow. It also eliminates a nasty piece of assembly code for structured exception handling on mingw. It introduces an assumption that the stack is a single memory arena returned from VirtualAlloc, but the code in MSVCRT makes the same assumption, so it should be fairly safe.
* * generic/tclBasic.c:Miguel Sofer2007-11-101-6/+90
| | | | | | | | | | | * generic/tclInt.h: * unix/tclUnixInit.c: * unix/tclUnixPort.h: * win/tclWin32Dll.c: modify the stack checking algorithm to recheck in case of failure. The working assumptions are now that (a) a thread's stack is never moved, and (b) a thread's stack can grow but not shrink. Port to windows - could be more efficient, but is already cheaper than it was.
* ANSIfydkf2005-11-041-118/+119
|
* * win/tclWin32Dll.c: Applied patch #1256872 to provide unicodepatthoyts2005-11-031-3/+13
| | | | | * win/tclWinConsole.c: support in the console on suitable systems. * win/tclWinInt.h: Patch by Anton Kovalenko
* Getting more systematic about styledkf2005-07-241-584/+636
|
* Correct crash in stack.test on gcc/win32; fix compile errors in tclObj.c on ↵Kevin B Kenny2005-06-061-13/+2
| | | | hpux/native cc
* restore MSVC buildability of tclWin32Dll.cKevin B Kenny2005-05-161-1/+7
|
* * generic/tclInt.decls:das2005-05-141-24/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclTest.c: * generic/tclUtil.c: * win/tclWin32Dll.c: fixed link error due to direct access by tclTest.c to the MODULE_SCOPE tclPlatform global: renamed existing TclWinGetPlatform() accessor to TclGetPlatform() and moved it to generic code so that it can be used by on all platforms where MODULE_SCOPE is enforced. * macosx/tclMacOSXBundle.c: * unix/tclUnixInit.c: * unix/tcl.m4 (Darwin): made use of CoreFoundation API configurable and added test of CoreFoundation availablility to allow building on ppc64, replaced HAVE_CFBUNDLE by HAVE_COREFOUNDATION; test for availability of Tiger or later OSSpinLockLock API. * unix/tclUnixNotfy.c: * unix/Makefile.in: * macosx/tclMacOSXNotify.c (new file): when CoreFoundation is available, use new CFRunLoop based notifier: allows easy integration with other event loops on Mac OS X, in particular the TkAqua Carbon event loop is now integrated via a standard tcl event source (instead of TkAqua upon loading having to finalize the exsting notifier and replace it with its custom version). [Patch 1202052] * tests/unixNotfy.test: don't run unthreaded tests on Darwin since notifier may be using threads even in unthreaded core. * unix/tclUnixPort.h: * unix/tcl.m4 (Darwin): test for thread-unsafe realpath durning configure, as Darwin 7 and later realpath is threadsafe. * macosx/Makefile: enable configure caching. * unix/configure.in: wrap tclConfig.h header in #ifndef _TCLCONFIG so that it can be included more than once without warnings from gcc4.0 (as happens e.g. when including both tclInt.h and tclPort.h) * macosx/tclMacOSXBundle.c: * unix/tclUnixChan.c: * unix/tclLoadDyld.c: * unix/tclUnixInit.c: fixed gcc 4.0 warnings. * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59 * generic/tclIntDecls.h: * generic/tclIntPlatDecls.h: * generic/tclStubInit.c: make genstubs
* further rework of SEHKevin B Kenny2005-05-131-169/+182
|
* Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-448/+387
|
* Second part of fix for Bug 926106Kevin B Kenny2004-11-011-3/+3
|
* * win/tclWin32Dll.c (TclWinCPUID): need _asm for WIN64 (Itanium),hobbs2004-09-011-3/+3
| | | | until we have it, just return unknown. [Bug 1020445]
* fix to compilation error with VC++ 5.2vincentdarley2004-06-291-2/+10
|
* * win/tclWin32Dll.c (DllMain, _except_dllmain_detach_handler,mdejong2004-06-211-23/+120
| | | | | | | | | | | | | | | TclpCheckStackSpace, _except_checkstackspace_handler, TclWinCPUID, _except_TclWinCPUID_detach_handler): * win/tclWinChan.c (Tcl_MakeFileChannel, _except_makefilechannel_handler): * win/tclWinFCmd.c (DoRenameFile, _except_dorenamefile_handler, DoCopyFile, _except_docopyfile_handler): Rework pushing of exception handler function pointer so that compiling with gcc -O3 works. Remove empty function call to avoid compiler warning. Mark the DllMain function as noinline to avoid compiler error from duplicated asm labels in generated code.
* * generic/tcl.h: Corrected Tcl_WideInt declarations so that the mingw Kevin B Kenny2004-06-051-1/+150
| | | | | | | | | | | | | | | | | | | | 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]
* (DllMain): Added DisableThreadLibraryCalls() for the DLL_PROCESS_ATTACHdavygrvy2004-04-241-1/+2
| | | | | case. We're not interested in knowing about DLL_THREAD_ATTACH, so disable it.
* Removed my mistake of adding an exit handler to TclWinInit.davygrvy2004-04-231-30/+1
| | | | | TclWinEncodingsCleanup called from TclFinalizeFilesystem does the Tcl_FreeEncoding for us.
* Added an exit handler in tclWinInit() so tclWinTCharEncoding could be freeddavygrvy2004-04-201-1/+30
| | | | for Tcl_Finalize.
* filesystem optimisation -- Three main issues accomplished: (1) cleaned up ↵vincentdarley2004-01-211-1/+6
| | | | variable names in
* * win/tclWin32Dll.c (DllMain): Add HAVE_NO_SEHmdejong2003-12-261-1/+69
| | | | | | blocks in place of __try and __except statements to support gcc builds. This is needed after David's changes on 2003-12-21. [Tcl patch 858493]
* All uses of 'panic' (the macro) changeddavygrvy2003-12-241-5/+5
| | | | | | | to 'Tcl_Panic' (the function). The #define of panic in tcl.h clearly states it is deprecated in the comments. [Patch 865264]
* Structured Exception Handling added around Tcl_Finalize called fromdavygrvy2003-12-211-3/+14
| | | | | | | | DllMain's DLL_PROCESS_DETACH. We can't 100% assured that Tcl is being unloaded by the OS in a stable condition and we need to protect the exit handlers should the stack be in a hosed state. AT&T style assembly for SEH under MinGW has not been added yet. This is a first part change for [Patch 858493]
* filesystem bug fixesvincentdarley2003-10-131-1/+36
|
* Symbols which are visible outside a single compilation unit must havedkf2003-09-291-4/+4
| | | | | the prefix 'Tcl' to keep them out of the way of non-Tcl C code on Unix. (Problem reported by George Staplin.)
* filesystem fixes -- see ChangeLogvincentdarley2003-06-231-7/+15
|
* fix 5 small filesystem bugs, and some typosvincentdarley2003-04-111-3/+190
|
* finalization and test fixesvincentdarley2003-02-041-4/+29
|
* * win/tclWin32Dll.c (TclpCheckStackSpace, squelch_warnings):mdejong2003-01-251-41/+51
| | | | | | | | | | | | | | * win/tclWinChan.c (Tcl_MakeFileChannel, squelch_warnings): * win/tclWinFCmd.c (DoRenameFile, DoCopyFile, squelch_warnings): Re-implement inline ASM SEH handlers for gcc. The esp and ebp registers are now saved on the stack instead of in global variables so that the code is thread safe. Add additional checks when TCL_MEM_DEBUG is defined to be sure the values were recovered from the stack properly. Remove squelch_warnings functions and add a dummy call in the handler methods to squelch compiler warnings.
* * win/configure:mdejong2003-01-251-6/+10
| | | | | | | | | | | | | | | * win/configure.in: Define HAVE_ALLOCA_GCC_INLINE when we detect that no alloca function is found in malloc.h and we are compiling with GCC. Remove HAVE_NO_ALLOC_DECL define. * win/tclWin32Dll.c (TclpCheckStackSpace): Don't define alloca as a cdecl function. Doing this caused a tricky runtime bug because the _alloca function expects the size argument to be passed in a register and not on the stack. To fix this problem, we use inline ASM when compiling with gcc to invoke _alloca with the size argument loaded into a register.
* * win/configure: Regen.mdejong2003-01-241-7/+20
| | | | | | | | | | | * win/configure.in: * win/tclWin32Dll.c (TclpCheckStackSpace): Rework the SEH exception handler logic to avoid using the stack since alloca will modify the stack. This was causing a nasty bug that would set the exception handler to 0 because it tried to pop the previous exception handler off the top of the stack.
* * win/tclWin32Dll.c (squelch_warnings): Squelchmdejong2003-01-161-1/+16
| | | | | | | | | | | | | | | | | | | | | | 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.
* non-ascii chars in file mtime fixvincentdarley2003-01-091-1/+3
|
* * generic/tclStubInit.c: regenhobbs2002-12-061-1/+25
| | | | | | | | | | | | * generic/tclIntPlatDecls.h: regen * generic/tclInt.decls: added TclWinResetInterface * win/tclWin32Dll.c (TclWinResetInterfaces): * win/tclWinInit.c (TclpSetInitialEncodings, WinEncodingsCleanup): add exit handler that resets the encoding information to a state where we can reuse Tcl. Following these changes, it is possible to reuse Tcl (following Tcl_FindExecutable or Tcl_CreateInterp) following a Tcl_Finalize.
* comments addedvincentdarley2002-10-291-1/+15
|
* vfs, winfs testsuitevincentdarley2002-06-131-1/+11
|
* * win/configure: Regen.mdejong2002-03-151-2/+46
| | | | | | | | | | | | | | * win/configure.in: Add configure time test for SEH support in the compiler. * win/tclWin32Dll.c (ESP, EBP, TclpCheckStackSpace, _except_checkstackspace_handler): * win/tclWinChan.c (ESP, EBP, Tcl_MakeFileChannel, _except_makefilechannel_handler): * win/tclWinFCmd.c (ESP, EBP, DoRenameFile, _except_dorenamefile_handler, DoCopyFile, _except_docopyfile_handler): Implement SEH support under gcc using inline asm. Tcl and Tk should now compile with Mingw 1.1. [Patch 525746]
* * win/tclWin32Dll.c (TclpCheckStackSpace):mdejong2002-03-081-4/+9
| | | | | | | * win/tclWinFCmd.c (DoRenameFile, DoCopyFile): Replace hard coded constants with Win32 symbolic names. Move control flow statements out of __try blocks since the documentation indicates it is frowned upon.
* * Partial TIP 27 rollback. Following routinesdgp2002-02-081-3/+3
| | | | | | | | | | | | | restored to return (char *): Tcl_DStringAppend, Tcl_DStringAppendElement, Tcl_JoinPath, Tcl_TranslateFileName, Tcl_ExternalToUtfDString, Tcl_UtfToExternalDString, Tcl_UniCharToUtfDString, Tcl_GetCwd, Tcl_WinTCharToUtf. Also restored Tcl_WinUtfToTChar to return (TCHAR *) and Tcl_UtfToUniCharDString to return (Tcl_UniChar *). Modified some callers. This change recognizes that Tcl_DStrings are de-facto white-box objects. * generic/tclCmdMZ.c: corrected use of C++-style comment.
* * [Patch 505630] Updated interfaces of generic/tclBasic.cc (TIP 27).dgp2002-01-251-3/+3
| | | | | | | * [Patch 506818] Updated interfaces of generic/tclHash.c (TIP 27). * [Patch 506807] Updated interfaces of generic/tclObj.c (TIP 27). * [Patch 507304] Updated interfaces of win/tclWin32.c (TIP 27). * Update all callers.
* win fs fixesvincentdarley2001-11-191-5/+25
|