summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgengjiawen <technicalcute@gmail.com>2019-02-17 10:53:47 +0800
committerDaniel Bevenius <daniel.bevenius@gmail.com>2019-02-27 05:35:53 +0100
commit8137668c531935c58347cd8e78147d3a9d3cc339 (patch)
tree68a560138be9cfe9325e46aebbaab3d1f607347e /src
parent42551909f7c20d6b4c4c6e28695958729177455d (diff)
downloadnode-new-8137668c531935c58347cd8e78147d3a9d3cc339.tar.gz
src: apply clang-tidy rule modernize-deprecated-headers
PR-URL: https://github.com/nodejs/node/pull/26159 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/api/exceptions.cc2
-rw-r--r--src/api/utils.cc2
-rw-r--r--src/async_wrap.h2
-rw-r--r--src/base64.h4
-rw-r--r--src/cares_wrap.cc4
-rw-r--r--src/debug_utils.cc2
-rw-r--r--src/env-inl.h4
-rw-r--r--src/env.cc2
-rw-r--r--src/env.h2
-rw-r--r--src/inspector_agent.cc4
-rw-r--r--src/inspector_agent.h2
-rw-r--r--src/inspector_io.cc2
-rw-r--r--src/inspector_io.h2
-rw-r--r--src/inspector_socket.cc2
-rw-r--r--src/module_wrap.cc2
-rw-r--r--src/node.cc12
-rw-r--r--src/node.h4
-rw-r--r--src/node_buffer.cc4
-rw-r--r--src/node_constants.cc4
-rw-r--r--src/node_crypto.cc6
-rw-r--r--src/node_crypto_bio.cc4
-rw-r--r--src/node_crypto_clienthello.h4
-rw-r--r--src/node_dtrace.cc2
-rw-r--r--src/node_errors.cc4
-rw-r--r--src/node_file.cc6
-rw-r--r--src/node_http2.h2
-rw-r--r--src/node_http_parser_impl.h4
-rw-r--r--src/node_internals.h4
-rw-r--r--src/node_main.cc2
-rw-r--r--src/node_options.cc2
-rw-r--r--src/node_os.cc6
-rw-r--r--src/node_process_events.cc2
-rw-r--r--src/node_process_methods.cc4
-rw-r--r--src/node_process_object.cc2
-rw-r--r--src/node_report.cc6
-rw-r--r--src/node_report.h4
-rw-r--r--src/node_stat_watcher.cc4
-rw-r--r--src/node_url.cc2
-rw-r--r--src/node_zlib.cc6
-rw-r--r--src/process_wrap.cc4
-rw-r--r--src/spawn_sync.cc2
-rw-r--r--src/stream_base.cc2
-rw-r--r--src/stream_wrap.cc4
-rw-r--r--src/string_bytes.cc4
-rw-r--r--src/string_search.h2
-rw-r--r--src/tcp_wrap.cc2
-rw-r--r--src/timers.cc2
-rw-r--r--src/tracing/node_trace_writer.cc2
-rw-r--r--src/tracing/traced_value.cc2
-rw-r--r--src/tracing/traced_value.h2
-rw-r--r--src/util.cc2
-rw-r--r--src/util.h12
52 files changed, 90 insertions, 90 deletions
diff --git a/src/api/exceptions.cc b/src/api/exceptions.cc
index 4d1cca8b65..897a4de365 100644
--- a/src/api/exceptions.cc
+++ b/src/api/exceptions.cc
@@ -7,7 +7,7 @@
#include "uv.h"
#include "v8.h"
-#include <string.h>
+#include <cstring>
namespace node {
diff --git a/src/api/utils.cc b/src/api/utils.cc
index e6993f33b0..b0998b6fb7 100644
--- a/src/api/utils.cc
+++ b/src/api/utils.cc
@@ -1,7 +1,7 @@
#include "node.h"
#include "node_internals.h"
-#include <signal.h>
+#include <csignal>
namespace node {
diff --git a/src/async_wrap.h b/src/async_wrap.h
index 6d5da4e4ee..09319c11bb 100644
--- a/src/async_wrap.h
+++ b/src/async_wrap.h
@@ -27,7 +27,7 @@
#include "base_object.h"
#include "v8.h"
-#include <stdint.h>
+#include <cstdint>
namespace node {
diff --git a/src/base64.h b/src/base64.h
index aedec375eb..ba60970431 100644
--- a/src/base64.h
+++ b/src/base64.h
@@ -5,8 +5,8 @@
#include "util.h"
-#include <stddef.h>
-#include <stdint.h>
+#include <cstddef>
+#include <cstdint>
namespace node {
//// Base 64 ////
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc
index 91226ebdf7..dadba4be7b 100644
--- a/src/cares_wrap.cc
+++ b/src/cares_wrap.cc
@@ -28,8 +28,8 @@
#include "util-inl.h"
#include "uv.h"
-#include <errno.h>
-#include <string.h>
+#include <cerrno>
+#include <cstring>
#include <vector>
#include <unordered_set>
diff --git a/src/debug_utils.cc b/src/debug_utils.cc
index fadcaa5061..f1024183cd 100644
--- a/src/debug_utils.cc
+++ b/src/debug_utils.cc
@@ -19,7 +19,7 @@
#include <execinfo.h>
#include <unistd.h>
#include <sys/mman.h>
-#include <stdio.h>
+#include <cstdio>
#endif
#else // __POSIX__
diff --git a/src/env-inl.h b/src/env-inl.h
index 63b71daf15..9752613b29 100644
--- a/src/env-inl.h
+++ b/src/env-inl.h
@@ -34,8 +34,8 @@
#include "node_context_data.h"
#include "node_worker.h"
-#include <stddef.h>
-#include <stdint.h>
+#include <cstddef>
+#include <cstdint>
#include <utility>
diff --git a/src/env.cc b/src/env.cc
index fce949f63a..3f30fda374 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -14,7 +14,7 @@
#include "tracing/traced_value.h"
#include "v8-profiler.h"
-#include <stdio.h>
+#include <cstdio>
#include <algorithm>
#include <atomic>
diff --git a/src/env.h b/src/env.h
index 3856f5241d..bd8ff76129 100644
--- a/src/env.h
+++ b/src/env.h
@@ -38,7 +38,7 @@
#include "uv.h"
#include "v8.h"
-#include <stdint.h>
+#include <cstdint>
#include <functional>
#include <list>
#include <unordered_map>
diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc
index 15edf7f00c..82d96e7ef7 100644
--- a/src/inspector_agent.cc
+++ b/src/inspector_agent.cc
@@ -16,13 +16,13 @@
#include "libplatform/libplatform.h"
-#include <string.h>
+#include <cstring>
#include <sstream>
#include <unordered_map>
#include <vector>
#ifdef __POSIX__
-#include <limits.h> // PTHREAD_STACK_MIN
+#include <climits> // PTHREAD_STACK_MIN
#include <pthread.h>
#endif // __POSIX__
diff --git a/src/inspector_agent.h b/src/inspector_agent.h
index 905b1e2841..b8b03b2edc 100644
--- a/src/inspector_agent.h
+++ b/src/inspector_agent.h
@@ -5,7 +5,7 @@
#include <memory>
-#include <stddef.h>
+#include <cstddef>
#if !HAVE_INSPECTOR
#error("This header can only be used when inspector is enabled")
diff --git a/src/inspector_io.cc b/src/inspector_io.cc
index 42643fa6f6..161ba276dd 100644
--- a/src/inspector_io.cc
+++ b/src/inspector_io.cc
@@ -13,7 +13,7 @@
#include "zlib.h"
#include <deque>
-#include <string.h>
+#include <cstring>
#include <vector>
namespace node {
diff --git a/src/inspector_io.h b/src/inspector_io.h
index bc09afdd3d..e4b4ee44f8 100644
--- a/src/inspector_io.h
+++ b/src/inspector_io.h
@@ -8,7 +8,7 @@
#include "uv.h"
#include <memory>
-#include <stddef.h>
+#include <cstddef>
#if !HAVE_INSPECTOR
#error("This header can only be used when inspector is enabled")
diff --git a/src/inspector_socket.cc b/src/inspector_socket.cc
index 7be9a01e0c..fd10231af7 100644
--- a/src/inspector_socket.cc
+++ b/src/inspector_socket.cc
@@ -11,7 +11,7 @@
#include "openssl/sha.h" // Sha-1 hash
#include <map>
-#include <string.h>
+#include <cstring>
#define ACCEPT_KEY_LENGTH base64_encoded_size(20)
#define BUFFER_GROWTH_CHUNK_SIZE 1024
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
index 93e791b522..3d55d12cc3 100644
--- a/src/module_wrap.cc
+++ b/src/module_wrap.cc
@@ -1,5 +1,5 @@
#include <algorithm>
-#include <limits.h> // PATH_MAX
+#include <climits> // PATH_MAX
#include <sys/stat.h> // S_IFDIR
#include "module_wrap.h"
diff --git a/src/node.cc b/src/node.cc
index b3195b7365..e46232405f 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -72,13 +72,13 @@
#include "large_pages/node_large_page.h"
#endif
-#include <errno.h>
+#include <cerrno>
#include <fcntl.h> // _O_RDWR
-#include <limits.h> // PATH_MAX
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <climits> // PATH_MAX
+#include <csignal>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <sys/types.h>
#include <string>
diff --git a/src/node.h b/src/node.h
index 53fb5fb51a..3ba5cf92f3 100644
--- a/src/node.h
+++ b/src/node.h
@@ -178,8 +178,8 @@ NODE_DEPRECATED("Use MakeCallback(..., async_context)",
} // namespace node
-#include <assert.h>
-#include <stdint.h>
+#include <cassert>
+#include <cstdint>
#ifndef NODE_STRINGIFY
#define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)
diff --git a/src/node_buffer.cc b/src/node_buffer.cc
index aca1842c30..10b8f4098f 100644
--- a/src/node_buffer.cc
+++ b/src/node_buffer.cc
@@ -31,8 +31,8 @@
#include "v8-profiler.h"
#include "v8.h"
-#include <string.h>
-#include <limits.h>
+#include <cstring>
+#include <climits>
#define THROW_AND_RETURN_UNLESS_BUFFER(env, obj) \
THROW_AND_RETURN_IF_NOT_BUFFER(env, obj, "argument") \
diff --git a/src/node_constants.cc b/src/node_constants.cc
index debcf0e100..e4eae1727c 100644
--- a/src/node_constants.cc
+++ b/src/node_constants.cc
@@ -24,12 +24,12 @@
#include "zlib.h"
-#include <errno.h>
+#include <cerrno>
#if !defined(_MSC_VER)
#include <unistd.h>
#endif
#include <fcntl.h>
-#include <signal.h>
+#include <csignal>
#include <sys/types.h>
#include <sys/stat.h>
#include <limits>
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 49b9dfe576..dcdecb5064 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -37,9 +37,9 @@
#include "util-inl.h"
#include "v8.h"
-#include <errno.h>
-#include <limits.h> // INT_MAX
-#include <string.h>
+#include <cerrno>
+#include <climits> // INT_MAX
+#include <cstring>
#include <algorithm>
#include <memory>
diff --git a/src/node_crypto_bio.cc b/src/node_crypto_bio.cc
index baa90204f2..31165b7c98 100644
--- a/src/node_crypto_bio.cc
+++ b/src/node_crypto_bio.cc
@@ -22,8 +22,8 @@
#include "node_crypto_bio.h"
#include "openssl/bio.h"
#include "util-inl.h"
-#include <limits.h>
-#include <string.h>
+#include <climits>
+#include <cstring>
namespace node {
namespace crypto {
diff --git a/src/node_crypto_clienthello.h b/src/node_crypto_clienthello.h
index 48f49771fd..d1661735f5 100644
--- a/src/node_crypto_clienthello.h
+++ b/src/node_crypto_clienthello.h
@@ -24,8 +24,8 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
-#include <stddef.h> // size_t
-#include <stdint.h>
+#include <cstddef> // size_t
+#include <cstdint>
namespace node {
namespace crypto {
diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc
index 0f33f59b33..59d1f9d143 100644
--- a/src/node_dtrace.cc
+++ b/src/node_dtrace.cc
@@ -44,7 +44,7 @@
#include "node_errors.h"
-#include <string.h>
+#include <cstring>
namespace node {
diff --git a/src/node_errors.cc b/src/node_errors.cc
index a17012b5b3..17394c863c 100644
--- a/src/node_errors.cc
+++ b/src/node_errors.cc
@@ -1,5 +1,5 @@
-#include <errno.h>
-#include <stdarg.h>
+#include <cerrno>
+#include <cstdarg>
#include "node_errors.h"
#include "node_internals.h"
diff --git a/src/node_file.cc b/src/node_file.cc
index 960fd052e8..96e0ba7e04 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -36,9 +36,9 @@
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
+#include <cstring>
+#include <cerrno>
+#include <climits>
#if defined(__MINGW32__) || defined(_MSC_VER)
# include <io.h>
diff --git a/src/node_http2.h b/src/node_http2.h
index aa953667fa..9065718c60 100644
--- a/src/node_http2.h
+++ b/src/node_http2.h
@@ -4,7 +4,7 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
// FIXME(joyeecheung): nghttp2.h needs stdint.h to compile on Windows
-#include <stdint.h>
+#include <cstdint>
#include "nghttp2/nghttp2.h"
#include "node_http2_state.h"
diff --git a/src/node_http_parser_impl.h b/src/node_http_parser_impl.h
index 16c0e77ae8..ae780d5371 100644
--- a/src/node_http_parser_impl.h
+++ b/src/node_http_parser_impl.h
@@ -35,8 +35,8 @@
#include "util-inl.h"
#include "v8.h"
-#include <stdlib.h> // free()
-#include <string.h> // strdup(), strchr()
+#include <cstdlib> // free()
+#include <cstring> // strdup(), strchr()
#include "http_parser_adaptor.h"
diff --git a/src/node_internals.h b/src/node_internals.h
index 82cf5713e9..166cfd9ea2 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -34,8 +34,8 @@
#include "uv.h"
#include "v8.h"
-#include <stdint.h>
-#include <stdlib.h>
+#include <cstdint>
+#include <cstdlib>
#include <string>
#include <vector>
diff --git a/src/node_main.cc b/src/node_main.cc
index 7107aea8c1..e92c0df942 100644
--- a/src/node_main.cc
+++ b/src/node_main.cc
@@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "node.h"
-#include <stdio.h>
+#include <cstdio>
#ifdef _WIN32
#include <windows.h>
diff --git a/src/node_options.cc b/src/node_options.cc
index bdd39d5d71..0d932200a9 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -1,4 +1,4 @@
-#include <errno.h>
+#include <cerrno>
#include "env-inl.h"
#include "node_binding.h"
#include "node_options-inl.h"
diff --git a/src/node_os.cc b/src/node_os.cc
index 1d3680a632..cbf2a30409 100644
--- a/src/node_os.cc
+++ b/src/node_os.cc
@@ -24,15 +24,15 @@
#include "util.h"
#include <array>
-#include <errno.h>
-#include <string.h>
+#include <cerrno>
+#include <cstring>
#ifdef __MINGW32__
# include <io.h>
#endif // __MINGW32__
#ifdef __POSIX__
-# include <limits.h> // PATH_MAX on Solaris.
+# include <climits> // PATH_MAX on Solaris.
# include <unistd.h> // gethostname, sysconf
#endif // __POSIX__
diff --git a/src/node_process_events.cc b/src/node_process_events.cc
index ccc40b6575..440e67d412 100644
--- a/src/node_process_events.cc
+++ b/src/node_process_events.cc
@@ -1,4 +1,4 @@
-#include <stdarg.h>
+#include <cstdarg>
#include "env-inl.h"
#include "node_process.h"
diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc
index ca8a435805..b46735bc79 100644
--- a/src/node_process_methods.cc
+++ b/src/node_process_methods.cc
@@ -15,8 +15,8 @@
#include "inspector_io.h"
#endif
-#include <limits.h> // PATH_MAX
-#include <stdio.h>
+#include <climits> // PATH_MAX
+#include <cstdio>
#if defined(_MSC_VER)
#include <direct.h>
diff --git a/src/node_process_object.cc b/src/node_process_object.cc
index 2f47b21f69..cbec233c27 100644
--- a/src/node_process_object.cc
+++ b/src/node_process_object.cc
@@ -1,4 +1,4 @@
-#include <limits.h> // PATH_MAX
+#include <climits> // PATH_MAX
#include "env-inl.h"
#include "node_internals.h"
diff --git a/src/node_report.cc b/src/node_report.cc
index 8ca35cabb9..a379f0621f 100644
--- a/src/node_report.cc
+++ b/src/node_report.cc
@@ -27,12 +27,12 @@
#endif
#include <cxxabi.h>
#include <dlfcn.h>
-#include <inttypes.h>
+#include <cinttypes>
#endif
#include <fcntl.h>
-#include <string.h>
-#include <time.h>
+#include <cstring>
+#include <ctime>
#include <iomanip>
#ifndef _MSC_VER
diff --git a/src/node_report.h b/src/node_report.h
index c83c52eb39..2aa55151d8 100644
--- a/src/node_report.h
+++ b/src/node_report.h
@@ -14,8 +14,8 @@
#include <vector>
#include "v8.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <sstream>
diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc
index 9564a0a2b3..f673c4085e 100644
--- a/src/node_stat_watcher.cc
+++ b/src/node_stat_watcher.cc
@@ -25,8 +25,8 @@
#include "node_file.h"
#include "util.h"
-#include <string.h>
-#include <stdlib.h>
+#include <cstring>
+#include <cstdlib>
namespace node {
diff --git a/src/node_url.cc b/src/node_url.cc
index d7402c4d04..2070b713ac 100644
--- a/src/node_url.cc
+++ b/src/node_url.cc
@@ -6,7 +6,7 @@
#include <string>
#include <vector>
-#include <stdio.h>
+#include <cstdio>
#include <cmath>
namespace node {
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index 639d7f87c5..badac08449 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -32,9 +32,9 @@
#include "brotli/decode.h"
#include "zlib.h"
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cerrno>
+#include <cstdlib>
+#include <cstring>
#include <sys/types.h>
#include <atomic>
diff --git a/src/process_wrap.cc b/src/process_wrap.cc
index 37afaf8ff9..583851cdbb 100644
--- a/src/process_wrap.cc
+++ b/src/process_wrap.cc
@@ -24,8 +24,8 @@
#include "stream_wrap.h"
#include "util-inl.h"
-#include <string.h>
-#include <stdlib.h>
+#include <cstring>
+#include <cstdlib>
namespace node {
diff --git a/src/spawn_sync.cc b/src/spawn_sync.cc
index 749e628fbd..6e5c3360cd 100644
--- a/src/spawn_sync.cc
+++ b/src/spawn_sync.cc
@@ -25,7 +25,7 @@
#include "node_internals.h"
#include "string_bytes.h"
-#include <string.h>
+#include <cstring>
namespace node {
diff --git a/src/stream_base.cc b/src/stream_base.cc
index ebd9beb984..24210e1e26 100644
--- a/src/stream_base.cc
+++ b/src/stream_base.cc
@@ -10,7 +10,7 @@
#include "util-inl.h"
#include "v8.h"
-#include <limits.h> // INT_MAX
+#include <climits> // INT_MAX
namespace node {
diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc
index d126f90eef..3247a604b4 100644
--- a/src/stream_wrap.cc
+++ b/src/stream_wrap.cc
@@ -31,8 +31,8 @@
#include "udp_wrap.h"
#include "util-inl.h"
-#include <string.h> // memcpy()
-#include <limits.h> // INT_MAX
+#include <cstring> // memcpy()
+#include <climits> // INT_MAX
namespace node {
diff --git a/src/string_bytes.cc b/src/string_bytes.cc
index 53bb95d80d..041868cb1e 100644
--- a/src/string_bytes.cc
+++ b/src/string_bytes.cc
@@ -27,8 +27,8 @@
#include "node_errors.h"
#include "util.h"
-#include <limits.h>
-#include <string.h> // memcpy
+#include <climits>
+#include <cstring> // memcpy
#include <algorithm>
#include <vector>
diff --git a/src/string_search.h b/src/string_search.h
index 95c746ea89..3968c8c869 100644
--- a/src/string_search.h
+++ b/src/string_search.h
@@ -9,7 +9,7 @@
#include "util.h"
-#include <string.h>
+#include <cstring>
#include <algorithm>
namespace node {
diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc
index cb6e634006..43c6ea5958 100644
--- a/src/tcp_wrap.cc
+++ b/src/tcp_wrap.cc
@@ -31,7 +31,7 @@
#include "stream_wrap.h"
#include "util-inl.h"
-#include <stdlib.h>
+#include <cstdlib>
namespace node {
diff --git a/src/timers.cc b/src/timers.cc
index f80e9e6be4..b11df62be2 100644
--- a/src/timers.cc
+++ b/src/timers.cc
@@ -2,7 +2,7 @@
#include "util.h"
#include "v8.h"
-#include <stdint.h>
+#include <cstdint>
namespace node {
namespace {
diff --git a/src/tracing/node_trace_writer.cc b/src/tracing/node_trace_writer.cc
index b93688cc95..3b07504acc 100644
--- a/src/tracing/node_trace_writer.cc
+++ b/src/tracing/node_trace_writer.cc
@@ -1,6 +1,6 @@
#include "tracing/node_trace_writer.h"
-#include <string.h>
+#include <cstring>
#include <fcntl.h>
#include "util-inl.h"
diff --git a/src/tracing/traced_value.cc b/src/tracing/traced_value.cc
index b2a1badad1..3eb21a11c9 100644
--- a/src/tracing/traced_value.cc
+++ b/src/tracing/traced_value.cc
@@ -6,7 +6,7 @@
#include <cmath>
#include <sstream>
-#include <stdio.h>
+#include <cstdio>
#include <string>
#if defined(NODE_HAVE_I18N_SUPPORT)
diff --git a/src/tracing/traced_value.h b/src/tracing/traced_value.h
index 7507978408..955d62dfe6 100644
--- a/src/tracing/traced_value.h
+++ b/src/tracing/traced_value.h
@@ -9,7 +9,7 @@
#include "util.h"
#include "v8.h"
-#include <stddef.h>
+#include <cstddef>
#include <memory>
#include <string>
diff --git a/src/util.cc b/src/util.cc
index 81070c239d..3cdc222a96 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -19,7 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
-#include <stdio.h>
+#include <cstdio>
#include <sstream>
#include "node_buffer.h"
#include "node_errors.h"
diff --git a/src/util.h b/src/util.h
index 312f91e68e..4cd04dc6af 100644
--- a/src/util.h
+++ b/src/util.h
@@ -27,12 +27,12 @@
#include "node_persistent.h"
#include "v8.h"
-#include <assert.h>
-#include <signal.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cassert>
+#include <csignal>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <functional> // std::function
#include <limits>