Commit Graph

325 Commits

Author SHA1 Message Date
Brad King 168e44e202 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-03-31 (3392da1d)
2016-03-31 08:46:50 -04:00
Brad King ea04ec09d8 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-03-08 (6b60c184)
2016-03-08 09:29:23 -05:00
Brad King d010ba9fa7 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-02-22 (4847aedd)
2016-02-22 09:03:40 -05:00
Brad King 9821924d45 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-01-11 (e8bf616e)
2016-01-11 11:20:14 -05:00
Brad King 306e2016bb Merge branch 'upstream-kwsys' into update-kwsys 2015-12-04 09:59:04 -05:00
Brad King fe05ad9752 Merge branch 'upstream-kwsys' into update-kwsys 2015-12-01 08:46:55 -05:00
Brad King 8083285d1b Merge branch 'upstream-kwsys' into update-kwsys 2015-10-08 13:26:08 -04:00
Brad King def90d5fa5 Merge branch 'upstream-kwsys' into update-kwsys 2015-09-29 10:10:03 -04:00
Brad King 946e861519 Merge branch 'upstream-kwsys' into update-kwsys 2015-09-26 10:42:35 -04:00
Brad King ef29f5ef89 Merge branch 'upstream-kwsys' into update-kwsys 2015-09-14 09:24:05 -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 540f02531b Merge branch 'upstream-kwsys' into update-kwsys 2015-07-15 09:07:04 -04:00
Brad King 502430e39c Merge branch 'upstream-kwsys' into update-kwsys 2015-06-16 08:49:12 -04:00
Brad King bf365792a1 Merge branch 'upstream-kwsys' into update-kwsys 2015-05-28 08:21:55 -04:00
Brad King e538858349 Merge branch 'upstream-kwsys' into update-kwsys 2015-04-13 09:01:59 -04:00
Brad King e88f3b3bcc Merge branch 'upstream-kwsys' into update-kwsys 2015-03-02 08:41:17 -05:00
Brad King 266568654c Merge branch 'upstream-kwsys' into update-kwsys 2015-02-26 08:54:42 -05:00
Brad King 7e468cd8f9 Merge branch 'upstream-kwsys' into update-kwsys 2015-01-21 09:15:44 -05:00
Brad King e5b9142097 Merge branch 'upstream-kwsys' into update-kwsys 2015-01-10 12:09:04 -05:00
Brad King 5868b4e2fb Merge branch 'upstream-kwsys' into update-kwsys 2014-10-31 13:11:58 -04:00
Brad King 208530090d Merge branch 'upstream-kwsys' into update-kwsys 2014-09-26 09:34:26 -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 2903d609b1 Merge branch 'upstream-kwsys' into update-kwsys 2014-05-19 10:58:14 -04:00
Brad King 7fa16df4d7 Merge branch 'upstream-kwsys' into update-kwsys 2014-05-13 14:55:35 -04:00
Stephen Kelly 21c573f682 Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
2014-03-11 15:03:50 +01:00
Brad King 7db95df39d Merge branch 'upstream-kwsys' into update-kwsys 2014-03-04 10:19:33 -05:00
Brad King 2a943d9264 Merge branch 'upstream-kwsys' into update-kwsys 2013-12-19 10:44:29 -05:00
Brad King f668112039 Merge branch 'upstream-kwsys' into update-kwsys 2013-11-25 11:19:42 -05:00
Brad King f59693b971 Merge branch 'upstream-kwsys' into update-kwsys 2013-10-08 09:53:13 -04:00
Brad King 09b147b3a7 Merge branch 'upstream-kwsys' into update-kwsys 2013-08-07 08:18:32 -04:00
Brad King 635e19d607 Merge branch 'upstream-kwsys' into update-kwsys 2013-07-11 09:04:05 -04:00
Brad King 063617cd18 Merge branch 'upstream-kwsys' into update-kwsys 2013-06-26 09:52:46 -04:00
Brad King c91e88d0e1 Merge branch 'upstream-kwsys' into update-kwsys 2013-06-04 09:08:58 -04:00
Brad King 884e3edeb1 Merge branch 'upstream-kwsys' into update-kwsys 2013-06-03 10:23:31 -04:00
Brad King 2c0c59a2e1 Merge branch 'upstream-kwsys' into update-kwsys 2013-05-29 08:56:20 -04:00
Brad King b7593bf3f5 Merge branch 'upstream-kwsys' into update-kwsys 2013-05-07 08:38:10 -04:00
Brad King 0c04428d04 Merge branch 'upstream-kwsys' into update-kwsys 2013-04-26 16:08:35 -04:00
Brad King 7df291fb6e Merge branch 'upstream-kwsys' into update-kwsys 2013-02-07 08:34:56 -05:00
Brad King 588d705cb1 Merge branch 'upstream-kwsys' into update-kwsys 2013-02-01 09:28:50 -05:00
Brad King 6f6afbd69f Merge branch 'upstream-kwsys' into update-kwsys 2013-01-08 08:42:58 -05:00
Brad King e33fa5b678 Merge branch 'upstream-kwsys' into update-kwsys 2012-12-19 08:09:36 -05:00
Brad King 4b8d3639ad Merge branch 'upstream-kwsys' into import-KWSys-subtree 2012-10-01 15:18:30 -04:00
Brad King 0fbaa63cb2 KWSys: Remove unused environ declaration from SystemTools
Commit "KWSys: Fix SystemTools environment memory handling" (2012-04-26)
added a _WIN32 case inside !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H to dllimport
the "environ" global.  Howver, KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H is true
on every Windows toolchain we support so the case is never reached.
Furthermore, even if it were reached the use of dllimport is incorrect
because the toolchain might not be compiling with a dynamic runtime
library.  Remove the unused incorrect line and supporting conditionals.
2012-05-23 08:32:57 -04: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 c544545c63 KWSys: Correctly handle empty environment variables
Fix a crash which occurs when SystemTools::GetPath attempts to process
an empty environment variable.

Author: Vladimir Panteleev <vladimir@thecybershadow.net>
2011-12-15 15:45:09 -05:00