1. 24 Aug, 2015 1 commit
  2. 03 Aug, 2015 2 commits
    • Jean-Christophe Fillion-Robin's avatar
      SystemTools: Fix DetectFileType failure on directory · 6d83c113
      Jean-Christophe Fillion-Robin authored
      Some operating systems allow directories to be opened and read like
      files while others do not.  Simply check for a directory type first.
      Change-Id: Ic970f662d5aa887ace4a8f166ede7e0d1531d0d6
    • Jean-Christophe Fillion-Robin's avatar
      SystemTools: Fix DetectFileType failure on missing file · e5c23738
      Jean-Christophe Fillion-Robin authored
      Fix the following error reported by valgrind memcheck tool:
      ==31549== 256 bytes in 1 blocks are definitely lost in loss record 1 of 1
      ==31549==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==31549==    by 0x44F3AA: kwsys::SystemTools::DetectFileType(char const*, unsigned long, double) (in .../kwsysTestsCxx)
      ==31549==    by 0x43D75E: CheckFileOperations() (in .../kwsysTestsCxx)
      ==31549==    by 0x43FAC5: testSystemTools(int, char**) (in .../kwsysTestsCxx)
      ==31549==    by 0x434A2B: main (in .../kwsysTestsCxx)
      Change-Id: I42db9774bf30889b67921a538e00c1bf519a2719
  3. 27 May, 2015 1 commit
    • Brad King's avatar
      SystemTools: Teach RemoveFile to tolerate missing file · 61e0419f
      Brad King authored
      Some use cases may have a race condition such that the file to be
      removed disappears before we remove it.  Detect when removal fails due
      to the file already missing and tolerate it without failing.
      On Windows this requires using DeleteFileW instead of _wunlink because
      the latter does not seem to always update errno.  Try to delete before
      checking permissions because getting permissions will fail if the file
      is missing.
      Change-Id: If1922a15d742daca6d252c594284800d60cc1fce
  4. 16 Oct, 2014 2 commits
  5. 08 Sep, 2014 1 commit
  6. 06 Sep, 2014 1 commit
  7. 07 Aug, 2014 1 commit
  8. 30 Jul, 2014 1 commit
  9. 01 Jul, 2014 1 commit
    • Chuck Atkins's avatar
      SystemTools: Use extended paths on Windows for > 256 length · 8f991ab0
      Chuck Atkins authored
      Many Windows filesystem calls (but not all) have a MAX_PATH limitation
      of 260 characters (drive letter, colon, backslash, 256 char path, null).
      This is especially problematic for interacting with large highly nested
      build trees (the boost C++ libraries, for example). This limitation can
      be overcome by using extended length paths instead.  By converting
      local filesystem and network paths to extended length paths before
      passing them to the underlying APIs the maximum path length can be as
      large as 32767 characters. The new ConvertToWindowsExtendedPath
      function will convert "E:/a.txt" to "\\?\E:\a.txt" and "\\Foo\a.txt" to
      See also the MSDN article on "Naming Files, Paths, and Namespaces":
      This also adds a hidden CMake option, KWSYS_TEST_SYSTEMTOOLS_LONG_PATHS,
      which, when set to TRUE, will enable the extended length path tests.
      This is off by default since if something does go awry, the resulting
      leftovers could be difficult to delete manually.
      Change-Id: Ib7ac1f657241ed389169678d1c078c0d836f1c7b
  10. 03 Jun, 2014 1 commit
    • Chuck Atkins's avatar
      SystemTools: Refactor test file and directory locations · 97817ce7
      Chuck Atkins authored
      The full path for files used by SystemTools tests were preconfigured
      in a generated header file by CMake variables.  This begins to get
      unwieldy and clutters the CMake files once more variables and files
      get added.  In preperation for more file and directory tests being
      added, the preconfigured variables are now just the source and binary
      directories for which all tests can base themselves off of.
      Change-Id: Iae9e11592a3c040ce2e9cc90dbd1ccedfc3129ea
  11. 07 May, 2014 1 commit
  12. 31 Jan, 2013 1 commit
  13. 26 Apr, 2012 1 commit
    • Brad King's avatar
      KWSys: Fix SystemTools environment memory handling (#13156) · 48aeb751
      Brad King authored
      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.
  14. 14 Dec, 2010 1 commit
    • Brad King's avatar
      KWSys: Do not mangle UNC paths in ConvertToUnixOutputPath (#10206) · 6f76e7eb
      Brad King authored
      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.
  15. 28 Sep, 2009 1 commit
    • Brad King's avatar
      Convert KWSys to OSI-approved BSD License · 62db264e
      Brad King authored
      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.
  16. 07 Mar, 2007 1 commit
  17. 03 Mar, 2007 1 commit
  18. 01 Aug, 2006 1 commit
  19. 31 Jul, 2006 1 commit
  20. 28 Jul, 2006 1 commit
  21. 25 Jul, 2006 2 commits
  22. 09 Mar, 2006 1 commit
  23. 06 Oct, 2005 1 commit
  24. 05 Oct, 2005 1 commit
  25. 04 Oct, 2005 1 commit
  26. 20 Jun, 2005 1 commit
  27. 13 Apr, 2005 4 commits