Commit Graph

58 Commits

Author SHA1 Message Date
Brad King
9e6b07f5ff Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2020-03-04 (6af2e592)
2020-03-04 08:00:24 -05:00
Brad King
71764b88d6 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2020-02-25 (b14ce28a)
2020-02-25 09:41:26 -05:00
Brad King
fc6eced05e Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2020-02-17 (3e117fe1)
2020-02-17 11:59:07 -05:00
Brad King
56879273dc Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2019-09-18 (c6bc38c1)
2019-09-18 09:26:40 -04:00
Brad King
6a9de634b2 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2019-08-29 (08f14d96)
2019-08-29 13:07:11 -04:00
Brad King
d46bac5d38 Makefile: Fix regression in dependencies on relative includes
Since commit a13a5c948e (Replace use of CollapseCombinedPath with
CollapseFullPath, 2019-03-19, v3.15.0-rc1~361^2~1), one code path now
calls `CollapseFullPath` with a base path that may be relative.
Backport KWSys commit c6f8e24a3 (SystemTools: Fix CollapseFullPath with
relative base path, 2019-07-24) to handle such base paths.

This case occurs when a build tree is placed in a directory inside a
source tree such that CMake is willing to generate a relative path from
the build tree to the source tree.  Add a test covering this case.

Fixes: #19507
2019-07-24 11:37:31 -04:00
Brad King
d67ce0a61e Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2019-01-24 (b9dd1636)
2019-01-24 09:52:25 -05:00
Brad King
4eae1c0816 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-06-14 (2b0ca1d8)
2018-06-14 11:26:37 -04:00
Brad King
81870f1159 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-06-01 (8ef62b28)
2018-06-01 12:54:13 -04:00
Brad King
b730097788 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-05-18 (5357cfc4)
2018-05-18 09:52:13 -04:00
Brad King
4c90e94368 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-03-29 (488f2031)
2018-03-29 11:41:57 -04:00
Brad King
be46f9fb6e Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-02-01 (04fcc449)
2018-02-01 08:15:44 -05:00
Brad King
f8e8946815 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-01-23 (0579db1c)
2018-01-24 14:11:07 -05:00
Brad King
834d187841 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-12-12 (3ba214b7)
2017-12-12 07:51:51 -05:00
Brad King
f1a4ecdc0c Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-10-10 (239bc737)
2017-10-10 08:43:41 -04:00
Brad King
90f1b9ad4e Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-09-30 (f108739d)
2017-09-30 10:07:56 -04:00
Brad King
060cef0c44 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-08-11 (e1006189)
2017-08-11 10:13:23 -04:00
Brad King
5e9bd8a2ea Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-05-31 (bd0bbad7)
2017-05-31 09:11:14 -04:00
Brad King
16ebd9f615 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-05-16 (fe1f22ce)
2017-05-16 11:39:01 -04:00
Brad King
697a5d64d8 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-04-19 (9f6ffaff)
2017-04-19 08:02:06 -04:00
Brad King
ada8e0cac4 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-04-12 (23a4c211)
2017-04-12 09:10:22 -04:00
Brad King
ee77941a1f Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-01-16 (a423d829)
2017-01-16 14:06:29 -05:00
Brad King
95a97a40e4 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-11-09 (18c65411)
2016-11-09 09:23:18 -05:00
Brad King
04d94fbe92 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-09-14 (c4049689)

Issue: #16295
2016-09-14 09:49:37 -04:00
Brad King
8abca14034 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-08-03 (6d23dd7e)
2016-08-04 10:11:07 -04:00
Brad King
788bb14664 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-07-18 (19732229)
2016-07-19 08:27:19 -04:00
Brad King
306e2016bb Merge branch 'upstream-kwsys' into update-kwsys 2015-12-04 09:59:04 -05:00
Brad King
def90d5fa5 Merge branch 'upstream-kwsys' into update-kwsys 2015-09-29 10:10:03 -04:00
Brad King
c5cc3441b3 Merge branch 'upstream-kwsys' into update-kwsys 2015-09-02 10:23:17 -04:00
Brad King
49d293a795 Merge branch 'upstream-kwsys' into update-kwsys 2015-08-31 09:55:01 -04:00
Brad King
3da431379b Merge branch 'upstream-kwsys' into update-kwsys 2015-08-03 13:17:54 -04:00
Brad King
bf365792a1 Merge branch 'upstream-kwsys' into update-kwsys 2015-05-28 08:21:55 -04:00
Brad King
5868b4e2fb Merge branch 'upstream-kwsys' into update-kwsys 2014-10-31 13:11:58 -04:00
Brad King
daab3b3bdf Merge branch 'upstream-kwsys' into update-kwsys 2014-09-09 08:46:41 -04:00
Brad King
51c82c3a66 Merge branch 'upstream-kwsys' into update-kwsys 2014-08-11 09:30:22 -04:00
Brad King
60c783676c Merge branch 'upstream-kwsys' into update-kwsys 2014-08-04 10:16:34 -04:00
Brad King
5f525da0e3 Merge branch 'upstream-kwsys' into update-kwsys 2014-07-07 09:04:27 -04:00
Brad King
7fa16df4d7 Merge branch 'upstream-kwsys' into update-kwsys 2014-05-13 14:55:35 -04:00
Brad King
588d705cb1 Merge branch 'upstream-kwsys' into update-kwsys 2013-02-01 09:28:50 -05:00
Brad King
e48796b26b KWSys: Fix SystemTools environment memory handling (#13156)
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.
2012-04-27 08:13:52 -04:00
Brad King
3a14b6e556 KWSys: Do not mangle UNC paths in ConvertToUnixOutputPath (#10206)
This method replaces '//' with '/' to make the paths look nicer.
Originally it correctly skipped a leading '//' in a UNC path as the
comment says.  However, commit "Removed extra variable initializations"
(2005-04-15) accidentally removed the "pos=1" initializer.  It was then
incorrectly restored by commit "Added missing variable initialization"
(2005-04-15) as just "pos=0".  Restore the proper initializer.

The test for this added by commit "better coverage" (2006-07-31)
included incorrect output for a sample UNC-like path.  Fix it.
2010-12-14 18:13:03 -05:00
Brad King
de955e4b6d Convert KWSys to OSI-approved BSD License
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.
2009-09-28 11:37:35 -04:00
Brad King
3bd9d67488 BUG: Use angle-brackets to include testSystemTools.h to avoid problems with in-source builds. 2007-03-07 13:52:32 -05:00
Brad King
0edbb68352 ENH: Cleaned up KWSys tests to use test drivers. 2007-03-03 10:47:06 -05:00
Brad King
8a79d25927 COMP: Added missing headers. This partially addresses bug#3556. 2006-08-01 14:45:32 -04:00
Ken Martin
4f9fcad327 ENH: better coverage 2006-07-31 13:50:50 -04:00
Ken Martin
9e1f7773e9 BUG: fix some bad code and add a couple more tests 2006-07-28 14:47:37 -04:00
Ken Martin
f35c6d461a COMP: fix compile issue 2006-07-25 14:15:01 -04:00
Ken Martin
b379666b39 BUG: some bug fixes, better docs, and more coverage 2006-07-25 12:08:05 -04:00
Mathieu Malaterre
1defe94e31 STYLE: Minor style 2006-03-09 14:36:53 -05:00