summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.hxx.in
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2019-01-241-0/+7
| | | | | * upstream-KWSys: KWSys 2019-01-24 (b9dd1636)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2018-06-221-5/+3
| | | | | * upstream-KWSys: KWSys 2018-06-22 (49068d94)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2018-06-011-4/+4
| | | | | * upstream-KWSys: KWSys 2018-06-01 (8ef62b28)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2018-05-181-3/+2
| | | | | * upstream-KWSys: KWSys 2018-05-18 (5357cfc4)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2018-03-071-0/+1
| | | | | * upstream-KWSys: KWSys 2018-03-07 (2ad561e7)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2018-01-241-1/+1
| | | | | * upstream-KWSys: KWSys 2018-01-23 (0579db1c)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2017-11-071-3/+3
| | | | | * upstream-KWSys: KWSys 2017-11-07 (5249a82d)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2017-11-011-9/+9
| | | | | * upstream-KWSys: KWSys 2017-11-01 (6ffca34c)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2017-09-301-7/+0
| | | | | * upstream-KWSys: KWSys 2017-09-30 (f108739d)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2017-09-141-6/+0
| | | | | * upstream-KWSys: KWSys 2017-09-14 (d85b17e7)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2017-06-091-4/+8
| | | | | * upstream-KWSys: KWSys 2017-06-09 (a700e2ab)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2017-05-311-0/+4
| | | | | * upstream-KWSys: KWSys 2017-05-31 (bd0bbad7)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2017-04-191-7/+1
| | | | | * upstream-KWSys: KWSys 2017-04-19 (9f6ffaff)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2017-04-121-0/+24
| | | | | * upstream-KWSys: KWSys 2017-04-12 (23a4c211)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2017-02-061-0/+5
| | | | | * upstream-KWSys: KWSys 2017-02-06 (ef673998)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2016-11-091-161/+133
| | | | | * upstream-KWSys: KWSys 2016-11-09 (18c65411)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2016-09-141-4/+5
| | | | | | | * upstream-KWSys: KWSys 2016-09-14 (c4049689) Issue: #16295
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2016-08-041-0/+5
| | | | | * upstream-KWSys: KWSys 2016-08-03 (6d23dd7e)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2016-08-021-0/+1
| | | | | * upstream-KWSys: KWSys 2016-08-01 (560bcdbb)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2016-07-181-0/+4
| | | | | * upstream-KWSys: KWSys 2016-07-15 (f396bf43)
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-10-061-2/+2
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-09-021-169/+156
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-08-311-54/+102
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-07-151-1/+5
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-02-261-2/+5
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-10-311-18/+33
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-08-111-9/+0
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-08-041-29/+48
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-07-071-1/+12
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-05-131-9/+9
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-11-251-4/+11
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-08-071-0/+7
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-05-071-1/+1
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-01-081-2/+7
|
* KWSys: Fix SystemTools environment memory handling (#13156)Brad King2012-04-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | 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: Fix Doxygen warningsBrad King2011-10-241-2/+2
| | | | Author: Nicolas Despres <nicolas.despres@gmail.com>
* KWSys: Simplify SystemTools::GetTime implementation (#12261)Brad King2011-08-031-7/+1
| | | | | | We already use GetSystemTimeAsFileTime() and gettimeofday() unconditionally on supported Windows and non-Windows platforms, respectively. Remove outdated portability complexity.
* KWSys: Improve SplitPath method documentationBrad King2010-08-271-3/+3
| | | | | | Document explicitly that the first component always exists. Fix the documentation of SplitPathRootComponent to note that home directory roots (~/ and ~u/) always have a trailing slash.
* KWSys: Remove "copyPermissions" parametersBrad King2010-06-041-16/+7
| | | | | | | | The CopyFileIfDifferent, CopyFileAlways, CopyAFile and CopyADirectory methods should always copy permissions. The special cases in which a caller would pass copyPermissions=false should be handled at the call site. The parameter needlessly complicates the interface and semantics of these methods.
* Convert KWSys to OSI-approved BSD LicenseBrad King2009-09-281-11/+9
| | | | | | | This converts the KWSys license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the KWSys copyright to cover the full development time range.
* Optimize KWSys SystemTools::FileExists on WindowsBrad King2009-09-221-1/+14
| | | | | | | | | | We optimize this method by using the GetFileAttributesExA native Windows API to check for file existence when possible. For real Windows builds we always use it. For Cygwin we use cygwin_conv_to_win32_path to get a native Windows path if possible and otherwise fall back to 'access'. Cygwin-to-Windows path conversion and cache by Wojciech Migda. See issue #8826.
* ENH: move PutEnv to SystemToolsBill Hoffman2009-06-051-0/+4
|
* ENH: Remove obscure method from KWSys SystemToolsBrad King2009-04-211-8/+0
| | | | | This removes SystemTools::FileExistsInParentDirectories from KWSys since it is a special-purpose method that is not generally useful.
* BUG: Fix GetRealPath when realpath failsBrad King2009-02-091-1/+3
| | | | | | This patch from Philip Lowman teaches SystemTools::GetRealPath to deal with paths that do not exist by dealing with the case that realpath returns NULL. See issue #8423.
* BUG: Do not copy permissions of files when making the copy in an install ↵David Cole2008-12-181-9/+18
| | | | rule. If the source file was read-only, this prevents the subsequent set of the destination file's modification time, making the copied file always different in time-stamp than the original and always installing a new file with a new time stamp (but the same content) causing unnecessary downstream incremental rebuilds. As part of this fix, add an optional copyPermissions parameter to the SystemTools routines CopyFileIfDifferent, CopyFileAlways, CopyAFile and CopyADirectory. The copyPermissions parameter defaults to true to preserve the behavior of these routines for existing callers.
* ENH: Added WOW64 key view support to KWSys SystemTools' windows registry API.Brad King2008-05-271-3/+13
| | | | | | | - Add an argument to registry read/write/delete methods to specify a 32-bit or 64-bit view. - Default is the bit-ness of the running program. - See issue #7095.
* BUG: fix install problem on make and allow symlinks to cmake bin directoryBill Hoffman2008-03-271-0/+5
|
* STYLE: Remove references to std:: inside KWSys, even in comments. This will ↵Brad King2008-01-311-4/+4
| | | | allow a commit check to be added.
* ENH: Add SystemTools::SplitPathRootComponent and re-implement SplitPath to ↵Brad King2008-01-111-5/+21
| | | | use it. Add better treatment of user home directory paths.
* BUG: fix for bug 6136 make sure includes are not directoriesBill Hoffman2007-12-151-2/+5
|