diff --git a/CommandLineArguments.cxx b/CommandLineArguments.cxx index a2ed874c89c2f88c050df9e48eb0fc4f3edfc1db..e45db36ac25f63c6b2f891b0c2102dfcc345a4e4 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 5cad934ec37125735f6c7e3dc5e5fb8b4bfaa76e..c68c73c8ea8f8aa0cd97343b1241674d7d6842c3 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 8e30f92f2707f7e37c489bf22b9c6cb247273396..fad6ee19f7e15b1d6e03c6a083030e5d7b80a06e 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 460cb9434c32f7ccf58c30ad2df09f149b3396a9..4f74eba532383b03e730365d1805311b27158a69 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 60a467e9cbb2e0fb074b61d6d0e73567466d92ce..c56582385d4f1bbbc4124e4cdd8f3a51e4053889 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 033c047c0f4efbc3615ea0be19ff5dbea601d1f1..fcfcc6c43099f243853a41356b7b9b6bafcccb5c 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 79ebe1a215cb06f3c03961037aeaacc5ad02b0ef..0786751592cd802e8bb6a1a5111dcbcb4bc1d690 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 7e4c707ec680f38b78ca01dc6aa0f4fa2e05bf3f..2f6b735784e7ecde5170d8082e96341bc9eb1548 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 d672aede8e0334f15dca8f835e2b410375954cb3..6f2004b49e5bfc63c800628a607670ee3ba8bb83 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 5009e988773c6469967088c64a714d58aded9fdf..57623781fc2f7eecdd3e50976b3f381f581558ee 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 8909b49782b8e54a309bc29a7a1a87b2e5ce1111..edbbbe9225a505aa1f20ccc7b73855182956099f 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