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.
"""
This commit is contained in:
Tatsuhiro Tsujikawa 2015-05-14 00:17:45 +09:00
parent c4068cd404
commit 53bfc70c9e
11 changed files with 12 additions and 14 deletions

View File

@ -30,7 +30,7 @@
#include <config.h>
#endif /* HAVE_CONFIG_H */
#include <stdint.h>
#include <inttypes.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>

View File

@ -36,7 +36,7 @@ extern "C" {
#endif
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include <sys/types.h>
#include <nghttp2/nghttp2ver.h>

View File

@ -27,9 +27,9 @@
#include "nghttp2_config.h"
#include <stdint.h>
#include <sys/types.h>
#include <cinttypes>
#include <cstdlib>
#include <string>

View File

@ -27,7 +27,7 @@
#include "nghttp2_config.h"
#include <stdint.h>
#include <cinttypes>
#include <cstdlib>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>

View File

@ -28,7 +28,8 @@
#include "nghttp2_config.h"
#include <sys/types.h>
#include <stdint.h>
#include <cinttypes>
#include "h2load.h"

View File

@ -24,7 +24,6 @@
*/
#include "shrpx.h"
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_SYS_SOCKET_H
@ -59,6 +58,7 @@
#include <sys/resource.h>
#include <grp.h>
#include <cinttypes>
#include <limits>
#include <cstdlib>
#include <iostream>

View File

@ -27,7 +27,6 @@
#include "shrpx.h"
#include <stdint.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@ -39,6 +38,7 @@
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif // HAVE_ARPA_INET_H
#include <cinttypes>
#include <cstdio>
#include <vector>
#include <memory>

View File

@ -27,8 +27,7 @@
#include "shrpx.h"
#include <stdint.h>
#include <cinttypes>
#include <vector>
#include <string>
#include <memory>

View File

@ -27,8 +27,7 @@
#include "shrpx.h"
#include <stdint.h>
#include <cinttypes>
#include <map>
#include <set>
#include <memory>

View File

@ -27,8 +27,7 @@
#include "shrpx.h"
#include <stdint.h>
#include <cinttypes>
#include <memory>
#include "http-parser/http_parser.h"

View File

@ -26,7 +26,7 @@
#ifndef HAVE_TIMEGM
#include <stdint.h>
#include <inttypes.h>
/* Counter the number of leap year in the range [0, y). The |y| is the
year, including century (e.g., 2012) */