From 6f4727aaa04df63e24e2d514c7f6ba924491b8e5 Mon Sep 17 00:00:00 2001 From: Rose <83477269+AtariDreams@users.noreply.github.com> Date: Sat, 23 Oct 2021 11:27:46 -0400 Subject: Source: Replace C headers with C++ ones In applicable areas only, of course. --- Source/CPack/cmCPackDragNDropGenerator.h | 3 +-- Source/CPack/cmCPackLog.h | 3 +-- Source/CTest/cmCTestBuildAndTestHandler.h | 3 +-- Source/CTest/cmCTestBuildHandler.h | 3 +-- Source/CTest/cmCTestGenericHandler.h | 3 +-- Source/CTest/cmCTestLaunch.cxx | 3 ++- Source/CTest/cmCTestLaunchReporter.cxx | 3 ++- Source/CTest/cmCTestMultiProcessHandler.h | 2 +- Source/CTest/cmCTestRunTest.h | 3 +-- Source/CTest/cmCTestTestHandler.h | 3 +-- Source/CTest/cmProcess.h | 4 ++-- Source/bindexplib.h | 3 +-- Source/cmAffinity.cxx | 2 +- Source/cmGlobalVisualStudio7Generator.cxx | 3 +-- Source/cmIDEOptions.cxx | 3 +-- Source/cmLocalVisualStudio7Generator.cxx | 3 ++- Source/cmSystemTools.cxx | 2 +- Source/cmVisualStudioSlnParser.h | 3 +-- Source/cmVisualStudioWCEPlatformParser.h | 3 +-- Source/cm_codecvt.cxx | 6 +++--- Source/cmcmd.cxx | 1 - 21 files changed, 26 insertions(+), 36 deletions(-) diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h index 310b0ab..c96d035 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.h +++ b/Source/CPack/cmCPackDragNDropGenerator.h @@ -4,12 +4,11 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include #include #include #include -#include - #include "cmCPackGenerator.h" class cmGeneratedFileStream; diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index 6cec39c..aa9a17f 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -4,12 +4,11 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include #include #include #include -#include - #define cmCPack_Log(ctSelf, logType, msg) \ do { \ std::ostringstream cmCPackLog_msg; \ diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h b/Source/CTest/cmCTestBuildAndTestHandler.h index b9cc35c..e022e68 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.h +++ b/Source/CTest/cmCTestBuildAndTestHandler.h @@ -4,12 +4,11 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include #include #include #include -#include - #include "cmCTestGenericHandler.h" #include "cmDuration.h" diff --git a/Source/CTest/cmCTestBuildHandler.h b/Source/CTest/cmCTestBuildHandler.h index 58e8d9c..e33294d 100644 --- a/Source/CTest/cmCTestBuildHandler.h +++ b/Source/CTest/cmCTestBuildHandler.h @@ -5,13 +5,12 @@ #include "cmConfigure.h" // IWYU pragma: keep #include +#include #include #include #include #include -#include - #include "cmsys/RegularExpression.hxx" #include "cmCTestGenericHandler.h" diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h index b4b0ad8..4bdb9c2 100644 --- a/Source/CTest/cmCTestGenericHandler.h +++ b/Source/CTest/cmCTestGenericHandler.h @@ -4,12 +4,11 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include #include #include #include -#include - #include "cmCTest.h" #include "cmSystemTools.h" #include "cmValue.h" diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index 15c443a..4a33869 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -20,9 +20,10 @@ #include "cmake.h" #ifdef _WIN32 +# include // for std{out,err} and fileno + # include // for _O_BINARY # include // for _setmode -# include // for std{out,err} and fileno #endif cmCTestLaunch::cmCTestLaunch(int argc, const char* const* argv) diff --git a/Source/CTest/cmCTestLaunchReporter.cxx b/Source/CTest/cmCTestLaunchReporter.cxx index 5334a93..149ba5d 100644 --- a/Source/CTest/cmCTestLaunchReporter.cxx +++ b/Source/CTest/cmCTestLaunchReporter.cxx @@ -13,9 +13,10 @@ #include "cmXMLWriter.h" #ifdef _WIN32 +# include // for std{out,err} and fileno + # include // for _O_BINARY # include // for _setmode -# include // for std{out,err} and fileno #endif cmCTestLaunchReporter::cmCTestLaunchReporter() diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h index 5de42f9..2f5ad40 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.h +++ b/Source/CTest/cmCTestMultiProcessHandler.h @@ -4,6 +4,7 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include #include #include #include @@ -11,7 +12,6 @@ #include #include -#include #include "cmCTest.h" #include "cmCTestResourceAllocator.h" diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h index 2082156..7a97fa9 100644 --- a/Source/CTest/cmCTestRunTest.h +++ b/Source/CTest/cmCTestRunTest.h @@ -4,14 +4,13 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include #include #include #include #include #include -#include - #include "cmCTest.h" #include "cmCTestMultiProcessHandler.h" #include "cmCTestTestHandler.h" diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 3ac05e7..135e764 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -5,6 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include +#include #include #include #include @@ -13,8 +14,6 @@ #include #include -#include - #include "cmsys/RegularExpression.hxx" #include "cmCTest.h" diff --git a/Source/CTest/cmProcess.h b/Source/CTest/cmProcess.h index a44aeb0..64475c2 100644 --- a/Source/CTest/cmProcess.h +++ b/Source/CTest/cmProcess.h @@ -5,14 +5,14 @@ #include "cmConfigure.h" // IWYU pragma: keep #include +#include +#include #include #include #include #include #include -#include -#include #include "cmDuration.h" #include "cmProcessOutput.h" diff --git a/Source/bindexplib.h b/Source/bindexplib.h index bd1398f..c5d81c7 100644 --- a/Source/bindexplib.h +++ b/Source/bindexplib.h @@ -4,11 +4,10 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include #include #include -#include - class bindexplib { public: diff --git a/Source/cmAffinity.cxx b/Source/cmAffinity.cxx index 35443e7..591199b 100644 --- a/Source/cmAffinity.cxx +++ b/Source/cmAffinity.cxx @@ -12,7 +12,7 @@ # define CM_HAVE_CPU_AFFINITY # include # include -// On some platforms CPU_ZERO needs memset but sched.h forgets string.h +// On some platforms CPU_ZERO needs memset but sched.h forgets cstring # include // IWYU pragma: keep # if defined(__FreeBSD__) # include diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 6876e61..58b24fc 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalVisualStudio7Generator.h" +#include #include #include @@ -10,8 +11,6 @@ #include -#include - #include "cmsys/Encoding.hxx" #include "cmGeneratedFileStream.h" diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index b53319f..c476d47 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -2,12 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIDEOptions.h" +#include #include #include -#include - #include "cmsys/String.h" #include "cmAlgorithms.h" diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 5d3e11a..7223049 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -2,13 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLocalVisualStudio7Generator.h" +#include // for isspace + #include #include #include #include -#include // for isspace #include "cmComputeLinkInformation.h" #include "cmCustomCommand.h" diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 1b07358..3699be3 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -540,7 +540,7 @@ size_t cmSystemTools::CalculateCommandLineLengthLimit() #if defined(_SC_ARG_MAX) // ARG_MAX is the maximum size of the command and environment // that can be passed to the exec functions on UNIX. - // The value in limits.h does not need to be present and may + // The value in climits does not need to be present and may // depend upon runtime memory constraints, hence sysconf() // should be used to query it. long szArgMax = sysconf(_SC_ARG_MAX); diff --git a/Source/cmVisualStudioSlnParser.h b/Source/cmVisualStudioSlnParser.h index 1c33759..60be598 100644 --- a/Source/cmVisualStudioSlnParser.h +++ b/Source/cmVisualStudioSlnParser.h @@ -5,13 +5,12 @@ #include "cmConfigure.h" // IWYU pragma: keep #include +#include #include #include #include -#include - class cmSlnData; class cmVisualStudioSlnParser diff --git a/Source/cmVisualStudioWCEPlatformParser.h b/Source/cmVisualStudioWCEPlatformParser.h index eb4e978..2fff91c 100644 --- a/Source/cmVisualStudioWCEPlatformParser.h +++ b/Source/cmVisualStudioWCEPlatformParser.h @@ -4,12 +4,11 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include #include #include #include -#include - #include "cmXMLParser.h" // This class is used to parse XML with configuration diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx index df4440f..ddee968 100644 --- a/Source/cm_codecvt.cxx +++ b/Source/cm_codecvt.cxx @@ -3,10 +3,10 @@ #include "cm_codecvt.hxx" #if defined(_WIN32) -# include +# include +# include -# include -# include +# include # undef max # include "cmsys/Encoding.hxx" #endif diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 8376d4d..32c01e5 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -58,7 +58,6 @@ #ifdef _WIN32 # include // for _O_BINARY # include // for _setmode -# include // for std{out,err} and fileno #endif #include -- cgit v0.12