summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.cxx
Commit message (Collapse)AuthorAgeFilesLines
* KWSys: Remove "copyPermissions" parametersBrad King2010-06-041-16/+11
| | | | | | | | 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.
* KWSys: Avoid stat in CopyFileAlways (#10790)Brad King2010-06-031-13/+1
| | | | | | | On Windows 7 the file size reported by 'stat' on a new file sometimes reports zero even though the real size is correct. This causes our CopyFileAlways method to falsely detect copy failure. Work around the problem by trusting the state of ofstream after writing the file.
* Fix for bug #10542, allow this to build on Tru64Bill Hoffman2010-05-041-0/+7
|
* Patch to avoid short name usage where possible. Get the actual case spelling ↵David Cole2010-04-091-61/+20
| | | | of a file name on 'Windows' without converting to short name and back again. Avoids bad behavior reported in http://bugs.winehq.org/show_bug.cgi?id=22286 when using cmake under a wine/msys/mingw installation on a Linux box. Thanks to Clinton Stimpson for preparing the patch.
* Mac has gettimeofday defined, but cmsys wasn't aware of that, so it was ↵Zach Mullen2009-11-241-1/+1
| | | | falling back to using time() which only provides second resolution. Fixed to allow usec res.
* Better fix for crash on Windows. This time it will even work on Linux, too. ↵David Cole2009-10-161-2/+14
| | | | That GetLineFromStream method while loop sure is fussy.
* Fix crash on Windows. If input stream is no good, do not try to read a line ↵David Cole2009-10-161-2/+3
| | | | from it. Return false and an empty line instead...
* 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.
* Restore KWSys SystemTools _WIN32 state on cygwinBrad King2009-09-241-2/+5
| | | | | | | | | | | The commit "Fix KWSys SystemTools build on cygwin with -mwin32" tried to restore the state of the _WIN32 definition that was broken by the commit "Optimize KWSys SystemTools::FileExists on Windows". It did so for the case of building with -mwin32 on cygwin, but since including <windows.h> defines _WIN32, it failed for the case of not using -mwin32. This commit restores the state of _WIN32 in all cases by undefining it after including <windows.h> if it was not defined beforehand.
* Fix KWSys SystemTools build on cygwin with -mwin32Brad King2009-09-231-2/+1
| | | | | | | Commit "Optimize KWSys SystemTools::FileExists on Windows" accidentally added "#undef _WIN32" when including <windows.h> on cygwin, which breaks builds using the -mwin32 flag. This commit removes that line and fixes the real error it was intended to avoid.
* Put a flag in that will stop system tools from deleting system environment ↵Bill Hoffman2009-09-221-0/+2
| | | | memory on exit, as it can cause gcov to crash the programs.
* Optimize KWSys SystemTools::FileExists on WindowsBrad King2009-09-221-21/+65
| | | | | | | | | | 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.
* COMP: attempt to fix more 'hidden by' warnings.Dave Partyka2009-08-061-1/+1
|
* ENH: try and see if using string.append instead of += will make valgrind not ↵Dave Partyka2009-07-261-4/+4
| | | | complaing that JoinPath is leaking.
* COMP: Remove useless variable assignmentBrad King2009-06-221-1/+0
| | | | | This removes an assignment whose result is never used, thus quieting a warning from Borland.
* ENH: use .exe on vmsBill Hoffman2009-06-111-1/+1
|
* ENH: Teach KWSys SystemTools about VMS pathsBrad King2009-06-101-2/+45
| | | | | | This teaches ConvertToUnixSlashes to convert VMS paths into posix-style paths. We also set the DECC$FILENAME_UNIX_ONLY feature so the process always sees posix-style paths on disk.
* ENH: fix warning on borlandBill Hoffman2009-06-051-9/+9
|
* ENH: move PutEnv to SystemToolsBill Hoffman2009-06-051-0/+27
|
* BUG: Fix removal of read-only directoriesBrad King2009-05-131-0/+13
| | | | | Read-only directories must be given write permission before we can remove files and subdirectories from them.
* ENH: check in almost building VMS stuff with VMSBuild directory since the ↵Bill Hoffman2009-04-231-1/+3
| | | | bootstrap script will not work on VMS
* ENH: Remove obscure method from KWSys SystemToolsBrad King2009-04-211-23/+0
| | | | | This removes SystemTools::FileExistsInParentDirectories from KWSys since it is a special-purpose method that is not generally useful.
* BUG: Fix SystemTools::IsSubDirectory on bad inputBrad King2009-04-201-0/+4
| | | | | | | | When SystemTools::GetParentDirectory was fixed to never remove the root path component from a full path we violated an assumption made by IsSubDirectory that eventually GetParentDirectory returns an empty string. This led to an infinite loop if the potential parent directory is empty, so we explicitly avoid that case.
* BUG: Replace brittle GetParentDirectory implBrad King2009-04-151-25/+1
| | | | | | | The previous change to this method broke cases where the input path does not exist. The SystemTools::GetParentDirectory method is redundant with the more robust SystemTools::GetFilenamePath. This replaces its implementation to just call GetFilenamePath.
* BUG: SystemTools::GetParentDirectory() will crash if "/" is passed in as ↵Yumin Yuan2009-04-151-1/+7
| | | | argement. Valid check is added to make sure the input argment exists, and if "/" is passed in, empty string will be returned.
* COMP:Fixed warnings.Francois Bertel2009-03-181-11/+16
|
* BUG: Work around broken GetLongPathName caseBrad King2009-02-091-0/+5
| | | | | | | On Windows the GetLongPathName API function does not work on some filesystems even if the file exists. In this case we should just use the original long path name and not the GetShortPathName result. See issue #8480.
* BUG: Fix GetRealPath when realpath failsBrad King2009-02-091-2/+14
| | | | | | 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-11/+17
| | | | 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: fix for VistaSebastien Barre2008-10-161-1/+1
|
* ENH: oopsSebastien Barre2008-10-161-0/+4
|
* ENH: fix for Windows VistaSebastien Barre2008-10-161-7/+22
|
* STYLE: Fix typo in GetFilenameLastExtension docsBrad King2008-10-101-1/+1
| | | | See issue #7797.
* ENH: add initial support for HAIKU OS from bug# 7425Bill Hoffman2008-09-151-1/+6
|
* ENH: Added WOW64 key view support to KWSys SystemTools' windows registry API.Brad King2008-05-271-9/+36
| | | | | | | - 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.
* COMP: sprintf warnings. DWORD should use %ld rather than %d. Also, const ↵Bill Lorensen2008-05-111-7/+7
| | | | char *p, a shadowed variable warning.
* ENH: Allow numbers in username in URL regex.Jeffrey Baumes2008-04-231-1/+1
|
* BUG: fix install problem on make and allow symlinks to cmake bin directoryBill Hoffman2008-03-271-0/+7
|
* COMP: Fix VS6 and old HP build. This source does not have the #define for hack.Brad King2008-01-211-0/+12
|
* BUG: Fix previous commit to not access empty strings out of bounds.Brad King2008-01-211-3/+3
|
* BUG: Make sure search paths never have double-slashes. Leading with two ↵Brad King2008-01-201-10/+35
| | | | slashes (//) on cygwin looks like a network path and delays while waiting for a non-existent machine.
* COMP: Fix build on borland.Brad King2008-01-121-2/+2
|
* ENH: Add SystemTools::SplitPathRootComponent and re-implement SplitPath to ↵Brad King2008-01-111-35/+98
| | | | use it. Add better treatment of user home directory paths.
* BUG: fix for bug 6136 make sure includes are not directoriesBill Hoffman2007-12-151-1/+7
|
* BUG: fixed an incomplete regexpPhilippe Pebay2007-12-061-2/+2
|
* COMP: Remove reference to vtksys. The unmangled kwsys name should be used ↵Brad King2007-12-051-2/+2
| | | | in this source.
* ENH: added two functions for URL parsing:Philippe Pebay2007-12-051-0/+57
| | | | | | | | 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: remove warningBill Hoffman2007-12-041-1/+1
|
* ENH: add a touch -E command to cmakeBill Hoffman2007-12-041-0/+36
|
* ENH: add support for the Syllable OS (http://www.syllable.org)Alexander Neundorf2007-11-241-0/+8
| | | | | | | | | | | major issues: -access() doesn't return false for an empty string (#ifdefed in cmake) -dlopen() doesn't return 0 on failure (#ifdefed in cmake and fixed now in Syllable) -the kwsys and Bootstrap tests fail with timeout due to the fact that I'm doing all that in qemu, which is quite slow -RPATH is now supported, so without modifying the test adapting DLL_PATH in Syllable is required for the tests to succeed -the Plugin test fails with an undefined reference to example_exe_function() in example_mod_1, it seems this isn't supported under Syllable Alex