1. 31 Oct, 2013 3 commits
  2. 15 Oct, 2013 2 commits
    • David Cole's avatar
      SystemTools: Move typedef mode_t inside the SystemTools class · f67bb2ba
      David Cole authored
      Cleans up a smidge of global namespace pollution. Allows using this
      header file in the same compilation unit with other header files
      that may also contain a mode_t typedef, possibly with a different
      underlying type.
      Actually encountered in the wild when trying to compile a class that
      uses both log4cpp and VTK.
      Change-Id: Iba5592778fc21d66946026847537d914e56f332b
    • Raphael Kubo da Costa's avatar
      SystemInformation: Include backtrace-related headers on FreeBSD · 6eab64c3
      Raphael Kubo da Costa authored and Brad King's avatar Brad King committed
      This was probably broken for a long while, but the problem was not apparent
      because the check for execinfo.h would fail by default because
      -I/usr/local/include was not being passed to the compiler when making the
      checks for the header's existence.
      Now that very recent FreeBSD versions (ie. 10-CURRENT) have NetBSD's
      libexecinfo in base (and it is thus installed into /usr), the
      backtrace-related checks would pass, but the required headers were not being
      included in SystemInformation.cxx.
      Change-Id: I3b91ed7ac0e6878035aee202b3336c536cc6d2ff
  3. 08 Oct, 2013 2 commits
  4. 14 Aug, 2013 1 commit
    • Rolf Eike Beer's avatar
      SystemInformation: fix truncation warnings · dbc8fa1b
      Rolf Eike Beer authored
      Fixes the following truncation warnings from g++ 4.8:
      kwsys/SystemInformation.cxx: In member function 'int cmsys::SystemInformationImplementation::GetFullyQualifiedDomainName(std::string&)':
      kwsys/SystemInformation.cxx:1738:31: warning: conversion to 'socklen_t {aka unsigned int}' from 'long unsigned int' may alter its value [-Wconversion]
               = (fam==AF_INET?sizeof(struct sockaddr_in):sizeof(struct sockaddr_in6));
      kwsys/SystemInformation.cxx:1738:58: warning: conversion to 'socklen_t {aka unsigned int}' from 'long unsigned int' may alter its value [-Wconversion]
               = (fam==AF_INET?sizeof(struct sockaddr_in):sizeof(struct sockaddr_in6));
      kwsys/SystemInformation.cxx: In member function 'bool cmsys::SystemInformationImplementation::QueryLinuxMemory()':
      kwsys/SystemInformation.cxx:3839:33: warning: conversion to 'int' from 'long unsigned int' may alter its value [-Wconversion]
           char *r=fgets(buffer, sizeof(buffer), fd); // Skip "total: used:..."
      Change-Id: I1016a7e31325ee550322dde7a21ffc92d6ca49dc
  5. 06 Aug, 2013 2 commits
  6. 02 Aug, 2013 1 commit
    • Burlen Loring's avatar
      SystemInformation : Better stack trace · 1d882d4c
      Burlen Loring authored
      Add supprt for C++ name demangling during call stack
      introspection. This will be enabled at compile time
      if the required system libraries,header files, and
      compiler features are detected. Add a method so that
      the stack trace may be obtained on demand not just
      from within the stack trace signal handler.
      Change-Id: Ie829f4b24ab331e39b97f54e63564df70f129b7e
  7. 26 Jul, 2013 1 commit
  8. 24 Jul, 2013 1 commit
  9. 10 Jul, 2013 1 commit
    • Brad King's avatar
      SystemTools: Implement IsSubDirectory without loop · beef6819
      Brad King authored
      The loop condition "while ( path.size() > dir.size() )" assumes that
      eventually path will be no longer than dir but "c:/" will always be
      longer than "/" and loop forever.  Simplify the implementation to avoid
      the loop and the assumption.
      Change-Id: I5613c7554ebd05b12cfe4882ac3bec4ecaa6e0ae
      CMake-Issue: 14283
  10. 01 Jul, 2013 1 commit
  11. 24 Jun, 2013 1 commit
    • Cory Quammen's avatar
      SystemTools: MakeDirectory() reports failure if path is file · 3d1d4e7c
      Cory Quammen authored
      If the path passed to MakeDirectory() pointed to an existing file (not
      directory), it would return true indicating that the directory was
      successfully created even though creation of the directory failed.
      Now it returns true only when the existing path is a directory and
      returns false otherwise.
      Change-Id: Ieb3e6352d63868c824df35f19187a8d396f75296
  12. 03 Jun, 2013 1 commit
  13. 31 May, 2013 2 commits
    • Brad King's avatar
      SystemTools: Touch with better than 1s resolution if possible · dccf7725
      Brad King authored
      On Windows use CreateFile (with FILE_FLAG_BACKUP_SEMANTICS so it works
      for directories), GetSystemTimeAsFileTime, and SetFileTime to touch.  On
      other platforms prefer utimensat, then utimes, then utime.
      Change-Id: Ie85fe3766661803e66f39975a147cd6f7320ea59
      CMake-Issue: 14020
    • Brad King's avatar
      SystemTools: Use COMPILE_DEFINITIONS to pass platform tests · e3370418
      Brad King authored
      Replace use of COMPILE_FLAGS with COMPILE_DEFINITIONS for the
      SystemTools.cxx source file property and spell out each definition on
      its own line.
      Change-Id: I213326b25fc7510107b78a8e233a3198862d9309
  14. 29 May, 2013 3 commits
  15. 28 May, 2013 1 commit
    • Brad King's avatar
      SystemTools: Fix FileIsDirectory with long paths · 9fd64779
      Brad King authored
      Allocate a buffer large enough to hold the input path when removing a
      trailing slash.  Use a local stack buffer when it is large enough and
      fall back to heap allocation otherwise.
      Change-Id: Ibc4b4c96c7b0fafae9f4b5cd7ea894bdd605a098
  16. 21 May, 2013 3 commits
    • Rolf Eike Beer's avatar
      fix warnings about sizeof() return value truncation · 039d9598
      Rolf Eike Beer authored
      Change-Id: Ib8b8b5d406e5123ac9c280bb5d2948916f5a997b
    • Rolf Eike Beer's avatar
      SystemInformation: fix truncation warnings · 87abd647
      Rolf Eike Beer authored
      .../kwsys/SystemInformation.cxx: In member function ‘int cmsys::SystemInformationImplementation::GetFullyQualifiedDomainName(std::string&)’:
      .../kwsys/SystemInformation.cxx:1475:31: warning: conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Wconversion]
               = (fam==AF_INET?sizeof(struct sockaddr_in):sizeof(struct sockaddr_in6));
      .../kwsys/SystemInformation.cxx:1475:58: warning: conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Wconversion]
               = (fam==AF_INET?sizeof(struct sockaddr_in):sizeof(struct sockaddr_in6));
      POSIX says the type of the second argument to getnameinfo() should be
      socklen_t so use that as the variable type here. Chances are high that this
      has the same size as size_t so the warning would go away.
      Change-Id: Ie2816b401a8fe7d615fa17a58b611e2cad14e4ea
    • Rolf Eike Beer's avatar
      Tests: fix a warning with acc · e8269442
      Rolf Eike Beer authored
      This should fix this compiler warning observed with aCC:
      Warning 863: ".../kwsys/testSystemInformation.cxx", line 93 # Result of operator << is widened from int to long.
              if (info.DoesCPUSupportFeature(1 << i))
      Change-Id: Ie33521c354b11e3e852c801537c0c82f82c7041c
  17. 06 May, 2013 1 commit
  18. 25 Apr, 2013 1 commit
  19. 21 Mar, 2013 1 commit
  20. 15 Mar, 2013 1 commit
    • Sean McBride's avatar
      SystemInformation: Replace __GNUG__ with __GNUC__ · 13f5badd
      Sean McBride authored and Brad King's avatar Brad King committed
      Commit 857bda17 (SystemInformation: Report more information, 2012-05-29)
      added use of __GNUG__ which is equivalent to __GNUC__ && __cplusplus.
      Since this is a C++ source file and we use __GNUC__ elsewhere it is more
      consistent and less redundant to use the latter.
      Change-Id: I6428e2601310dd35c14ac643dcec199b01977842
  21. 05 Feb, 2013 1 commit
    • Brad King's avatar
      SystemTools: Do not abort with no current directory · 5c34ed2e
      Brad King authored
      Remove the abort() from the internal Getcwd implementation.  All callers
      check the return value already.  Fix one caller's "else" behavior to
      avoid crashing.
      Change-Id: I3450c4942ffa108b2313877c9472820f6b465baa
  22. 31 Jan, 2013 2 commits
  23. 25 Jan, 2013 2 commits
  24. 14 Jan, 2013 3 commits
  25. 12 Jan, 2013 2 commits