summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2016-03-311-2/+3
| | | | | * upstream-KWSys: KWSys 2016-03-31 (3392da1d)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2016-03-081-2/+3
| | | | | * upstream-KWSys: KWSys 2016-03-08 (6b60c184)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2016-02-221-0/+107
| | | | | * upstream-KWSys: KWSys 2016-02-22 (4847aedd)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2016-01-111-15/+6
| | | | | * upstream-KWSys: KWSys 2016-01-11 (e8bf616e)
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-12-041-17/+9
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-12-011-30/+23
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-10-081-8/+29
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-09-291-1/+2
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-09-261-64/+71
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-09-141-17/+51
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-09-021-416/+412
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-08-311-9/+62
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-08-031-2/+16
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-07-151-15/+40
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-06-161-1/+1
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-05-281-14/+30
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-04-131-5/+12
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-03-021-0/+4
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-02-261-6/+52
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-01-211-1/+5
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-01-101-2/+9
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-10-311-71/+162
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-09-261-0/+10
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-09-091-2/+15
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-08-111-105/+0
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-08-041-145/+223
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-07-071-38/+171
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-05-191-2/+5
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-05-131-107/+107
|
* Remove some c_str() calls.Stephen Kelly2014-03-111-2/+2
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-03-041-0/+3
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-12-191-2/+2
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-11-251-95/+194
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-10-081-5/+0
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-08-071-106/+103
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-07-111-8/+4
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-06-261-1/+1
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-06-041-1/+1
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-06-031-10/+46
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-05-291-4/+13
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-05-071-1/+1
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-04-261-2/+2
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-02-071-18/+10
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-02-011-2/+2
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-01-081-15/+4
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2012-12-191-1/+7
|
* Merge branch 'upstream-kwsys' into import-KWSys-subtreeBrad King2012-10-011-1/+1
|
* KWSys: Remove unused environ declaration from SystemToolsBrad King2012-05-231-4/+0
| | | | | | | | | | Commit "KWSys: Fix SystemTools environment memory handling" (2012-04-26) added a _WIN32 case inside !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H to dllimport the "environ" global. Howver, KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H is true on every Windows toolchain we support so the case is never reached. Furthermore, even if it were reached the use of dllimport is incorrect because the toolchain might not be compiling with a dynamic runtime library. Remove the unused incorrect line and supporting conditionals.
* KWSys: Fix SystemTools environment memory handling (#13156)Brad King2012-04-271-20/+216
| | | | | | | | | | | | | | | | | | | | | | | The SystemTools::PutEnv function tries to provide the "putenv" API without leaking memory. However, the kwsysDeletingCharVector singleton frees memory that may still be referenced by the environment table, having been placed there by putenv. If any static destruction or processing by an external tool happens after the singleton is destroyed and accesses the environment it will read invalid memory. Replace use of putenv with setenv/unsetenv when available. The latter manage internal copies of the values passed instead of referencing the original memory. When setenv/unsetenv are not available use putenv with a singleton that removes its values from the environment before freeing their memory. This requires an "unputenv" implementation. On at least some platforms it must be written in terms of "putenv" because other APIs are not available and direct modification of the "environ" global is not safe (e.g. on Windows there is interaction with "wenviron"). Fortunately either putenv("A=") or putenv("A") will remove "A" from the environment on these platforms. On other platforms fall back to direct manipulation of "environ". Also add UnPutEnv to the API and add a test for the behavior of both.
* KWSys: Correctly handle empty environment variablesBrad King2011-12-151-1/+1
| | | | | | | Fix a crash which occurs when SystemTools::GetPath attempts to process an empty environment variable. Author: Vladimir Panteleev <vladimir@thecybershadow.net>