summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.hxx.in
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* ENH: added two functions for URL parsing:Philippe Pebay2007-12-051-0/+30
| | | | | | | | 1. an "abridged" version that separates protocol from dataglom in an expression with the form protocol://dataglom 2. a "full" version that parses protocol, username, password, hostname, port, and path in a standard URL (all of these variables are optional, except for protocol and hostname).
* ENH: add a touch -E command to cmakeBill Hoffman2007-12-041-0/+5
|
* STYLE: fixed misspellings of Mac OS XSean McBride2007-10-261-1/+1
|
* ENH: speed up actual path name by cache on windowsBill Hoffman2007-10-021-0/+1
|
* ENH: Added kwsys SystemTools::CreateSymlink and SystemTools::ReadSymlink.Brad King2007-03-121-0/+12
|
* ENH: added a limit to the getline methodKen Martin2007-03-011-1/+2
|
* ENH: Added JoinPath overload that accepts an iterator range.Brad King2006-08-171-0/+3
|
* ENH: better coverageKen Martin2006-07-311-17/+14
|
* BUG: some bug fixes, better docs, and more coverageKen Martin2006-07-251-0/+1
|
* ENH: Added always/if-different option to CopyADirectory. Added CopyAFile ↵Brad King2006-05-051-3/+14
| | | | with the same interface.
* ENH: add patch for finding applications on OSXBill Hoffman2006-04-131-1/+22
|
* ENH: Use const char where it should have been. At same time fix Bug#2958Mathieu Malaterre2006-03-171-1/+1
|
* ENH: Add documentation on the problem with system wide path for looking up ↵Mathieu Malaterre2006-03-101-32/+32
| | | | dynamic libraries. STYLE: Fix trailing white spaces
* COMP: Fix problem with STL on HP, and fix reusing the same variable in for loopsAndy Cedilnik2006-02-081-3/+3
|
* ENH: Move relative path to kwsysAndy Cedilnik2006-02-071-0/+18
|
* ENH: Add some doc for visible classMathieu Malaterre2006-02-071-0/+4
|
* ENH: fix for iccBill Hoffman2006-01-171-1/+0
|
* ENH: add support for watcom wmake and wcl386Bill Hoffman2006-01-171-0/+1
|
* ENH: Add another signature to FindProgram that matches more to the one from ↵Andy Cedilnik2005-12-101-0/+5
| | | | CMake
* ENH: Add an accessor for the maximum file lengthAndy Cedilnik2005-10-121-0/+5
|
* ENH: add method to attempt to check if a file is text or binarySebastien Barre2005-07-281-1/+21
|
* BUG: Revert the change to FileIsDirectory. Add FileIsSymlink and treat ↵Andy Cedilnik2005-07-121-0/+5
| | | | symlinks as files when removing directory
* ENH: add method to escape some chars in a stringSebastien Barre2005-06-131-0/+6
|
* ENH: add convenience function to convert Windows command line args into Unix ↵Sebastien Barre2005-05-281-4/+13
| | | | argc/argv. Pulled and cleaned from PV/VV/VJ init code
* ENH: Add split that splits on arbitrary separatorAndy Cedilnik2005-05-041-0/+1
|
* ENH: Expose ConvertToUnixOutputPathAndy Cedilnik2005-05-041-2/+3
|
* COMP: Do not do va_list hack if there is no std:: namespace.Brad King2005-04-211-1/+1
|
* COMP: Attempt to fix problem with building on SGIAndy Cedilnik2005-04-191-0/+19
|
* ENH: move convenience method to get OS name and version from KWApp to KWSys.Sebastien Barre2005-04-151-0/+6
|
* ENH: optimization of cwd and do not leak library handleBill Hoffman2005-04-121-2/+1
|
* BUG: fix for bug 1717 incorrect path sent to dart serverBill Hoffman2005-04-071-0/+8
|
* ENH: SplitPath now supports slashes in both directions in the input path but ↵Brad King2005-03-291-2/+1
| | | | still produces forward slashes in the root component.
* ENH: move EstimateFormatLength to kwsysSebastien Barre2005-03-281-0/+12
|
* ENH: add last two small funcs from vtkString. Done removing depsSebastien Barre2005-03-111-0/+11
|