From 53bfc70c9e9da8a572bf02a2ac57904548f0ae4a Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 14 May 2015 00:17:45 +0900 Subject: [PATCH] Include inttypes.h (or cintypes for C++) instead of stdint.h From autoconf manual, section 5.6.1 Portability of Headers, says: """ The C99 standard says that inttypes.h includes stdint.h, so there's no need to include stdint.h separately in a standard environment. Some implementations have inttypes.h but not stdint.h (e.g., Solaris 7), but we don't know of any implementation that has stdint.h but not inttypes.h. """ --- examples/client.c | 2 +- lib/includes/nghttp2/nghttp2.h | 2 +- src/HttpServer.h | 2 +- src/app_helper.h | 2 +- src/h2load_session.h | 3 ++- src/shrpx.cc | 2 +- src/shrpx_config.h | 2 +- src/shrpx_downstream.h | 3 +-- src/shrpx_downstream_queue.h | 3 +-- src/shrpx_https_upstream.h | 3 +-- src/timegm.c | 2 +- 11 files changed, 12 insertions(+), 14 deletions(-) diff --git a/examples/client.c b/examples/client.c index b2680f61..b12c3e48 100644 --- a/examples/client.c +++ b/examples/client.c @@ -30,7 +30,7 @@ #include #endif /* HAVE_CONFIG_H */ -#include +#include #include #ifdef HAVE_UNISTD_H #include diff --git a/lib/includes/nghttp2/nghttp2.h b/lib/includes/nghttp2/nghttp2.h index c9857e16..4edba80e 100644 --- a/lib/includes/nghttp2/nghttp2.h +++ b/lib/includes/nghttp2/nghttp2.h @@ -36,7 +36,7 @@ extern "C" { #endif #include -#include +#include #include #include diff --git a/src/HttpServer.h b/src/HttpServer.h index 3d96bc22..a91e7d3c 100644 --- a/src/HttpServer.h +++ b/src/HttpServer.h @@ -27,9 +27,9 @@ #include "nghttp2_config.h" -#include #include +#include #include #include diff --git a/src/app_helper.h b/src/app_helper.h index 14aba711..034489f4 100644 --- a/src/app_helper.h +++ b/src/app_helper.h @@ -27,7 +27,7 @@ #include "nghttp2_config.h" -#include +#include #include #ifdef HAVE_SYS_TIME_H #include diff --git a/src/h2load_session.h b/src/h2load_session.h index 4231b914..18175748 100644 --- a/src/h2load_session.h +++ b/src/h2load_session.h @@ -28,7 +28,8 @@ #include "nghttp2_config.h" #include -#include + +#include #include "h2load.h" diff --git a/src/shrpx.cc b/src/shrpx.cc index 2cb2cc59..9cbcc367 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -24,7 +24,6 @@ */ #include "shrpx.h" -#include #include #include #ifdef HAVE_SYS_SOCKET_H @@ -59,6 +58,7 @@ #include #include +#include #include #include #include diff --git a/src/shrpx_config.h b/src/shrpx_config.h index 872bf836..8afccd51 100644 --- a/src/shrpx_config.h +++ b/src/shrpx_config.h @@ -27,7 +27,6 @@ #include "shrpx.h" -#include #include #ifdef HAVE_SYS_SOCKET_H #include @@ -39,6 +38,7 @@ #ifdef HAVE_ARPA_INET_H #include #endif // HAVE_ARPA_INET_H +#include #include #include #include diff --git a/src/shrpx_downstream.h b/src/shrpx_downstream.h index f761b6a0..2bd29312 100644 --- a/src/shrpx_downstream.h +++ b/src/shrpx_downstream.h @@ -27,8 +27,7 @@ #include "shrpx.h" -#include - +#include #include #include #include diff --git a/src/shrpx_downstream_queue.h b/src/shrpx_downstream_queue.h index ee5028bd..d327a05f 100644 --- a/src/shrpx_downstream_queue.h +++ b/src/shrpx_downstream_queue.h @@ -27,8 +27,7 @@ #include "shrpx.h" -#include - +#include #include #include #include diff --git a/src/shrpx_https_upstream.h b/src/shrpx_https_upstream.h index 1b0c648a..3b9d5320 100644 --- a/src/shrpx_https_upstream.h +++ b/src/shrpx_https_upstream.h @@ -27,8 +27,7 @@ #include "shrpx.h" -#include - +#include #include #include "http-parser/http_parser.h" diff --git a/src/timegm.c b/src/timegm.c index bf572b72..90bf53ff 100644 --- a/src/timegm.c +++ b/src/timegm.c @@ -26,7 +26,7 @@ #ifndef HAVE_TIMEGM -#include +#include /* Counter the number of leap year in the range [0, y). The |y| is the year, including century (e.g., 2012) */