summaryrefslogtreecommitdiffstats
path: root/generic/tclEnv.c
Commit message (Collapse)AuthorAgeFilesLines
* Proposed fix for [9b47029467631832]: testing existence of env(some_thing) ↵jan.nijtmans2016-02-191-3/+3
| | | | | destroys traces. Was the comment [http://core.tcl.tk/tcl/artifact/f93c0675115b73ce?ln=554|here] not correct after all?.
* Remove useless code, trying to sync win32 environment variables with ↵jan.nijtmans2015-05-251-98/+1
|\ | | | | | | cygwin's. cygwin1.dll is responsible for doing that. Taken over from cygwin's tcl fork.
| * Remove useless code, trying to sync win32 environment variables with ↵jan.nijtmans2015-05-251-99/+1
| | | | | | | | cygwin's. cygwin1.dll is responsible for doing that. Taken over from cygwin's tcl fork.
* | Eliminate all usage of WIN32 and __WIN32__ macros: Some compilers (e.g. ↵jan.nijtmans2014-02-101-2/+2
| | | | | | | | | | Clang/LLVM) don't define it, and _WIN32 is much more portable anyway. See: [http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#WindowsCygwinnonPOSIXandMinGW]
* | ... and don't break env-5.3 and env-5.5 test-cases.jan.nijtmans2013-11-201-0/+1
| |
* | Bug Fix: EnvTraceProc() MUST always return NULL to indicate success.jan.nijtmans2013-11-201-1/+1
| |
* | [219226]: Rewrote how ::env is synchronized to the environment so it no longerdkf2013-09-271-16/+65
| | | | | | | | smashes the array or its elements flat, This affects traces on env, links to env, and iterations over env: it makes them work as naïvely expected.
* | use cygwin_conv_path() in stead of deprecated cygwin_conv_to_full_posix_pathjan.nijtmans2012-06-261-2/+2
|\ \ | |/
| * use cygwin_conv_path() in stead of deprecated cygwin_conv_to_full_posix_pathjan.nijtmans2012-06-261-2/+2
| |\
| | * tclStubInit.c: move up #undef, so it is clear that thisjan.nijtmans2012-04-041-4/+0
| | | | | | | | | | | | macro is conflicting with another definition in this file. Fix some other gcc warnings
| | * [Bug 3288345] Wrong Tcl_StatBuf used on Cygwinjan.nijtmans2012-03-201-79/+6
| | | | | | | | | (backported from Tcl 8.5)
* | | Move CYGWIN-specific stuff from tclPort.h to tclUnixPort.h, where it belongsjan.nijtmans2012-04-271-0/+1
|\ \ \ | |/ /
| * | Move CYGWIN-specific stuff from tclPort.h to tclUnixPort.h, where it belongsjan.nijtmans2012-04-271-0/+1
| | |
* | | cygwin should use SetEnvironmentVariable for windows envcygwin_environment_changesjan.nijtmans2012-04-061-13/+2
|\ \ \ | |/ /
| * | cygwin should use SetEnvironmentVariable for windows envjan.nijtmans2012-04-051-17/+6
| | |
* | | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-9/+8
| | | | | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | | MINOR: Formatting fixes, mainly to comments, so code better fits the style indkf2011-03-101-2/+2
| | | | | | | | | the Engineering Manual.
* | | 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/tclEnv.c: improve environ handling on Mac OS X (adapteddas2007-08-071-23/+1
| | | | | | | | | | | | * unix/tclUnixPort.h: from Apple changes in Darwin tcl-64).
| | * * generic/tclEnv.c (Darwin): mark _environ symbol as unexported.das2006-10-311-1/+2
| | |
| | * * win/tclWinPort.h: define USE_PUTENV_FOR_UNSET 1hobbs2005-10-051-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclEnv.c (TclSetEnv, TclUnsetEnv): add USE_PUTENV_FOR_UNSET to existing USE_PUTENV define to account for various systems that have putenv(), but can't unset env vars with it. Note difference between Windows and Linux for actually unsetting the env var (use of '='). Correct the resizing of the environ array. We assume that we are in full ownership, but that's not correct.[Bug 979640]
| | * * generic/tclEnv.c (TclUnsetEnv): Another putenv() copy behaviorhobbs2003-05-141-1/+6
| | | | | | | | | | | | | | | problem repaired when compiling on windows and using microsoft's runtime. [Bug 736421] (gravereaux)
| * | Fix environment tests under CYGWINnijtmans2010-01-061-10/+22
| | |
* | | * generic/tclBasic.c, generic/tclClock.c, generic/tclEncoding.c,dkf2010-10-011-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclEnv.c, generic/tclLoad.c, generic/tclNamesp.c, * generic/tclObj.c, generic/tclRegexp.c, generic/tclResolve.c, * generic/tclResult.c, generic/tclUtil.c, macosx/tclMacOSXFCmd.c: More purging of strcpy() from locations where we already know the length of the data being copied.
* | | Remove unused @MAN2TCLFLAGS@nijtmans2010-04-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move <limits.h> include from tclInt.h to tclWinPort.h, and eliminate unneeded <stdlib.h>, <stdio.h> and <string.h>, which are already in tclInt.h Move "tclInt.h" from regcustom.h up to regex.h. tclAlloc.c: Unneeded <stdio.h> include tclExecute.c: Fix gcc warning: comparison between signed and unsigned
* | | Code Audit results:dkf2010-03-051-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | * use do { ... } while (0) in macros * avoid shadowing one local variable with another * use clearer 'foo.bar++;' instead of '++foo.bar;' where result not required (i.e., semantically equivalent) * follow Engineering Manual rules on spacing and declarations
* | | Fix TCL_LL_MODIFIER for Cygwinnijtmans2010-01-131-3/+9
| | | | | | | | | | | | | | | and various other minor CYGWIN compilation problems
* | | Various CYGWIN-related fixes. In the win32 configure script, CYGWIN is still ↵nijtmans2009-12-211-7/+12
| | | | | | | | | | | | not enabled yet, but at least it is a step in the right direction.
* | | Generalize mysterious comment about causes for ::env missesferrieux2009-01-041-2/+3
| | |
* | | CONSTify TclDTraceInfonijtmans2008-10-281-2/+2
|/ / | | | | | | Eliminate some -Wstrings-write warnings
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | Silence syntax warning by Sun C compiler. [Bug 1840211]dkf2007-12-011-2/+2
| |
* | Reduce cast count.dkf2007-11-191-77/+72
| |
* | * generic/tclEnv.c: improve environ handling on Mac OS X (adapteddas2007-08-071-31/+1
| | | | | | | | * unix/tclUnixPort.h: from Apple changes in Darwin tcl-64).
* | * generic/tclEnv.c (ReplaceString): Clear memory correctly whenKevin B Kenny2007-04-231-2/+3
| | | | | | | | | | | | | | | | | | growing the cache to avoid reads of uninitialised data. * generic/tclStrToD.c (AccumulateDecimalDigit): Fixed a mistake where we'd run beyond the end of the 'pow10_wide' array if a number begins with a string of more than 'maxpow10_wide' zeroes. Both these issues reported under [Bug 1705778] - detected with the existing test suite, no new regression tests required.
* | Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-2/+2
| | | | | | | | efficient). After [Patch 1529526] (afredd)
* | Minor comment formatting changedkf2007-03-211-3/+2
| |
* | * generic/tclEnv.c: Some more ckalloc -> ckrealloc replacements.dgp2007-03-201-14/+6
| | | | | | | | * generic/tclLink.c:
* | * unix/tclUnixPort.h: ensure MODULE_SCOPE is defined before use, sodas2006-10-311-2/+2
| | | | | | | | | | | | | | that tclPort.h can once again be included without tclInt.h. * generic/tclEnv.c (Darwin): mark _environ symbol as unexported even when MODULE_SCOPE != __private_extern__.
* | * unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),das2005-11-271-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tk/unix/tcl.m4. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tk/unix/configure.in. * unix/Makefile.in: add CFLAGS to tclsh/tcltest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of tclsh and compiling of tclTestInit.o or xtTestInit.o during parallel make. (checkstubs, checkdoc, checkexports): dependency and Darwin fixes (dist): add new macosx files. * unix/tclLoadDyld.c (TclpDlopen): use NSADDIMAGE_OPTION_WITH_SEARCHING on second NSAddImage only. [Bug 1204237] (TclGuessPackageName): should not be MODULE_SCOPE. (TclpLoadMemory): ppc64 and endian (i386) fixes, add support for loading universal (fat) bundles from memory. * unix/tclUnixFCmd.c: * macosx/tclMacOSXFCmd.c: ppc64 and endian (i386) fixes. (TclMacOSXCopyFileAttributes): add support for new Tiger copyfile() API to enable copying of xattrs & ACLs by [file copy]. * generic/tcl.h: add Darwin specifc configure overrides for TCL_WIDE defines to support fat compiles of ppc and ppc64 at the same time, (replaces Darwin CVS fix by emoy, rdar://3693001). add/correct location of version numbers in macosx files. * generic/tclInt.h: clarify fat compile comment. * unix/tclUnixPort.h: add Darwin specifc configure overrides to support fat compiles, where configure runs only once for multiple architectures (replaces Darwin CVS fix by emoy, rdar://3693001). * macosx/tclMacOSXBundle.c: * macosx/tclMacOSXNotify.c: * unix/tclUnixNotfy.c: * unix/tclUnixPort.h: fix #include order to support compile time override of HAVE_COREFOUNDATION in tclUnixPort.h when building for ppc64 * macosx/Tcl.pbproj/default.pbxuser (new file): * macosx/Tcl.pbproj/jingham.pbxuser: * macosx/Tcl.pbproj/project.pbxproj: * macosx/Tcl.xcode/default.pbxuser (new file): * macosx/Tcl.xcode/project.pbxproj (new file): * macosx/Tcl.xcodeproj/default.pbxuser (new file): * macosx/Tcl.xcodeproj/project.pbxproj (new file): new/updated projects for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with native tcltest targets and support for universal (fat) compiles. * macosx/README: clarification/cleanup, document new Xcode projects and universal (fat) builds via CFLAGS (i.e. all of ppc ppc64 i386 at once). * unix/Makefile.in: * unix/aclocal.m4: * unix/configure.in: * unix/dltest/Makefile.in: * macosx/configure.ac (new file): add support for inclusion of unix/configure.in by macosx/configure.ac, allows generation of a config headers enabled configure script in macosx (required by Xcode projects). * macosx/GNUmakefile: rename from Makefile to avoid overwriting by configure run in tcl/macosx, add support for reusing configure cache, build target fixes, remove GENERIC_FLAGS override now handled by tcl.m4. * generic/tcl.decls: add Tcl_Main declaration as comment to avoid 'checkstubs' target complaining about it missing from stubs. * generic/regex.h: * generic/tclDate.c: * generic/tclEnv.c: * generic/tclGetDate.y: * generic/tclIOUtil.c: * generic/tclObj.c: * generic/tclStubInit.c: * generic/tclStubLib.c: * generic/tclPathObj.c: * generic/tclThreadAlloc.c: * generic/tclThreadStorage.c: * generic/tclTrace.c: * generic/tclVar.c: * generic/tommath.h: * tools/fix_tommath_h.tcl: * unix/tclUnixFCmd.c: ensure externally visible symbols not contained in stubs table are declared as MODULE_SCOPE (or as static if not used outside of own source file). These changes allow 'make checkstubs' to complete without error on Darwin with gcc 4. * generic/rege_dfa.c (getvacant): * generic/regexec.c (cfind): * generic/tclCompExpr.c (CompileSubExpr): * generic/tclNamesp.c (NamespaceEnsembleCmd): * unix/tclUnixChan.c (TclUnixWaitForFile): initialise variables to silence gcc 4 warnings. * generic/tclExecute.c (TclExecuteByteCode): fix unused variable warning when NO_WIDE_TYPE is defined. * generic/regguts.h: only #define NDEBUG if not already #defined. * unix/tclUnixNotfy.c: * macosx/tclMacOSXNotify.c: sync whitespace & comments. * unix/tclUnixPort.h: * win/tclWinPort.h: remove declaration of obsolete&unused TclpMutex API. * unix/configure: * unix/tclConfig.h.in: regen.
* | ANSIfy. Also converted some deeply nested code to a less nested form for ↵dkf2005-11-011-71/+77
| | | | | | | | easier reading.
* | * tests/env.test (env-6.1):hobbs2005-10-051-7/+27
| | | | | | | | | | | | | | | | | | | | | | * win/tclWinPort.h: define USE_PUTENV_FOR_UNSET 1 * generic/tclEnv.c (TclSetEnv, TclUnsetEnv): add USE_PUTENV_FOR_UNSET to existing USE_PUTENV define to account for various systems that have putenv(), but can't unset env vars with it. Note difference between Windows and Linux for actually unsetting the env var (use of '='). Correct the resizing of the environ array. We assume that we are in full ownership, but that's not correct.[Bug 979640]
* | Systematizing the formattingdkf2005-07-211-160/+182
| |
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
| |
* | * doc/DString.3: Eliminated use of identifier "string" in Tcl'sdgp2005-05-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/Environment.3: public C API to avoid conflict/confusion with * doc/Eval.3: the std::string of C++. * doc/ExprLong.3, doc/ExprLongObj.3, doc/GetInt.3, doc/GetOpnFl.3: * doc/ParseCmd.3, doc/RegExp.3, doc/SetResult.3, doc/StrMatch.3: * doc/Utf.3, generic/tcl.decls, generic/tclBasic.c, generic/tclEnv.c: * generic/tclGet.c, generic/tclParse.c, generic/tclParseExpr.c: * generic/tclRegexp.c, generic/tclResult.c, generic/tclUtf.c: * generic/tclUtil.c, unix/tclUnixChan.c: * generic/tclDecls.h: `make genstubs`
* | Patch 922727 committed. Implements three changes:dgp2004-04-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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):
* | Another putenv() copy behavior problem repaired when compiling on windowsdavygrvy2003-05-141-1/+6
|/ | | | and using microsoft's runtime. [Bug 736421]
* Fix mingw build problems and compiler warnings.mdejong2003-01-141-2/+2
| | | | | | | | | | | | | | | | * generic/tcl.h: Add if defined(__MINGW32__) check to code that sets the TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER. * generic/tclClock.c (FormatClock): Don't define savedTimeZone and savedTZEnv if we are not going to use them. * generic/tclEnv.c: Add cast to avoid warning. * win/tclWinChan.c: Use DWORD instead of int to avoid compiler warning. * win/tclWinThrd.c: Only define allocLock, allocLockPtr, and dataKey when TCL_THREADS is defined. This avoid a compiler warning about unused variables.