Skip to content
Snippets Groups Projects
  1. Feb 22, 2019
    • Brad King's avatar
      Configure: Drop Large File Support macro definitions · 363bf5ab
      Brad King authored
      Historically we have defined macros like
      
      * `_LARGEFILE_SOURCE`
      * `_LARGEFILE64_SOURCE`
      * `_LARGE_FILES`
      * `_FILE_OFFSET_BITS`
      
      in `Configure.h` to activate large file support in system headers.  This
      requires consuming projects to include the header at the beginning of
      every translation unit in order to get the macros defined consistently.
      
      Instead these macros should be defined by the build system on the
      compiler command line.  Drop them from KWSys in favor of that approach.
      The macros are not needed as often as they once were anyway.
      363bf5ab
  2. May 31, 2018
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format-6.0 · 828b6837
      Kitware Robot authored and Brad King's avatar Brad King committed
      Run the `clang-format.bash` script to update all our C and C++ code to a
      new style defined by `.clang-format`.  Use `clang-format` version 6.0.
      
      * If you reached this commit for a line in `git blame`, re-run the blame
        operation starting at the parent of this commit to see older history
        for the content.
      
      * See the parent commit for instructions to rebase a change across this
        style transition commit.
      828b6837
  3. Nov 03, 2017
    • luzpaz's avatar
      Fix trivial typos in text · 9a1d5901
      luzpaz authored and Brad King's avatar Brad King committed
      Found using
      
          codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt`
      
      in CMake whereby the whitelist contained:
      
          ans
          dum
          helpfull
          emmited
          emmitted
          buil
          iff
          isnt
          nto
          ot
          pathes
          substract
          te
          todays
          upto
          whitespaces
      9a1d5901
  4. Sep 20, 2017
  5. Nov 04, 2016
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format · 6c973b46
      Kitware Robot authored and Brad King's avatar Brad King committed
      Run the `clang-format.bash` script to update all our C and C++ code to a new
      style defined by `.clang-format`.  Use `clang-format` version 3.8.
      
      * If you reached this commit for a line in `git blame`, re-run the blame
        operation starting at the parent of this commit to see older history
        for the content.
      
      * See the parent commit for instructions to rebase a change across this
        style transition commit.
      
      Change-Id: Ie3aedc03bfe5c3999d4a077fafb8c6f3bbffc5c5
      6c973b46
    • Brad King's avatar
      Simplify KWSys per-source license notices · c41c1bc4
      Brad King authored
      Per-source copyright/license notice headers that spell out copyright holder
      names and years are hard to maintain and often out-of-date or plain wrong.
      Precise contributor information is already maintained automatically by the
      version control tool.  Ultimately it is the receiver of a file who is
      responsible for determining its licensing status, and per-source notices are
      merely a convenience.  Therefore it is simpler and more accurate for
      each source to have a generic notice of the license name and references to
      more detailed information on copyright holders and full license terms.
      
      Our `Copyright.txt` file now contains a list of Contributors whose names
      appeared source-level copyright notices.  It also references version control
      history for more precise information.  Therefore we no longer need to spell
      out the list of Contributors in each source file notice.
      
      Replace KWSys per-source copyright/license notice headers with a short
      description of the license and links to `Copyright.txt` and online
      information available from "https://cmake.org/licensing#kwsys".
      
      Run the `filter-notices.bash` script to perform the replacements mechanically.
      Manually fix up the shebang line in one file.
      
      Change-Id: I8497f7c868664dcf54a8608ab302ad93c860b334
      c41c1bc4
    • Brad King's avatar
      Sort includes to stabilize include order w.r.t. clang-format · 15e90a3c
      Brad King authored
      The clang-format tool sorts `#include` lines within contiguous blocks.
      Separate blocks with blank lines and sort the include lines within them
      so that clang-format does not re-order anything.
      
      Change-Id: I96d6828f470b9a234464972172d46afab322487c
      15e90a3c
  6. Jul 19, 2016
    • Dāvis Mosāns's avatar
      FStream: Add MinGW support · 9d1dbd95
      Dāvis Mosāns authored and Brad King's avatar Brad King committed
      std::basic_filebuf::open(const wchar_t *) isn't part of C++ standard
      and it's only present for MSVC but it isn't present in libstdc++ (MinGW)
      so we implement this functionality using GNU libstdc++ stdio_filebuf
      extension and _wfopen function.
      
      Change-Id: I7df7a1b22ba272db23c8d962cb66ec71a278ef06
      9d1dbd95
  7. Dec 14, 2015
  8. Dec 04, 2015
    • Brad King's avatar
      FundamentalType: Drop KWSYS_CAN_CONVERT_UI64_TO_DOUBLE macro · 452b10d5
      Brad King authored
      This was used only for an old VS 6 version that did not support
      conversion of `unsigned __int64` to `double`.  Support for this compiler
      has been dropped from KWSys clients that used the macro.
      
      Change-Id: Ia61beaa0251fc2b6d77632af3e610c08f64d11eb
      452b10d5
  9. Oct 06, 2015
  10. Aug 28, 2015
  11. Jun 03, 2015
  12. Jan 09, 2015
    • Stephen Kelly's avatar
      Workaround SolarisStudio bug with libstdc++. · d30c9b03
      Stephen Kelly authored and Brad King's avatar Brad King committed
      Using iostream and cxxabi.h together causes a compile failure
      
       .../CC-gcc/include/c++/4.8.2/cxxabi.h", line 131: Error: Only one of a
       set of overloaded functions can be extern "C".
      
      See https://community.oracle.com/thread/3644901 for details.
      
      This only happens if the iostream include is before the cxxabi include.
      
      The available solutions are: re-order the includes in
      SystemInformation.cxx, skip the test for KWSYS_CXX_HAS_CXXABI, or cause
      it to fail by adding the include.  Do the latter for now.
      
      Change-Id: Ia1a6a6fca12eb9a42f4a4be5252f22fb6e74a318
      d30c9b03
  13. Oct 31, 2013
  14. Aug 02, 2013
    • 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
      1d882d4c
  15. May 31, 2013
    • 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
      dccf7725
  16. Jan 12, 2013
  17. Oct 09, 2012
    • Burlen Loring's avatar
      SystemInformation: support for resource limits · 6072e63b
      Burlen Loring authored
      Add methods to report host memory total, host memory available,
      process memory available, host memory used, and process memory
      used. In this context memory is unavailable if there are resource
      limits in place that would prevent its use. Such resource limits
      assumed to be applied on a per host basis both to cooperatively
      operating process groups, such as mpi programms running in parallel,
      and to individual processes. When reporting host memory available
      consult an application specified environment variable. When reporting
      process memory available consult unix resource rlimits and an
      application specified environment variable. The environmant variables
      provide a means of communicating resource limits that are being
      applied in a non-standard way.
      
      Change-Id: Ifb3b0fdaab8db0ab87140fa2dcafad3c51e2d874
      6072e63b
  18. May 02, 2012
    • Brad King's avatar
      KWSys: Remove dependencies on FundamentalType · 719638e2
      Brad King authored
      The hash_fun.hxx header is configured whether FundamentalType is enabled
      or not and so cannot depend on it.  Run the relevant platform tests
      whether or not FundamentalType is on and configure the result directly
      into hash_fun.  While at it, remove the dependence of SystemInformation
      on FundamentalType too since it needs only information that we now
      always compute.
      719638e2
  19. Apr 26, 2012
    • 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.
      48aeb751
  20. Nov 20, 2009
    • Brad King's avatar
      Check for 'long long' without computing size · 9782e865
      Brad King authored
      In KWSys IOStream we need to detect whether 'long long' exists but we do
      not need its size.  We avoid using CHECK_TYPE_SIZE because it does not
      work for types whose size varies across architectuers in Mac OS X
      universal binaries.  See issue #9913.
      9782e865
  21. Sep 28, 2009
    • 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.
      62db264e
  22. Aug 31, 2009
    • Brad King's avatar
      Define kwsys_ios_binary macro for std::ios::binary · 9350c584
      Brad King authored
      The 'binary' openmode does not exist on all compilers.  We define macro
      <kwsys>_ios_binary, where <kwsys> is the KWSys namespace, to refer to
      std::ios::binary if it exists and 0 otherwise.  Sample usage:
      
        kwsys_ios::ifstream fin(fn, kwsys_ios::ios::in | kwsys_ios_binary);
      9350c584
  23. Jul 27, 2009
  24. Jan 31, 2008
  25. Apr 20, 2007
  26. Oct 04, 2006
  27. Aug 27, 2006
  28. Aug 25, 2006
  29. Jan 17, 2006
Loading