summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixInit.c
Commit message (Collapse)AuthorAgeFilesLines
* * 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]
* * library/auto.tcl (tcl_findLibrary):das2002-10-221-5/+50
| | | | | | | | | | | | * library/package.tcl (tclPkgUnknown): on macosx, search inside the Resources/Scripts subdirectory of any potential package directory * macosx/Tcl.pbproj/project.pbxproj: add standard Frameworks dirs to TCL_PACKAGE_PATH make argument. * unix/tclUnixInit.c (TclpSetVariables): on macosx, add embedded framework dirs to tcl_pkgPath: @executable_path/../Frameworks and @executable_path/../PrivateFrameworks (if they exist), as well as the dirs in DYLD_FRAMEWORK_PATH (if set). [Patch #624509] use standard MAXPATHLEN instead of literal 1024
* * unix/tclUnixInit.c (Tcl_MacOSXGetLibraryPath): made this statichobbs2002-09-021-3/+5
| | | | function only appear when HAVE_CFBUNDLE is defined.
* *** macosx-8-4-branch merged into the mainline [tcl patch #602770] ***macosx_8_4_merge_2002_08_31_trunkdas2002-08-311-4/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.decls: added new macosx specific entry to stubs table. * tools/genStubs.tcl: added generation of platform guards for macosx. This is a little more complex than it seems, because MacOS X IS "unix" plus a little bit, for the purposes of Tcl. BUT unfortunately, Tk uses "unix" to mean X11. So added platform keys for macosx (the little added to "unix"), "aqua" and "x11" to distinguish these for Tk. * generic/tcl.h: added a #ifnded RESOURCE_INCLUDED so that tcl.h can be passed to the resource compiler. * generic/tcl.h: * generic/tclNotify.c: added a few Notifier procs, to be able to modify more bits of the Tcl notifier dynamically. Required to get Mac OS X Tk to live on top of the Tcl Unix threaded notifier. Changes the size of the Tcl_NotifierProcs structure, but doesn't move any elements around. * unix/tclUnixNotfy.c: moved the call to Tcl_ConditionNotify till AFTER we are done mucking with the pointer swap. Fixes cases where the thread waiting on the condition wakes & accesses the waitingListPtr before it gets reset, causing a hang. * library/auto.tcl (tcl_findLibrary): added checking the directories in the tcl_pkgPath for library files on macosx to enable support of the standard Mac OSX library locations * unix/Makefile.in: * unix/configure.in: * unix/tcl.m4: added MAC_OSX_DIR. Added PLAT_OBJS to the OBJS: there are some MacOS X specific files now for Tcl, and when I get he resource & applescript stuff ported over, and restore support for FindFiles, etc, there will be a few more. Added LD_LIBRARY_PATH_VAR configure variable to avoid having to set all possible LD_LIBRARY_PATH analogues on all platforms. LD_LIBRARY_PATH_VAR is "LD_LIBRARY_PATH" by default, "LIBPATH" on AIX, "SHLIB_PATH" on HPUX and "DYLD_LIBRARY_PATH" on Mac OSX. Added configure option to package Tcl as a framework on Mac OSX. * macosx/tclMacOSXBundle.c (new): support for finding Tcl extension packaged as 'bundles' in the standard Mac OSX library locations. * unix/tclUnixInit.c: added support for findig the tcl script library inside Tcl packaged as a framework on Mac OSX. * macosx/Tcl.pbproj/jingham.pbxuser (new): * macosx/Tcl.pbproj/project.pbxproj (new): project for Apple's ProjectBuilder IDE. * macosx/Makefile (new): simple makefile for building the project from the command line via the ProjectBuilder tool 'pbxbuild'. * unix/configure: * generic/tclStubInit.c: * generic/tclPlatDecls.h: regen
* * djgpp/ (new directory)davygrvy2002-02-121-1/+5
| | | | | | | | | | | | | | | * djgpp/Makefile (new): * unix/tclAppInit.c: * unix/tclMtherr.c: * unix/tclUnixFCmd.c: * unix/tclUnixFile.c: * unix/tclUnixInit.c: * unix/tclUnixPort.h: Early stage of DJGPP support for building Tcl on DOS. Dynamic loading isn't working, yet. Requires watt32 for the TCP/IP stack. No autoconf, yet. Barely tested, but makes a working exe that runs Tcl in protected-mode, flat memory. [exec] and pipes will need the most work as multi-tasking on DOS has to be carefully.
* * Partial TIP 27 rollback. Following routinesdgp2002-02-081-5/+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.
* * Updated interfaces of generic/tclEncoding, generic/tclFilename.c,dgp2002-01-251-7/+7
| | | | | | | | | | | generic/tclIOUtil.c, generic/tclPipe.c, generic/tclResult.c, generic/tclUtil.c, generic/tclVar.c and mac/tclMacResource.c according to TIP 27. Tcl_TranslateFileName rewritten as wrapper around VFS-aware version. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes source incompatibilities: argv arguments of Tcl_Concat, Tcl_JoinPath, Tcl_OpenCommandChannel, Tcl_Merge; argvPtr arguments of Tcl_SplitList and Tcl_SplitPath.
* * unix/tclUnixInit.c (TclpSetInitialEncodings): update of patchhobbs2001-11-201-107/+143
| | | | | | | | from 2001-11-16 that uses the old Tcl encoding check mechanism as a fallback to the original. Also added a TCL_DEFAULT_ENCODING #define (defaults to iso8859-1). Tcl will first try setlocale and nl_langinfo, and if that fails, guess based on certain LANG|LC_* env vars. [Patch #418645]
* added hpux nl_langinfo alias fallbackshobbs2001-11-171-1/+20
|
* adjusted HAVE_LANGINFO to allow for fallback table, added gb2312-1980 alias ↵hobbs2001-11-161-6/+21
| | | | for gb2312
* * unix/tclUnixInit.c: added HAVE_LANGINFO code block.hobbs2001-11-161-3/+50
| | | | | | | | | | | * unix/configure: regened * unix/configure.in: added SC_ENABLE_LANGINFO call * unix/tcl.m4: made SHLIB_LD_LIBS='${LIBS}' for FreeBSD* (meyer) Added modified version of Wagner patch to make use of nl_langinfo where possible to determine Unix platform encoding, instead of the inflexible built-in system. This is used by default when possible, and can be disabled with --enable-langinfo=no. [Patch #418645] (hobbs, wagner)
* * Correcteddgp2001-08-271-10/+9
| | | | | | inconsistency between the search path for script libraries and the directory name $DISTNAME into which distributions built by 'make test' unpack. [Bug 455642]
* Changes from TIP#17 "Redo Tcl's filesystem"vincentdarley2001-07-311-116/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following files were impacted. * doc/Access.3: * doc/FileSystem.3: * doc/OpenFileChnl.3: * doc/file.n: * doc/glob.n: * generic/tcl.decls: * generic/tcl.h: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDate.c: * generic/tclDecls.h: * generic/tclEncoding.c: * generic/tclFCmd.c: * generic/tclFileName.c: * generic/tclGetDate.y: * generic/tclIO.c: * generic/tclIOCmd.c: * generic/tclIOUtil.c: * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclLoad.c: * generic/tclStubInit.c: * generic/tclTest.c: * generic/tclUtil.c: * library/init.tcl: * mac/tclMacFCmd.c: * mac/tclMacFile.c: * mac/tclMacInit.c: * mac/tclMacPort.h: * mac/tclMacResource.c: * mac/tclMacTime.c: * tests/cmdAH.test: * tests/event.test: * tests/fCmd.test: * tests/fileName.test: * tests/io.test: * tests/ioCmd.test: * tests/proc-old.test: * tests/registry.test: * tests/unixFCmd.test: * tests/winDde.test: * tests/winFCmd.test: * unix/mkLinks: * unix/tclUnixFCmd.c: * unix/tclUnixFile.c: * unix/tclUnixInit.c: * unix/tclUnixPipe.c: * win/tclWinFCmd.c: * win/tclWinFile.c: * win/tclWinInit.c: * win/tclWinPipe.c
* * tests/unixInit.test (unixInit-2.8): Corrected test for alldgp2001-07-021-1/+13
| | | | | | | | | | | | absolute pathnames in library path when executable is installed near root directory to use correct development directory layout. [Bug 438014] * tests/unixInit.test (unixInit-2.9): * unix/tclUnixInit.c (TclpInitLibraryPath): * win/tclWinInit.c (TclpInitLibraryPath): Corrected buggy construction of search path entries relative to executable. Added test for bad construction. [Bug 438014]
* 2001-01-04 Don Porter <dgp@users.sourceforge.net>dgp2001-01-041-7/+13
| | | | | | | | | | | | * tests/unixInit.test: * unix/tclUnixInit.c (TclpInitLibraryPath): * win/tclWinInit.c (TclpInitLibraryPath): Several entries in the library path ($tcl_libPath) are determined relative to the absolute path of the executable. When the executable is installed in or near the root directory of the file system, relative pathnames were being incorrectly generated, and in the worst case, memory access violations were crashing the program. [Bug 119416, Patch 102972]
* * unix/tclUnixInit.c: added default encoding map fromhobbs2000-10-311-1/+2
| | | | "ja_JP.eucJP" to "euc-jp". (takahashi)
* * generic/tclClock.c (FormatClock): correct code to handle localehobbs2000-05-181-14/+9
| | | | | | | | specific return values from strftime, if any. [Bug: 3345] * unix/tclUnixInit.c (TclpSetInitialEncodings): attempt to correct setlocale calls for XIM support and locale issues. [BUG: 5422 3345 4236 2522 2521]
* * unix/Makefile.in: purify has to use -best-effort to instrumenthobbs1999-10-131-2/+2
| | | | | | | | * unix/tclAppInit.c: identified potential mem leak when compiling tcltest (not critical) * unix/tclUnixPipe.c: fixed mem leak in TclpCreateProcess when doing alloc between vfork and execvp. * unix/tclUnixTest.c: fixed mem leak in findexecutable test command
* * Changed version to 8.2b2.redman1999-07-221-7/+7
| | | | | | | | | | | | | | | | | | * win/tclWinPort.h: Block out include of sys/*.h in order to build extensions with MetroWerks compiler for Win32. [Bug: 2385] * generic/tclCmdMZ.c: * generic/tclIO.c: Fix ANSI-style prototypes based on patch from Ulrich Ring. [Bug: 2391] * unix/Makefile.in: Need to make install-sh executable before calling (with chmod +x). [Bug: 2413] * tests/var.test: * generic/tclVar.c: Fixed bug that caused a seg. fault when using "array set a(b) {}", which is a bad array name anyway. Now the "array set" command will return an error in this case. Added test case and fixed existing test. [Bug: 2427]
* * generic/tclInitScript.h:hershey1999-07-211-6/+6
| | | | | | | | | * unix/tclUnixInit.c: merged code with 8.0.5. We now use an intermediate global tcl var "tclDefaultLibrary" to keep the "tcl_library" var from being set by the default value in the Makefile. Also fixed a bug in which caused the value of TCL_LIBRARY env var to be ignored. * unix/tclWinInit.c: just updated some comments.
* * unix/Makefile.in:stanton1999-05-141-4/+74
| | | | | | | | | | | | * unix/tclAppInit.c: Minor cleanup related to Xt notifier. * unix/tclUnixInit.c (TclpSetInitialEncodings): Tcl now looks for an encoding subfield in the LANG/LC_ALL variables in cases where the locale is not found in the locale table. Ensure that setlocale() is called at least once so X11 will initialize properly. Also, forces the LC_NUMERIC locale to be "C" so numeric processing in scripts is not affected by the current locale setting. [Bug: 1989]
* * win/tclWinInit.c:stanton1999-04-211-4/+46
| | | | | * unix/tclUnixInit.c: Changed initial search path to match that found used by tcl_findLibrary.
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-72/+436
|
* Merged stubs changes into mainline for 8.0stanton1999-03-101-1/+28
|
* Replaced SCCS strings, fixed binary filescore_8_0_3stanton1998-09-141-1/+1
|
* changed to set tclDefaultLibrary instead of tcl_librarystanton1998-07-241-1/+2
|
* Moved the variable 'tclPreInitScript' to the file generic/tclInitScript.hsuresh1998-07-091-10/+3
|
* Cleaned up PlatformInitExitHandlerwelch1998-07-061-2/+0
|
* Changed variable name "tclAlternateInitScript" to "tclPreInitScript".suresh1998-07-011-8/+9
| | | | Added error checking in in Tcl_Init() for pre-initialization script.
* Added definition of variable "tclAlternateInitScript" which is a globabl var-suresh1998-07-011-0/+12
| | | | | | iable and if set to a non-NULL value, will be evaluated just before the built-in script given in the file (variable) "generic/tclInitScript.h" ("initScript").
* plugin updateswelch1998-06-271-47/+3
|
* lintstanton1998-06-251-1/+2
|
* Added an additional env. var. ("tcl_pkgLibrary") that is searched prior to allsuresh1998-06-231-0/+3
| | | | other locations for the "tk.tcl" file. This facilitates application packaging.
* changed size of static buffers in tclUnixInit to ensure that they arestanton1998-06-181-2/+2
| | | | large enough for any TCL_LIBRARY or TCL_PACKAGE_PATH
* Initial revisionrjohnson1998-03-261-0/+317