-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace use of WIN32 CPP macro with _MSC_VER (#1124)
+ This generally more standardized. Also, `WIN32` might be defined for non-MSVC environments on Windows platforms. + `WIN32` is the correct variable to check within CMake files. + Fix copyright blocks based on pre-commit-hook.
- Loading branch information
1 parent
39f9f38
commit 347d3d1
Showing
18 changed files
with
65 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* \author Mike Berry <[email protected]>, Kelly Thompson <[email protected]> | ||
* \date Wednesday, Aug 09, 2017, 11:45 am | ||
* \brief Helper functions to generate string for core affinity. | ||
* \note Copyright (C) 2017-2020 Triad National Security, LLC., All rights reserved. | ||
* \note Copyright (C) 2019-2021 Triad National Security, LLC., All rights reserved. | ||
* | ||
* These functions are needed by c4's xthi and ythi programs to report human readable thread | ||
* bindings. It is also used by the unit test for libquo. | ||
|
@@ -20,7 +20,7 @@ | |
#include <bitset> | ||
#include <sstream> | ||
|
||
#ifdef WIN32 | ||
#ifdef _MSC_VER | ||
#include <processthreadsapi.h> // requries SystemCall.hh to be loaded first. | ||
#endif | ||
|
||
|
@@ -102,7 +102,7 @@ inline int sched_getaffinity(pid_t /*pid*/, size_t /*cpu_size*/, cpu_set_t *cpu_ | |
|
||
#endif | ||
|
||
#ifdef WIN32 | ||
#ifdef _MSC_VER | ||
|
||
//! \param[in] num_cpu Number of CPU's per node. | ||
inline std::string cpuset_to_string(unsigned const num_cpu) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
//--------------------------------------------*-C++-*---------------------------------------------// | ||
/*! | ||
* \file ds++/DracoStrings.cc | ||
* \author Kelly G. Thompson <[email protected] | ||
* \author Kelly G. Thompson <[email protected]> | ||
* \date Wednesday, Aug 23, 2017, 12:48 pm | ||
* \brief Encapsulates common string manipulations (implementation). | ||
* \note Copyright (C) 2017-2020 Triad National Security, LLC. All rights reserved. */ | ||
* \note Copyright (C) 2017-2021 Triad National Security, LLC., All rights reserved. */ | ||
//------------------------------------------------------------------------------------------------// | ||
|
||
#include "DracoStrings.hh" | ||
|
@@ -53,7 +53,7 @@ template <> auto parse_number_impl<uint64_t>(std::string const &str) -> uint64_t | |
} | ||
|
||
// See notes in DracoStrings.hh about this CPP block | ||
#if defined(WIN32) || defined(APPLE) | ||
#if defined(_MSC_VER) || defined(APPLE) | ||
|
||
template <> auto parse_number_impl<long>(std::string const &str) -> long { | ||
return std::stol(str); // use stoull or stul? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,7 @@ | |
* \author Kelly G. Thompson <[email protected] | ||
* \date Wednesday, Aug 23, 2017, 12:48 pm | ||
* \brief Encapsulates common string manipulations. | ||
* \note Copyright (C) 2017-2020 Triad National Security, LLC. | ||
* All rights reserved. */ | ||
* \note Copyright (C) 2017-2021 Triad National Security, LLC., All rights reserved. */ | ||
//------------------------------------------------------------------------------------------------// | ||
|
||
#ifndef rtt_dsxx_DracoStrings_hh | ||
|
@@ -114,7 +113,7 @@ template <> auto parse_number_impl<uint64_t>(std::string const &str) -> uint64_t | |
// If we are using Visual Studio, we need these definitions. I expect that they will be needed for | ||
// 32-bit Linux as well, but I can't test that. Might need to add "|| (defined(__GNUC__) && | ||
// __WORDSIZE != 64)" | ||
#if defined(WIN32) || defined(APPLE) | ||
#if defined(_MSC_VER) || defined(APPLE) | ||
|
||
template <> auto parse_number_impl<long>(std::string const &str) -> long; | ||
template <> auto parse_number_impl<unsigned long>(std::string const &str) -> unsigned long; | ||
|
@@ -126,8 +125,7 @@ template <> auto parse_number_impl<double>(std::string const &str) -> double; | |
|
||
//------------------------------------------------------------------------------------------------// | ||
/*! | ||
* \brief Convert a string into a floating-point type or an integral type with | ||
* error checking. | ||
* \brief Convert a string into a floating-point type or an integral type with error checking. | ||
* | ||
* \param[in] str The string that contains a number. | ||
* \param[in] verbose Should the function print conversion message warnings (default: true). | ||
|
@@ -140,7 +138,7 @@ template <> auto parse_number_impl<double>(std::string const &str) -> double; | |
* appropriate. | ||
* | ||
* Consider catching thrown conversion errors using code similar to this: | ||
* | ||
* \code | ||
try { | ||
parse_number<T>(str); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.