From 2c179921190381acf1c3bc0b3919d05c9dc17e62 Mon Sep 17 00:00:00 2001 From: Sean McBride <sean@rogue-research.com> Date: Thu, 7 May 2020 22:38:04 -0400 Subject: [PATCH] Applied clang-tidy modernize-deprecated-headers --- CommandLineArguments.cxx | 6 +++--- EncodingCXX.cxx | 4 ++-- Glob.cxx | 6 +++--- RegularExpression.cxx | 4 ++-- SystemInformation.cxx | 12 ++++++------ SystemTools.cxx | 16 ++++++++-------- testCommandLineArguments.cxx | 4 ++-- testCommandLineArguments1.cxx | 4 ++-- testEncoding.cxx | 6 +++--- testFStream.cxx | 2 +- testSystemTools.cxx | 4 ++-- 11 files changed, 34 insertions(+), 34 deletions(-) diff --git a/CommandLineArguments.cxx b/CommandLineArguments.cxx index a2ed874..e45db36 100644 --- a/CommandLineArguments.cxx +++ b/CommandLineArguments.cxx @@ -20,9 +20,9 @@ #include <sstream> #include <vector> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include <cstdio> +#include <cstdlib> +#include <cstring> #ifdef _MSC_VER # pragma warning(disable : 4786) diff --git a/EncodingCXX.cxx b/EncodingCXX.cxx index 5cad934..c68c73c 100644 --- a/EncodingCXX.cxx +++ b/EncodingCXX.cxx @@ -17,8 +17,8 @@ # include "Encoding.hxx.in" #endif -#include <stdlib.h> -#include <string.h> +#include <cstdlib> +#include <cstring> #include <vector> #ifdef _MSC_VER diff --git a/Glob.cxx b/Glob.cxx index 8e30f92..fad6ee1 100644 --- a/Glob.cxx +++ b/Glob.cxx @@ -23,9 +23,9 @@ #include <string> #include <vector> -#include <ctype.h> -#include <stdio.h> -#include <string.h> +#include <cctype> +#include <cstdio> +#include <cstring> namespace KWSYS_NAMESPACE { #if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__) // On Windows and Apple, no difference between lower and upper case diff --git a/RegularExpression.cxx b/RegularExpression.cxx index 460cb94..4f74eba 100644 --- a/RegularExpression.cxx +++ b/RegularExpression.cxx @@ -28,8 +28,8 @@ # include "RegularExpression.hxx.in" #endif -#include <stdio.h> -#include <string.h> +#include <cstdio> +#include <cstring> namespace KWSYS_NAMESPACE { diff --git a/SystemInformation.cxx b/SystemInformation.cxx index 60a467e..c565823 100644 --- a/SystemInformation.cxx +++ b/SystemInformation.cxx @@ -64,9 +64,9 @@ typedef int siginfo_t; #else # include <sys/types.h> -# include <errno.h> // extern int errno; +# include <cerrno> // extern int errno; +# include <csignal> # include <fcntl.h> -# include <signal.h> # include <sys/resource.h> // getrlimit # include <sys/time.h> # include <sys/utsname.h> // int uname(struct utsname *buf); @@ -163,11 +163,11 @@ typedef struct rlimit ResourceLimitType; # undef KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP #endif -#include <ctype.h> // int isdigit(int c); +#include <cctype> // int isdigit(int c); +#include <cstdio> +#include <cstdlib> +#include <cstring> #include <memory.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #if defined(KWSYS_USE_LONG_LONG) # if defined(KWSYS_IOS_HAS_OSTREAM_LONG_LONG) diff --git a/SystemTools.cxx b/SystemTools.cxx index 033c047..fcfcc6c 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -50,15 +50,15 @@ # pragma set woff 1375 /* base class destructor not virtual */ #endif -#include <ctype.h> -#include <errno.h> +#include <cctype> +#include <cerrno> #ifdef __QNX__ # include <malloc.h> /* for malloc/free on QNX */ #endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> +#include <cstdio> +#include <cstdlib> +#include <cstring> +#include <ctime> #if defined(_WIN32) && !defined(_MSC_VER) && defined(__GNUC__) # include <strings.h> /* for strcasecmp */ @@ -70,7 +70,7 @@ // support for realpath call #ifndef _WIN32 -# include <limits.h> +# include <climits> # include <pwd.h> # include <sys/ioctl.h> # include <sys/time.h> @@ -81,7 +81,7 @@ # include <sys/param.h> # include <termios.h> # endif -# include <signal.h> /* sigprocmask */ +# include <csignal> /* sigprocmask */ #endif #ifdef __linux diff --git a/testCommandLineArguments.cxx b/testCommandLineArguments.cxx index 79ebe1a..0786751 100644 --- a/testCommandLineArguments.cxx +++ b/testCommandLineArguments.cxx @@ -12,8 +12,8 @@ #include <iostream> #include <vector> -#include <stddef.h> /* size_t */ -#include <string.h> /* strcmp */ +#include <cstddef> /* size_t */ +#include <cstring> /* strcmp */ static void* random_ptr = reinterpret_cast<void*>(0x123); diff --git a/testCommandLineArguments1.cxx b/testCommandLineArguments1.cxx index 7e4c707..2f6b735 100644 --- a/testCommandLineArguments1.cxx +++ b/testCommandLineArguments1.cxx @@ -12,8 +12,8 @@ #include <iostream> #include <vector> -#include <assert.h> /* assert */ -#include <string.h> /* strcmp */ +#include <cassert> /* assert */ +#include <cstring> /* strcmp */ int testCommandLineArguments1(int argc, char* argv[]) { diff --git a/testEncoding.cxx b/testEncoding.cxx index d672aed..6f2004b 100644 --- a/testEncoding.cxx +++ b/testEncoding.cxx @@ -10,10 +10,10 @@ #include KWSYS_HEADER(Encoding.h) #include <algorithm> +#include <clocale> +#include <cstdlib> +#include <cstring> #include <iostream> -#include <locale.h> -#include <stdlib.h> -#include <string.h> // Work-around CMake dependency scanning limitation. This must // duplicate the above list of headers. diff --git a/testFStream.cxx b/testFStream.cxx index 5009e98..5762378 100644 --- a/testFStream.cxx +++ b/testFStream.cxx @@ -7,7 +7,7 @@ #endif #include KWSYS_HEADER(FStream.hxx) -#include <string.h> +#include <cstring> #ifdef __BORLANDC__ # include <mem.h> /* memcmp */ #endif diff --git a/testSystemTools.cxx b/testSystemTools.cxx index 8909b49..edbbbe9 100644 --- a/testSystemTools.cxx +++ b/testSystemTools.cxx @@ -20,10 +20,10 @@ // left on disk. #include <testSystemTools.h> +#include <cstdlib> /* free */ +#include <cstring> /* strcmp */ #include <iostream> #include <sstream> -#include <stdlib.h> /* free */ -#include <string.h> /* strcmp */ #if defined(_WIN32) && !defined(__CYGWIN__) # include <io.h> /* _umask (MSVC) / umask (Borland) */ # ifdef _MSC_VER -- GitLab