| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Author: Nicolas Despres <nicolas.despres@gmail.com>
|
|
|
|
|
|
| |
We already use GetSystemTimeAsFileTime() and gettimeofday()
unconditionally on supported Windows and non-Windows platforms,
respectively. Remove outdated portability complexity.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This removes SystemTools::FileExistsInParentDirectories from KWSys since
it is a special-purpose method that is not generally useful.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
| |
allow a commit check to be added.
|
|
|
|
| |
use it. Add better treatment of user home directory paths.
|
| |
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
with the same interface.
|
| |
|
| |
|
|
|
|
| |
dynamic libraries. STYLE: Fix trailing white spaces
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
CMake
|
| |
|
| |
|
|
|
|
| |
symlinks as files when removing directory
|
| |
|
|
|
|
| |
argc/argv. Pulled and cleaned from PV/VV/VJ init code
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
still produces forward slashes in the root component.
|
| |
|
| |
|