summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixInit.c
Commit message (Collapse)AuthorAgeFilesLines
* On Cygwin, use win32 API in stead of uname() to determine the tcl_platform ↵jan.nijtmans2012-06-061-2/+69
|\ | | | | | | variables
| * On Cygwin, use win32 API in stead of uname() to determine the tcl_platform ↵jan.nijtmans2012-06-061-2/+69
| |\ | | | | | | | | | variables
| | * On Cygwin, use win32 API in stead of uname() to determine the tcl_platform ↵jan.nijtmans2012-06-061-2/+69
| | | | | | | | | | | | variables
| * | Fix [Bug 3166410]: "out of stack space" on AIXjan.nijtmans2011-03-071-0/+10
| | |
* | | * generic/tclUtil.c (TclDStringToObj): Added internal function to makedkf2012-04-251-5/+2
| | | | | | | | | | | | the fairly-common operation of converting a DString into an Obj a more efficient one.
* | | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-2/+2
| | | | | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | | 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.
| | * * macosx/tclMacOSXBundle.c: Workaround CF memory managment bug indas2009-10-051-5/+6
| | | | | | | | | | | | * unix/tclUnixInit.c: Mac OS X 10.4 & earlier. [Bug 2569449]
| | * * unix/tclUnixFCmd.c: add workaround for crashing bug in fts_open()das2007-04-291-2/+4
| | | | | | | | | | | | * unix/tclUnixInit.c: without FTS_NOSTAT on 64bit Darwin 8 or earlier.
| | * * library/msgcat/msgcat.tcl (msgcat::Init): on Darwin, add fallback ofdas2006-09-101-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/msgcat.test: default msgcat locale to * unix/tclUnixInit.c (TclpSetVariables): current CFLocale identifier if available (via private ::tcl::mac::locale global, set at interp init when on Mac OS X 10.3 or later with CoreFoundation). * unix/tcl.m4: add caching to new SC_TCL_* macros for MT-safe wrappers. * unix/configure: autoconf-2.13
| | * * macosx/tclMacOSXNotify.c (Tcl_InitNotifier, Tcl_WaitForEvent): createdas2006-07-201-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | notifier thread lazily upon first call to Tcl_WaitForEvent() rather than in Tcl_InitNotifier(). Allows calling exeve() in processes where the event loop has not yet been run (Darwin's execve() fails in processes with more than one thread), in particular allows embedders to call fork() followed by execve(), previously the pthread_atfork() child handler's call to Tcl_InitNotifier() would immediately recreate the notifier thread in the child after a fork. * macosx/tclMacOSXNotify.c (Tcl_InitNotifier): add support for * unix/tclUnixFCmd.c (DoRenameFile, CopyFileAtts): weakly importing * unix/tclUnixInit.c (TclpSetInitialEncodings): symbols not available on OSX 10.2 or 10.3, enables binaires built on later OSX versions to run on earlier ones. * macosx/README: document how to enable weak-linking; cleanup. * unix/tclUnixPort.h: add support for weak-linking; conditionalize AvailabilityMacros.h inclusion; only disable realpath on 10.2 or earlier when threads are enabled. * unix/tclLoadDyld.c (TclpLoadMemoryGetBuffer): change runtime Darwin * unix/tclUnixInit.c (TclpInitPlatform): release check to use global initialized once. * unix/tclUnixFCmd.c (DoRenameFile, TclpObjNormalizePath): add runtime Darwin release check to determine if realpath is threadsafe. * unix/configure.in: add check on Darwin for compiler support of weak * unix/tcl.m4: import and for AvailabilityMacros.h header; move Darwin specific checks & defines that are only relevant to the tcl build out of tcl.m4; restrict framework option to Darwin; cleanup quoting. * unix/configure: autoconf-2.13 * unix/tclLoadDyld.c (TclpLoadMemory): * unix/tclUnixPipe.c (TclpCreateProcess): fix signed-with-unsigned comparison and other warnings from gcc4 -Wextra.
| | * Backport of part of FreeBSD portdkf2006-01-251-3/+10
| | |
| | * * generic/tclUnixInit.c (TclpSetInitialEncodings): Modified sodgp2005-11-031-2/+3
| | | | | | | | | | | | | | | | | | that multiple calls can continue to atttempt to properly set the system encoding. Needed for Tclkit to properly support non-default encodings. Thanks to Yaroslav Schekin. [Bug 1201171].
| | * * generic/tclBasic.c:Miguel Sofer2005-10-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBinary.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclExecute.c: * generic/tclLink.c: * generic/tclMain.c: * generic/tclProc.c: * generic/tclScan.c: * generic/tclTest.c: * generic/tclVar.c: * mac/tclMacInit.c: * unix/tclUnixInit.c: * win/tclWinInit.c: Insure that the core never calls TclPtrSetVar, Tcl_SetVar2Ex, Tcl_ObjSetVar2 or Tcl_SetObjErrorCode with a 0-ref new value. It is not possible to handle error returns correctly in that case [Bug 1334947], one has the choice of leaking the object in some cases, or else risk crashing in some others.
| | * Solaris mis-names the cp1251 encoding.dkf2005-08-051-1/+2
| | |
| | * * macosx/Makefile:das2005-05-241-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * macosx/README: * macosx/Tcl-Info.plist.in (new file): * unix/Makefile.in: * unix/configure.in: * unix/tcl.m4: * unix/tclUnixInit.c: moved all Darwin framework build support from macosx/Makefile into the standard unix configure/make buildsystem, the macosx/Makefile is no longer required to build Tcl.framework (but its functionality is still available for backwards compatibility). * unix/configure: autoconf-2.13
| | * * macosx/tclMacOSXBundle.c:das2005-05-141-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/tclMacOSXBundle.c: * unix/tclLoadDyld.c: * unix/tclUnixInit.c: fixed gcc 4.0 warnings. * unix/configure: autoconf-2.13
| | * Add more locale mapping info for Chinese. [1084595]dkf2005-01-051-1/+6
| | |
| | * * macosx/Makefile:das2004-11-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * unix/configure.in: * unix/tclUnixInit.c (MacOSXGetLibraryPath): changed detection of tcl framework build when determining tclLibPath from overloaded TCL_LIBRARY to configuration define TCL_FRAMEWORK. [Bug 1068088] * unix/configure: autoconf-2.13 * tests/unixInit.test (7.1): fixed failure when running tests with -tmpdir arg not set to working dir.
| | * * generic/tclInt.h:hobbs2004-03-291-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclEncoding.c (TclFindEncodings, Tcl_FindExecutable): * mac/tclMacInit.c (TclpInitLibraryPath): Correct handling of UTF * unix/tclUnixInit.c (TclpInitLibraryPath): data that is actually * win/tclWinFile.c (TclpFindExecutable): "clean", allowing the * win/tclWinInit.c (TclpInitLibraryPath): loading of Tcl from paths that contain multi-byte chars on Windows [Bug 920667]
| | * * tests/unixInit.test: unixInit-7.1hobbs2004-02-171-1/+14
| | | | | | | | | | | | | | | * unix/tclUnixInit.c (TclpInitPlatform): ensure the std fds exist to prevent crash condition [Bug #772288]
| | * * tests/unixInit.test (unixInit-2.10): re-enabled.dgp2003-11-101-2/+21
| | | | | | | | | | | | | | | | | | * unix/tclUnixInit.c (TclpInitLibraryPath): Alternative fix * win/tclWinInit.c (TclpInitLibraryPath): for [Bug 832657] that should not run afoul of startup constraints.
| | * * generic/tcl.decls:das2003-05-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * macosx/tclMacOSXBundle.c: added extended version of the Tcl_MacOSXOpenBundleResources() API taking an extra version number argument: Tcl_MacOSXOpenVersionedBundleResources(). This is needed to be able to access bundle resources in versioned frameworks such as Tcl and Tk, otherwise if multiple versions were installed, only the latest version's resources could be accessed. [Bug 736774] * unix/tclUnixInit.c (Tcl_MacOSXGetLibraryPath): use new versioned bundle resource API to get tcl runtime library for TCL_VERSION. [Bug 736774] * generic/tclPlatDecls.h: * generic/tclStubInit.c: regen. * unix/tclUnixPort.h: worked around the issue of realpath() not being thread-safe on Mac OS X by defining NO_REALPATH for threaded builds on Mac OS X. [Bug 711232]
| * | * macosx/tclMacOSXBundle.c: Workaround CF memory managment bug indas2009-10-051-5/+6
| | | | | | | | | | | | * unix/tclUnixInit.c: Mac OS X 10.4 & earlier. [Bug 2569449]
* | | * macosx/tclMacOSXBundle.c: Workaround CF memory managment bug indas2009-10-051-5/+6
| | | | | | | | | | | | * unix/tclUnixInit.c: Mac OS X 10.4 & earlier. [Bug 2569449]
* | | Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-2/+2
| | | | | | | | | | | | etc.)
* | | Implement TIP #315.dkf2008-09-251-1/+7
| | |
* | | NRE implementation [Patch 2017110]Miguel Sofer2008-07-131-258/+1
| | |
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-16/+16
|/ /
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | * generic/tclBasic.c:Miguel Sofer2007-11-261-5/+5
| | | | | | | | | | | | | | | | | | * generic/tclInt.h: * unix/tclUnixInit.c: * unix/tclUnixThrd.c: Fix stack checking via workaround for bug in glibc's pthread_attr_get_np, patch from [Bug 1815573]. Many thanks to Sergei Golovan (aka Teo) for detecting the bug and helping diagnose and develop the fix.
* | * unix/tclUnixInit.c: the TCL_NO_STACK_CHECK was being incorrectlyMiguel Sofer2007-11-131-5/+3
| | | | | | | | | | undefined here; this should be set (or not) in the compile options, it is used elsewhere and needs to be consistent.
* | * unix/tclUnixInit.c: simplify non-crosscompiled case.das2007-11-111-11/+13
| |
* | * generic/tclBasic.c:Miguel Sofer2007-11-101-3/+12
| | | | | | | | | | | | * unix/configure.in: * unix/tclUnixInit.c: detect stack grwoth direction at compile time, only fall to runtime detection when crosscompiling.
* | fix typosdas2007-11-101-6/+6
| |
* | * generic/tclBasic.c:Miguel Sofer2007-11-101-32/+45
| | | | | | | | | | | | | | | | | | * 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.
* | * generic/tclBasic.c:Miguel Sofer2007-11-101-77/+25
| | | | | | | | | | | | | | | | | | | | | | * 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.
* | fix formatting and inverted test in TclpCheckStackSpace()das2007-11-101-19/+20
| |
* | fixed stupid bug in last commit that made it not work in threaded buildsMiguel Sofer2007-11-091-3/+3
| |
* | * generic/tclAsync.c:Miguel Sofer2007-11-091-40/+77
| | | | | | | | | | | | | | | | | | | | | | * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclInt.h: * generic/tclUnixInit.c: * generic/tclUnixPort.h: new fields in interp (ekeko!) to cache TSD data that is accessed at each command invocation, access macros to replace Tcl_AsyncReady and TclpCheckStackSpace by much faster variants [Patch 1829248]
* | * unix/tclUnixInit.c (TclpSetVariables): Use the thread-safe getpwuiddkf2007-07-311-15/+21
| | | | | | | | | | replacement to fill the tcl_platform(user) field as it is not subject to spoofing.
* | * unix/tclUnixFCmd.c: add workaround for crashing bug in fts_open()das2007-04-231-2/+4
| | | | | | | | * unix/tclUnixInit.c: without FTS_NOSTAT on 64bit Darwin 8 or earlier.
* | Eliminate use of (VOID*) casts when calling memset or memcpy.dkf2007-04-171-2/+2
| |
* | * unix/tclUnixInit.c (TclpCheckStackSpace): do stack size checkshobbs2007-02-081-3/+3
| | | | | | | | | | with unsigned size_t to correctly validate stackSize in the 2^31+ range.
* | * library/msgcat/msgcat.tcl (msgcat::Init): on Darwin, add fallback ofdas2006-09-101-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/msgcat.test: default msgcat locale to * unix/tclUnixInit.c (TclpSetVariables): current CFLocale identifier if available (via private ::tcl::mac::locale global, set at interp init when on Mac OS X 10.3 or later with CoreFoundation). * library/tcltest/tcltest.tcl: add 'line' verbose level: prints source * doc/tcltest.n: file line information of failing tests. * macosx/Tcl.xcodeproj/project.pbxproj: add new tclUnixCompat.c file; revise tests target to use new tcltest 'line' verbose level. * unix/configure.in: add descriptions to new AC_DEFINEs for MT-safe. * unix/tcl.m4: add caching to new SC_TCL_* macros for MT-safe wrappers. * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59
* | Fix for stack.test failures on FreeBSDJoe Mistachkin2006-08-291-12/+4
| |
* | * unix/tcl.m4 (Darwin): add support for --enable-64bit on x86_64, fordas2006-08-181-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | universal builds including x86_64, for 64-bit CoreFoundation on Leopard and for use of -mmacosx-version-min instead of MACOSX_DEPLOYMENT_TARGET. * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59 * generic/tcl.h: add fixes for building on Leopard and support * unix/tclUnixPort.h: for 64-bit CoreFoundation on Leopard. * macosx/tclMacOSXFCmd.c: * unix/tclUnixPort.h: on Darwin x86_64, disable use of vfork as it causes execve to fail intermittently. (rdar://4685553) * generic/tclTomMath.h: on Darwin 64-bit, for now disable use of 128-bit arithmetic through __attribute__ ((mode(TI))), as it leads to link errors due to missing fallbacks. (rdar://4685527) * macosx/Tcl.xcodeproj/project.pbxproj: add x86_64 to universal build, switch native release targets to use DWARF with dSYM, Xcode 3.0 changes. * macosx/README: updates for x86_64 and Xcode 2.3. * macosx/Tcl.xcodeproj/default.pbxuser: add test suite target that runs * macosx/Tcl.xcodeproj/project.pbxproj: the tcl test suite at build time and shows clickable test suite errors in the GUI build window. * tests/macOSXFCmd.test: fix use of deprecated resource fork paths. * unix/tclUnixInit.c (TclpInitLibraryPath): move code that is only needed when TCL_LIBRARY is defined to run only in that case. * generic/tclLink.c (LinkTraceProc): fix 64-bit signed-with-unsigned comparison warning from gcc4 -Wextra.
* | * macosx/tclMacOSXNotify.c (Tcl_InitNotifier, Tcl_WaitForEvent): createdas2006-07-201-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | notifier thread lazily upon first call to Tcl_WaitForEvent() rather than in Tcl_InitNotifier(). Allows calling exeve() in processes where the event loop has not yet been run (Darwin's execve() fails in processes with more than one thread), in particular allows embedders to call fork() followed by execve(), previously the pthread_atfork() child handler's call to Tcl_InitNotifier() would immediately recreate the notifier thread in the child after a fork. * macosx/tclMacOSXFCmd.c (TclMacOSXCopyFileAttributes): add support * macosx/tclMacOSXNotify.c (Tcl_InitNotifier): for weakly * unix/tclUnixInit.c (Tcl_GetEncodingNameFromEnvironment): importing symbols not available on OSX 10.2 or 10.3, enables binaires built on later OSX versions to run on earlier ones. * macosx/Tcl.xcodeproj/project.pbxproj: enable weak-linking; turn on extra warnings. * macosx/README: document how to enable weak-linking; cleanup. * unix/tclUnixPort.h: add support for weak-linking; conditionalize AvailabilityMacros.h inclusion; only disable realpath on 10.2 or earlier when threads are enabled. * unix/tclLoadDyld.c (TclpLoadMemoryGetBuffer): change runtime Darwin * unix/tclUnixInit.c (TclpInitPlatform): release check to use global initialized once. * unix/tclUnixFCmd.c (DoRenameFile, TclpObjNormalizePath): add runtime Darwin release check to determine if realpath is threadsafe. * unix/configure.in: add check on Darwin for compiler support of weak * unix/tcl.m4: import and for AvailabilityMacros.h header; move Darwin specific checks & defines that are only relevant to the tcl build out of tcl.m4; restrict framework option to Darwin; cleanup quoting and help messages. * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59 * unix/tclLoadDyld.c (TclpLoadMemory): fix signed-with-unsigned comparison and other warnings from gcc4 -Wextra.