diff --git a/.clang-format b/.clang-format index 4059a1a7..5486a84a 100644 --- a/.clang-format +++ b/.clang-format @@ -68,7 +68,7 @@ IncludeCategories: Priority: 1 IncludeIsMainRegex: '$' IndentCaseLabels: false -IndentPPDirectives: None +IndentPPDirectives: AfterHash IndentWidth: 2 IndentWrappedFunctionNames: false JavaScriptQuotes: Leave diff --git a/examples/asio-sv2.cc b/examples/asio-sv2.cc index 8d2580ed..17ea02b9 100644 --- a/examples/asio-sv2.cc +++ b/examples/asio-sv2.cc @@ -36,10 +36,10 @@ #include #include #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #ifdef HAVE_FCNTL_H -#include +# include #endif // HAVE_FCNTL_H #include #include diff --git a/examples/client.c b/examples/client.c index 5d210a28..2d3c4c5d 100644 --- a/examples/client.c +++ b/examples/client.c @@ -27,26 +27,26 @@ * intentionally made simple. */ #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include #include #ifdef HAVE_UNISTD_H -#include +# include #endif /* HAVE_UNISTD_H */ #ifdef HAVE_FCNTL_H -#include +# include #endif /* HAVE_FCNTL_H */ #include #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif /* HAVE_SYS_SOCKET_H */ #ifdef HAVE_NETDB_H -#include +# include #endif /* HAVE_NETDB_H */ #ifdef HAVE_NETINET_IN_H -#include +# include #endif /* HAVE_NETINET_IN_H */ #include #include diff --git a/examples/deflate.c b/examples/deflate.c index eb713622..63f3ea15 100644 --- a/examples/deflate.c +++ b/examples/deflate.c @@ -23,7 +23,7 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef HAVE_CONFIG_H -#include +# include #endif /* !HAVE_CONFIG_H */ #include diff --git a/examples/libevent-client.c b/examples/libevent-client.c index 216e7bc6..22b46da2 100644 --- a/examples/libevent-client.c +++ b/examples/libevent-client.c @@ -23,33 +23,33 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef __sgi -#include -#define errx(exitcode, format, args...) \ - { \ - warnx(format, ##args); \ - exit(exitcode); \ - } -#define warnx(format, args...) fprintf(stderr, format "\n", ##args) +# include +# define errx(exitcode, format, args...) \ + { \ + warnx(format, ##args); \ + exit(exitcode); \ + } +# define warnx(format, args...) fprintf(stderr, format "\n", ##args) char *strndup(const char *s, size_t size); #endif #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include #ifdef HAVE_UNISTD_H -#include +# include #endif /* HAVE_UNISTD_H */ #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif /* HAVE_SYS_SOCKET_H */ #ifdef HAVE_NETINET_IN_H -#include +# include #endif /* HAVE_NETINET_IN_H */ #include #ifndef __sgi -#include +# include #endif #include #include diff --git a/examples/libevent-server.c b/examples/libevent-server.c index 541a7ee5..a5536175 100644 --- a/examples/libevent-server.c +++ b/examples/libevent-server.c @@ -23,41 +23,41 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef __sgi -#define errx(exitcode, format, args...) \ - { \ - warnx(format, ##args); \ - exit(exitcode); \ - } -#define warn(format, args...) warnx(format ": %s", ##args, strerror(errno)) -#define warnx(format, args...) fprintf(stderr, format "\n", ##args) +# define errx(exitcode, format, args...) \ + { \ + warnx(format, ##args); \ + exit(exitcode); \ + } +# define warn(format, args...) warnx(format ": %s", ##args, strerror(errno)) +# define warnx(format, args...) fprintf(stderr, format "\n", ##args) #endif #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif /* HAVE_SYS_SOCKET_H */ #ifdef HAVE_NETDB_H -#include +# include #endif /* HAVE_NETDB_H */ #include #ifdef HAVE_UNISTD_H -#include +# include #endif /* HAVE_UNISTD_H */ #include #ifdef HAVE_FCNTL_H -#include +# include #endif /* HAVE_FCNTL_H */ #include #ifdef HAVE_NETINET_IN_H -#include +# include #endif /* HAVE_NETINET_IN_H */ #include #ifndef __sgi -#include +# include #endif #include #include diff --git a/lib/includes/nghttp2/nghttp2.h b/lib/includes/nghttp2/nghttp2.h index 3f9d39b1..4756ea64 100644 --- a/lib/includes/nghttp2/nghttp2.h +++ b/lib/includes/nghttp2/nghttp2.h @@ -28,7 +28,7 @@ /* Define WIN32 when build target is Win32 API (borrowed from libcurl) */ #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) -#define WIN32 +# define WIN32 #endif #ifdef __cplusplus @@ -40,9 +40,9 @@ extern "C" { /* MSVC < 2013 does not have inttypes.h because it is not C99 compliant. See compiler macros and version number in https://sourceforge.net/p/predef/wiki/Compilers/ */ -#include +# include #else /* !defined(_MSC_VER) || (_MSC_VER >= 1800) */ -#include +# include #endif /* !defined(_MSC_VER) || (_MSC_VER >= 1800) */ #include #include @@ -50,20 +50,20 @@ extern "C" { #include #ifdef NGHTTP2_STATICLIB -#define NGHTTP2_EXTERN +# define NGHTTP2_EXTERN #elif defined(WIN32) -#ifdef BUILDING_NGHTTP2 -#define NGHTTP2_EXTERN __declspec(dllexport) -#else /* !BUILDING_NGHTTP2 */ -#define NGHTTP2_EXTERN __declspec(dllimport) -#endif /* !BUILDING_NGHTTP2 */ -#else /* !defined(WIN32) */ -#ifdef BUILDING_NGHTTP2 -#define NGHTTP2_EXTERN __attribute__((visibility("default"))) -#else /* !BUILDING_NGHTTP2 */ -#define NGHTTP2_EXTERN -#endif /* !BUILDING_NGHTTP2 */ -#endif /* !defined(WIN32) */ +# ifdef BUILDING_NGHTTP2 +# define NGHTTP2_EXTERN __declspec(dllexport) +# else /* !BUILDING_NGHTTP2 */ +# define NGHTTP2_EXTERN __declspec(dllimport) +# endif /* !BUILDING_NGHTTP2 */ +#else /* !defined(WIN32) */ +# ifdef BUILDING_NGHTTP2 +# define NGHTTP2_EXTERN __attribute__((visibility("default"))) +# else /* !BUILDING_NGHTTP2 */ +# define NGHTTP2_EXTERN +# endif /* !BUILDING_NGHTTP2 */ +#endif /* !defined(WIN32) */ /** * @macro diff --git a/lib/nghttp2_buf.h b/lib/nghttp2_buf.h index 9f484a22..06cce67a 100644 --- a/lib/nghttp2_buf.h +++ b/lib/nghttp2_buf.h @@ -26,7 +26,7 @@ #define NGHTTP2_BUF_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_callbacks.h b/lib/nghttp2_callbacks.h index b607bbb5..61e51fa5 100644 --- a/lib/nghttp2_callbacks.h +++ b/lib/nghttp2_callbacks.h @@ -26,7 +26,7 @@ #define NGHTTP2_CALLBACKS_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_debug.h b/lib/nghttp2_debug.h index 2e2cd0d1..cbb4dd57 100644 --- a/lib/nghttp2_debug.h +++ b/lib/nghttp2_debug.h @@ -26,18 +26,18 @@ #define NGHTTP2_DEBUG_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include #ifdef DEBUGBUILD -#define DEBUGF(...) nghttp2_debug_vprintf(__VA_ARGS__) +# define DEBUGF(...) nghttp2_debug_vprintf(__VA_ARGS__) void nghttp2_debug_vprintf(const char *format, ...); #else -#define DEBUGF(...) \ - do { \ - } while (0) +# define DEBUGF(...) \ + do { \ + } while (0) #endif #endif /* NGHTTP2_DEBUG_H */ diff --git a/lib/nghttp2_frame.h b/lib/nghttp2_frame.h index cf04eec4..615bbf31 100644 --- a/lib/nghttp2_frame.h +++ b/lib/nghttp2_frame.h @@ -26,7 +26,7 @@ #define NGHTTP2_FRAME_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_hd.h b/lib/nghttp2_hd.h index 760bfbc3..c64a1f2b 100644 --- a/lib/nghttp2_hd.h +++ b/lib/nghttp2_hd.h @@ -26,7 +26,7 @@ #define NGHTTP2_HD_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_hd_huffman.h b/lib/nghttp2_hd_huffman.h index 83323400..c6e3942e 100644 --- a/lib/nghttp2_hd_huffman.h +++ b/lib/nghttp2_hd_huffman.h @@ -26,7 +26,7 @@ #define NGHTTP2_HD_HUFFMAN_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_helper.h b/lib/nghttp2_helper.h index 4a32564f..b1f18ce5 100644 --- a/lib/nghttp2_helper.h +++ b/lib/nghttp2_helper.h @@ -26,7 +26,7 @@ #define NGHTTP2_HELPER_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_http.h b/lib/nghttp2_http.h index ac684c4d..dd057cdb 100644 --- a/lib/nghttp2_http.h +++ b/lib/nghttp2_http.h @@ -26,7 +26,7 @@ #define NGHTTP2_HTTP_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_int.h b/lib/nghttp2_int.h index 30cf7274..b23585cc 100644 --- a/lib/nghttp2_int.h +++ b/lib/nghttp2_int.h @@ -26,7 +26,7 @@ #define NGHTTP2_INT_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_map.h b/lib/nghttp2_map.h index 21262488..f6e29e35 100644 --- a/lib/nghttp2_map.h +++ b/lib/nghttp2_map.h @@ -26,7 +26,7 @@ #define NGHTTP2_MAP_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_mem.h b/lib/nghttp2_mem.h index 2d1bd6a0..f83dbcb8 100644 --- a/lib/nghttp2_mem.h +++ b/lib/nghttp2_mem.h @@ -26,7 +26,7 @@ #define NGHTTP2_MEM_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_net.h b/lib/nghttp2_net.h index 587f4189..95ffee74 100644 --- a/lib/nghttp2_net.h +++ b/lib/nghttp2_net.h @@ -26,15 +26,15 @@ #define NGHTTP2_NET_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #ifdef HAVE_ARPA_INET_H -#include +# include #endif /* HAVE_ARPA_INET_H */ #ifdef HAVE_NETINET_IN_H -#include +# include #endif /* HAVE_NETINET_IN_H */ #include @@ -44,11 +44,11 @@ define inline functions for those function so that we don't have dependeny on that lib. */ -#ifdef _MSC_VER -#define STIN static __inline -#else -#define STIN static inline -#endif +# ifdef _MSC_VER +# define STIN static __inline +# else +# define STIN static inline +# endif STIN uint32_t htonl(uint32_t hostlong) { uint32_t res; diff --git a/lib/nghttp2_npn.h b/lib/nghttp2_npn.h index a481bde3..c6f1c04b 100644 --- a/lib/nghttp2_npn.h +++ b/lib/nghttp2_npn.h @@ -26,7 +26,7 @@ #define NGHTTP2_NPN_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_option.h b/lib/nghttp2_option.h index c743e33b..29e72aa3 100644 --- a/lib/nghttp2_option.h +++ b/lib/nghttp2_option.h @@ -26,7 +26,7 @@ #define NGHTTP2_OPTION_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_outbound_item.h b/lib/nghttp2_outbound_item.h index 89a8a926..b5f503a3 100644 --- a/lib/nghttp2_outbound_item.h +++ b/lib/nghttp2_outbound_item.h @@ -26,7 +26,7 @@ #define NGHTTP2_OUTBOUND_ITEM_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_pq.h b/lib/nghttp2_pq.h index 71cf96a1..2d7b702a 100644 --- a/lib/nghttp2_pq.h +++ b/lib/nghttp2_pq.h @@ -26,7 +26,7 @@ #define NGHTTP2_PQ_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_priority_spec.h b/lib/nghttp2_priority_spec.h index 98fac210..92ece822 100644 --- a/lib/nghttp2_priority_spec.h +++ b/lib/nghttp2_priority_spec.h @@ -26,7 +26,7 @@ #define NGHTTP2_PRIORITY_SPEC_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_queue.h b/lib/nghttp2_queue.h index c7eb753c..a06fa6c7 100644 --- a/lib/nghttp2_queue.h +++ b/lib/nghttp2_queue.h @@ -26,7 +26,7 @@ #define NGHTTP2_QUEUE_H #ifdef HAVE_CONFIG_H -#include "config.h" +# include "config.h" #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_rcbuf.h b/lib/nghttp2_rcbuf.h index 29d1543e..6814e709 100644 --- a/lib/nghttp2_rcbuf.h +++ b/lib/nghttp2_rcbuf.h @@ -26,7 +26,7 @@ #define NGHTTP2_RCBUF_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_session.h b/lib/nghttp2_session.h index 5fbc7155..5add50bc 100644 --- a/lib/nghttp2_session.h +++ b/lib/nghttp2_session.h @@ -26,7 +26,7 @@ #define NGHTTP2_SESSION_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_stream.h b/lib/nghttp2_stream.h index da0e5d53..d1d5856d 100644 --- a/lib/nghttp2_stream.h +++ b/lib/nghttp2_stream.h @@ -26,7 +26,7 @@ #define NGHTTP2_STREAM_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_submit.h b/lib/nghttp2_submit.h index 545388cf..74d702fb 100644 --- a/lib/nghttp2_submit.h +++ b/lib/nghttp2_submit.h @@ -26,7 +26,7 @@ #define NGHTTP2_SUBMIT_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/lib/nghttp2_version.c b/lib/nghttp2_version.c index 8c5710d4..4211f2cf 100644 --- a/lib/nghttp2_version.c +++ b/lib/nghttp2_version.c @@ -23,7 +23,7 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/src/HtmlParser.h b/src/HtmlParser.h index fc2f2e57..1e846882 100644 --- a/src/HtmlParser.h +++ b/src/HtmlParser.h @@ -32,7 +32,7 @@ #ifdef HAVE_LIBXML2 -#include +# include #endif // HAVE_LIBXML2 diff --git a/src/HttpServer.cc b/src/HttpServer.cc index a6afa0c4..8dcf580e 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -26,23 +26,23 @@ #include #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif // HAVE_SYS_SOCKET_H #ifdef HAVE_NETDB_H -#include +# include #endif // HAVE_NETDB_H #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #ifdef HAVE_FCNTL_H -#include +# include #endif // HAVE_FCNTL_H #ifdef HAVE_NETINET_IN_H -#include +# include #endif // HAVE_NETINET_IN_H #include #ifdef HAVE_ARPA_INET_H -#include +# include #endif // HAVE_ARPA_INET_H #include @@ -64,7 +64,7 @@ #include "template.h" #ifndef O_BINARY -#define O_BINARY (0) +# define O_BINARY (0) #endif // O_BINARY namespace nghttp2 { diff --git a/src/allocator.h b/src/allocator.h index 32a74260..fa0de3ad 100644 --- a/src/allocator.h +++ b/src/allocator.h @@ -28,7 +28,7 @@ #include "nghttp2_config.h" #ifndef _WIN32 -#include +# include #endif // !_WIN32 #include diff --git a/src/app_helper.cc b/src/app_helper.cc index 90c9fa8c..77fa5c24 100644 --- a/src/app_helper.cc +++ b/src/app_helper.cc @@ -24,19 +24,19 @@ */ #include #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif // HAVE_SYS_SOCKET_H #ifdef HAVE_NETDB_H -#include +# include #endif // HAVE_NETDB_H #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #ifdef HAVE_FCNTL_H -#include +# include #endif // HAVE_FCNTL_H #ifdef HAVE_NETINET_IN_H -#include +# include #endif // HAVE_NETINET_IN_H #include #include diff --git a/src/app_helper.h b/src/app_helper.h index 2e1ef53c..5424054f 100644 --- a/src/app_helper.h +++ b/src/app_helper.h @@ -30,7 +30,7 @@ #include #include #ifdef HAVE_SYS_TIME_H -#include +# include #endif // HAVE_SYS_TIME_H #include diff --git a/src/base64_test.h b/src/base64_test.h index 8fd0e494..8bdb84f8 100644 --- a/src/base64_test.h +++ b/src/base64_test.h @@ -26,7 +26,7 @@ #define BASE64_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H namespace nghttp2 { diff --git a/src/buffer_test.h b/src/buffer_test.h index abdc9879..6789aa39 100644 --- a/src/buffer_test.h +++ b/src/buffer_test.h @@ -26,7 +26,7 @@ #define BUFFER_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H namespace nghttp2 { diff --git a/src/comp_helper.h b/src/comp_helper.h index 0e48a75e..131ed21b 100644 --- a/src/comp_helper.h +++ b/src/comp_helper.h @@ -26,7 +26,7 @@ #define NGHTTP2_COMP_HELPER_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/src/deflatehd.cc b/src/deflatehd.cc index 2db89814..5d28e241 100644 --- a/src/deflatehd.cc +++ b/src/deflatehd.cc @@ -23,11 +23,11 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include diff --git a/src/h2load.cc b/src/h2load.cc index 229c73df..9e2592a8 100644 --- a/src/h2load.cc +++ b/src/h2load.cc @@ -27,12 +27,12 @@ #include #include #ifdef HAVE_NETINET_IN_H -#include +# include #endif // HAVE_NETINET_IN_H #include #include #ifdef HAVE_FCNTL_H -#include +# include #endif // HAVE_FCNTL_H #include @@ -58,7 +58,7 @@ #include "template.h" #ifndef O_BINARY -#define O_BINARY (0) +# define O_BINARY (0) #endif // O_BINARY using namespace nghttp2; diff --git a/src/h2load.h b/src/h2load.h index 4f6739d4..bde36e8d 100644 --- a/src/h2load.h +++ b/src/h2load.h @@ -29,10 +29,10 @@ #include #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif // HAVE_SYS_SOCKET_H #ifdef HAVE_NETDB_H -#include +# include #endif // HAVE_NETDB_H #include diff --git a/src/http2_test.h b/src/http2_test.h index bd7ddc05..0d63020e 100644 --- a/src/http2_test.h +++ b/src/http2_test.h @@ -26,7 +26,7 @@ #define SHRPX_HTTP2_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H namespace shrpx { diff --git a/src/inflatehd.cc b/src/inflatehd.cc index 4f9bf5a0..9a159ad6 100644 --- a/src/inflatehd.cc +++ b/src/inflatehd.cc @@ -23,11 +23,11 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include diff --git a/src/memchunk.h b/src/memchunk.h index 6f76b492..d381e3cb 100644 --- a/src/memchunk.h +++ b/src/memchunk.h @@ -35,7 +35,7 @@ struct iovec { size_t iov_len; /* Length of data. */ }; #else // !_WIN32 -#include +# include #endif // !_WIN32 #include @@ -52,9 +52,9 @@ namespace nghttp2 { #define DEFAULT_WR_IOVCNT 16 #if defined(IOV_MAX) && IOV_MAX < DEFAULT_WR_IOVCNT -#define MAX_WR_IOVCNT IOV_MAX +# define MAX_WR_IOVCNT IOV_MAX #else // !defined(IOV_MAX) || IOV_MAX >= DEFAULT_WR_IOVCNT -#define MAX_WR_IOVCNT DEFAULT_WR_IOVCNT +# define MAX_WR_IOVCNT DEFAULT_WR_IOVCNT #endif // !defined(IOV_MAX) || IOV_MAX >= DEFAULT_WR_IOVCNT template struct Memchunk { diff --git a/src/memchunk_test.h b/src/memchunk_test.h index 068f8255..7d677e78 100644 --- a/src/memchunk_test.h +++ b/src/memchunk_test.h @@ -26,7 +26,7 @@ #define MEMCHUNK_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H namespace nghttp2 { diff --git a/src/network.h b/src/network.h index 02dda099..45311d84 100644 --- a/src/network.h +++ b/src/network.h @@ -26,23 +26,23 @@ #define NETWORK_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H #include #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif // HAVE_SYS_SOCKET_H #ifdef _WIN32 -#include +# include #else // !_WIN32 -#include +# include #endif // !_WIN32 #ifdef HAVE_NETINET_IN_H -#include +# include #endif // HAVE_NETINET_IN_H #ifdef HAVE_ARPA_INET_H -#include +# include #endif // HAVE_ARPA_INET_H namespace nghttp2 { diff --git a/src/nghttp.cc b/src/nghttp.cc index 58ee8804..7aaa65b7 100644 --- a/src/nghttp.cc +++ b/src/nghttp.cc @@ -26,13 +26,13 @@ #include #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #ifdef HAVE_FCNTL_H -#include +# include #endif // HAVE_FCNTL_H #ifdef HAVE_NETINET_IN_H -#include +# include #endif // HAVE_NETINET_IN_H #include #include @@ -50,7 +50,7 @@ #include #ifdef HAVE_JANSSON -#include +# include #endif // HAVE_JANSSON #include "app_helper.h" @@ -62,7 +62,7 @@ #include "ssl_compat.h" #ifndef O_BINARY -#define O_BINARY (0) +# define O_BINARY (0) #endif // O_BINARY namespace nghttp2 { diff --git a/src/nghttp.h b/src/nghttp.h index 3d970f03..120eb74d 100644 --- a/src/nghttp.h +++ b/src/nghttp.h @@ -29,10 +29,10 @@ #include #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif // HAVE_SYS_SOCKET_H #ifdef HAVE_NETDB_H -#include +# include #endif // HAVE_NETDB_H #include diff --git a/src/nghttp2_config.h b/src/nghttp2_config.h index 7fbd3657..8e6cd05f 100644 --- a/src/nghttp2_config.h +++ b/src/nghttp2_config.h @@ -26,7 +26,7 @@ #define NGHTTP2_CONFIG_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H #endif // NGHTTP2_CONFIG_H diff --git a/src/nghttp2_gzip.h b/src/nghttp2_gzip.h index 2fa905a2..a40352c3 100644 --- a/src/nghttp2_gzip.h +++ b/src/nghttp2_gzip.h @@ -24,16 +24,16 @@ */ #ifndef NGHTTP2_GZIP_H -#ifdef HAVE_CONFIG_H -#include -#endif /* HAVE_CONFIG_H */ -#include +# ifdef HAVE_CONFIG_H +# include +# endif /* HAVE_CONFIG_H */ +# include -#include +# include -#ifdef __cplusplus +# ifdef __cplusplus extern "C" { -#endif +# endif /** * @struct @@ -115,8 +115,8 @@ int nghttp2_gzip_inflate(nghttp2_gzip *inflater, uint8_t *out, */ int nghttp2_gzip_inflate_finished(nghttp2_gzip *inflater); -#ifdef __cplusplus +# ifdef __cplusplus } -#endif +# endif #endif /* NGHTTP2_GZIP_H */ diff --git a/src/nghttp2_gzip_test.h b/src/nghttp2_gzip_test.h index 2defcdc8..8d554f72 100644 --- a/src/nghttp2_gzip_test.h +++ b/src/nghttp2_gzip_test.h @@ -26,7 +26,7 @@ #define NGHTTP2_GZIP_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #ifdef __cplusplus diff --git a/src/nghttpd.cc b/src/nghttpd.cc index b26aea2f..efa01103 100644 --- a/src/nghttpd.cc +++ b/src/nghttpd.cc @@ -25,11 +25,11 @@ #include "nghttp2_config.h" #ifdef __sgi -#define daemon _daemonize +# define daemon _daemonize #endif #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include #include diff --git a/src/shrpx-unittest.cc b/src/shrpx-unittest.cc index 7f9bd806..dd4fadf1 100644 --- a/src/shrpx-unittest.cc +++ b/src/shrpx-unittest.cc @@ -23,7 +23,7 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H #include diff --git a/src/shrpx.cc b/src/shrpx.cc index 003707a9..8f8e16cc 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -28,36 +28,36 @@ #include #include #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif // HAVE_SYS_SOCKET_H #include #ifdef HAVE_NETDB_H -#include +# include #endif // HAVE_NETDB_H #include #ifdef HAVE_NETINET_IN_H -#include +# include #endif // HAVE_NETINET_IN_H #include #ifdef HAVE_ARPA_INET_H -#include +# include #endif // HAVE_ARPA_INET_H #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include #ifdef HAVE_SYSLOG_H -#include +# include #endif // HAVE_SYSLOG_H #ifdef HAVE_LIMITS_H -#include +# include #endif // HAVE_LIMITS_H #ifdef HAVE_SYS_TIME_H -#include +# include #endif // HAVE_SYS_TIME_H #include #ifdef HAVE_LIBSYSTEMD -#include +# include #endif // HAVE_LIBSYSTEMD #include @@ -131,16 +131,16 @@ constexpr auto ENV_ACCEPT_PREFIX = StringRef::from_lit("NGHTTPX_ACCEPT_"); constexpr auto ENV_ORIG_PID = StringRef::from_lit("NGHTTPX_ORIG_PID"); #ifndef _KERNEL_FASTOPEN -#define _KERNEL_FASTOPEN +# define _KERNEL_FASTOPEN // conditional define for TCP_FASTOPEN mostly on ubuntu -#ifndef TCP_FASTOPEN -#define TCP_FASTOPEN 23 -#endif +# ifndef TCP_FASTOPEN +# define TCP_FASTOPEN 23 +# endif // conditional define for SOL_TCP mostly on ubuntu -#ifndef SOL_TCP -#define SOL_TCP 6 -#endif +# ifndef SOL_TCP +# define SOL_TCP 6 +# endif #endif // This configuration is fixed at the first startup of the main @@ -1140,15 +1140,15 @@ int call_daemon() { #ifdef __sgi return _daemonize(0, 0, 0, 0); #else // !__sgi -#ifdef HAVE_LIBSYSTEMD +# ifdef HAVE_LIBSYSTEMD if (sd_booted() && (getenv("NOTIFY_SOCKET") != nullptr)) { LOG(NOTICE) << "Daemonising disabled under systemd"; chdir("/"); return 0; } -#endif // HAVE_LIBSYSTEMD +# endif // HAVE_LIBSYSTEMD return daemon(0, 0); -#endif // !__sgi +#endif // !__sgi } } // namespace diff --git a/src/shrpx.h b/src/shrpx.h index c12064b8..60e873dd 100644 --- a/src/shrpx.h +++ b/src/shrpx.h @@ -26,20 +26,20 @@ #define SHRPX_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H #include #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif // HAVE_SYS_SOCKET_H #include #ifndef HAVE__EXIT -#define nghttp2_Exit(status) _exit(status) +# define nghttp2_Exit(status) _exit(status) #else // HAVE__EXIT -#define nghttp2_Exit(status) _Exit(status) +# define nghttp2_Exit(status) _Exit(status) #endif // HAVE__EXIT #define DIE() nghttp2_Exit(EXIT_FAILURE) diff --git a/src/shrpx_accept_handler.cc b/src/shrpx_accept_handler.cc index 3f41b831..01b64158 100644 --- a/src/shrpx_accept_handler.cc +++ b/src/shrpx_accept_handler.cc @@ -25,7 +25,7 @@ #include "shrpx_accept_handler.h" #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include diff --git a/src/shrpx_client_handler.cc b/src/shrpx_client_handler.cc index 941e0e12..ea8cea16 100644 --- a/src/shrpx_client_handler.cc +++ b/src/shrpx_client_handler.cc @@ -25,13 +25,13 @@ #include "shrpx_client_handler.h" #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif // HAVE_SYS_SOCKET_H #ifdef HAVE_NETDB_H -#include +# include #endif // HAVE_NETDB_H #include diff --git a/src/shrpx_config.cc b/src/shrpx_config.cc index 5964dc49..bd4e0622 100644 --- a/src/shrpx_config.cc +++ b/src/shrpx_config.cc @@ -25,21 +25,21 @@ #include "shrpx_config.h" #ifdef HAVE_PWD_H -#include +# include #endif // HAVE_PWD_H #ifdef HAVE_NETDB_H -#include +# include #endif // HAVE_NETDB_H #ifdef HAVE_SYSLOG_H -#include +# include #endif // HAVE_SYSLOG_H #include #include #ifdef HAVE_FCNTL_H -#include +# include #endif // HAVE_FCNTL_H #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include diff --git a/src/shrpx_config.h b/src/shrpx_config.h index d631a566..f08bbc0f 100644 --- a/src/shrpx_config.h +++ b/src/shrpx_config.h @@ -29,14 +29,14 @@ #include #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif // HAVE_SYS_SOCKET_H #include #ifdef HAVE_NETINET_IN_H -#include +# include #endif // HAVE_NETINET_IN_H #ifdef HAVE_ARPA_INET_H -#include +# include #endif // HAVE_ARPA_INET_H #include #include diff --git a/src/shrpx_config_test.cc b/src/shrpx_config_test.cc index 75319712..b970ccbc 100644 --- a/src/shrpx_config_test.cc +++ b/src/shrpx_config_test.cc @@ -25,7 +25,7 @@ #include "shrpx_config_test.h" #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include diff --git a/src/shrpx_config_test.h b/src/shrpx_config_test.h index 3e86a4be..a30de41a 100644 --- a/src/shrpx_config_test.h +++ b/src/shrpx_config_test.h @@ -26,7 +26,7 @@ #define SHRPX_CONFIG_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H namespace shrpx { diff --git a/src/shrpx_connection.cc b/src/shrpx_connection.cc index eafda7e9..2269c63f 100644 --- a/src/shrpx_connection.cc +++ b/src/shrpx_connection.cc @@ -25,7 +25,7 @@ #include "shrpx_connection.h" #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include @@ -817,11 +817,11 @@ int Connection::get_tcp_hint(TCPHint *hint) const { // For TLSv1.3, AES-GCM and CHACHA20_POLY1305 overhead are now 22 // bytes (5 (header) + 1 (ContentType) + 16 (tag)). size_t tls_overhead; -#ifdef TLS1_3_VERSION +# ifdef TLS1_3_VERSION if (SSL_version(tls.ssl) == TLS1_3_VERSION) { tls_overhead = 22; } else -#endif // TLS1_3_VERSION +# endif // TLS1_3_VERSION { tls_overhead = 29; } diff --git a/src/shrpx_connection_handler.cc b/src/shrpx_connection_handler.cc index 19985aaf..89c8b4cc 100644 --- a/src/shrpx_connection_handler.cc +++ b/src/shrpx_connection_handler.cc @@ -25,7 +25,7 @@ #include "shrpx_connection_handler.h" #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include #include @@ -254,15 +254,15 @@ int ConnectionHandler::create_worker_thread(size_t num) { cert_tree_ = tls::create_cert_lookup_tree(); auto sv_ssl_ctx = tls::setup_server_ssl_context( all_ssl_ctx_, indexed_ssl_ctx_, cert_tree_.get() -#ifdef HAVE_NEVERBLEED +# ifdef HAVE_NEVERBLEED , nb_.get() -#endif // HAVE_NEVERBLEED +# endif // HAVE_NEVERBLEED ); auto cl_ssl_ctx = tls::setup_downstream_client_ssl_context( -#ifdef HAVE_NEVERBLEED +# ifdef HAVE_NEVERBLEED nb_.get() -#endif // HAVE_NEVERBLEED +# endif // HAVE_NEVERBLEED ); if (cl_ssl_ctx) { @@ -284,9 +284,9 @@ int ConnectionHandler::create_worker_thread(size_t num) { if (memcachedconf.tls) { session_cache_ssl_ctx = tls::create_ssl_client_context( -#ifdef HAVE_NEVERBLEED +# ifdef HAVE_NEVERBLEED nb_.get(), -#endif // HAVE_NEVERBLEED +# endif // HAVE_NEVERBLEED tlsconf.cacert, memcachedconf.cert_file, memcachedconf.private_key_file, nullptr); all_ssl_ctx_.push_back(session_cache_ssl_ctx); @@ -299,11 +299,11 @@ int ConnectionHandler::create_worker_thread(size_t num) { auto worker = make_unique( loop, sv_ssl_ctx, cl_ssl_ctx, session_cache_ssl_ctx, cert_tree_.get(), ticket_keys_, this, config->conn.downstream); -#ifdef HAVE_MRUBY +# ifdef HAVE_MRUBY if (worker->create_mruby_context() != 0) { return -1; } -#endif // HAVE_MRUBY +# endif // HAVE_MRUBY workers_.push_back(std::move(worker)); worker_loops_.push_back(loop); @@ -629,19 +629,19 @@ void ConnectionHandler::handle_ocsp_complete() { tls::verify_ocsp_response(ssl_ctx, ocsp_.resp.data(), ocsp_.resp.size()) == 0) { #ifndef OPENSSL_IS_BORINGSSL -#ifdef HAVE_ATOMIC_STD_SHARED_PTR +# ifdef HAVE_ATOMIC_STD_SHARED_PTR std::atomic_store_explicit( &tls_ctx_data->ocsp_data, std::make_shared>(std::move(ocsp_.resp)), std::memory_order_release); -#else // !HAVE_ATOMIC_STD_SHARED_PTR +# else // !HAVE_ATOMIC_STD_SHARED_PTR std::lock_guard g(tls_ctx_data->mu); tls_ctx_data->ocsp_data = std::make_shared>(std::move(ocsp_.resp)); -#endif // !HAVE_ATOMIC_STD_SHARED_PTR -#else // OPENSSL_IS_BORINGSSL +# endif // !HAVE_ATOMIC_STD_SHARED_PTR +#else // OPENSSL_IS_BORINGSSL SSL_CTX_set_ocsp_response(ssl_ctx, ocsp_.resp.data(), ocsp_.resp.size()); -#endif // OPENSSL_IS_BORINGSSL +#endif // OPENSSL_IS_BORINGSSL } ++ocsp_.next; diff --git a/src/shrpx_connection_handler.h b/src/shrpx_connection_handler.h index 4c5ce743..65de76fa 100644 --- a/src/shrpx_connection_handler.h +++ b/src/shrpx_connection_handler.h @@ -29,7 +29,7 @@ #include #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif // HAVE_SYS_SOCKET_H #include @@ -37,7 +37,7 @@ #include #include #ifndef NOTHREADS -#include +# include #endif // NOTHREADS #include @@ -45,7 +45,7 @@ #include #ifdef HAVE_NEVERBLEED -#include +# include #endif // HAVE_NEVERBLEED #include "shrpx_downstream_connection_pool.h" diff --git a/src/shrpx_downstream.cc b/src/shrpx_downstream.cc index 360a9a91..cdd33bb8 100644 --- a/src/shrpx_downstream.cc +++ b/src/shrpx_downstream.cc @@ -38,7 +38,7 @@ #include "shrpx_http2_session.h" #include "shrpx_log.h" #ifdef HAVE_MRUBY -#include "shrpx_mruby.h" +# include "shrpx_mruby.h" #endif // HAVE_MRUBY #include "util.h" #include "http2.h" diff --git a/src/shrpx_downstream_test.h b/src/shrpx_downstream_test.h index d9153ee5..ef06ea30 100644 --- a/src/shrpx_downstream_test.h +++ b/src/shrpx_downstream_test.h @@ -26,7 +26,7 @@ #define SHRPX_DOWNSTREAM_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H namespace shrpx { diff --git a/src/shrpx_http2_downstream_connection.cc b/src/shrpx_http2_downstream_connection.cc index 70a4a055..7a2d5598 100644 --- a/src/shrpx_http2_downstream_connection.cc +++ b/src/shrpx_http2_downstream_connection.cc @@ -25,7 +25,7 @@ #include "shrpx_http2_downstream_connection.h" #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include "http-parser/http_parser.h" diff --git a/src/shrpx_http2_session.cc b/src/shrpx_http2_session.cc index 67039867..5fbe10ac 100644 --- a/src/shrpx_http2_session.cc +++ b/src/shrpx_http2_session.cc @@ -26,7 +26,7 @@ #include #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include diff --git a/src/shrpx_http2_upstream.cc b/src/shrpx_http2_upstream.cc index e67ea6ca..df78dfdf 100644 --- a/src/shrpx_http2_upstream.cc +++ b/src/shrpx_http2_upstream.cc @@ -39,7 +39,7 @@ #include "shrpx_http2_session.h" #include "shrpx_log.h" #ifdef HAVE_MRUBY -#include "shrpx_mruby.h" +# include "shrpx_mruby.h" #endif // HAVE_MRUBY #include "http2.h" #include "util.h" diff --git a/src/shrpx_http_test.cc b/src/shrpx_http_test.cc index 0fdcc93b..ba3fad97 100644 --- a/src/shrpx_http_test.cc +++ b/src/shrpx_http_test.cc @@ -25,7 +25,7 @@ #include "shrpx_http_test.h" #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include diff --git a/src/shrpx_http_test.h b/src/shrpx_http_test.h index 85d2947d..8bd8395d 100644 --- a/src/shrpx_http_test.h +++ b/src/shrpx_http_test.h @@ -26,7 +26,7 @@ #define SHRPX_HTTP_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H namespace shrpx { diff --git a/src/shrpx_https_upstream.cc b/src/shrpx_https_upstream.cc index 452ec90d..556d1d85 100644 --- a/src/shrpx_https_upstream.cc +++ b/src/shrpx_https_upstream.cc @@ -39,7 +39,7 @@ #include "shrpx_http2_session.h" #include "shrpx_log.h" #ifdef HAVE_MRUBY -#include "shrpx_mruby.h" +# include "shrpx_mruby.h" #endif // HAVE_MRUBY #include "http2.h" #include "util.h" diff --git a/src/shrpx_log.cc b/src/shrpx_log.cc index d43b6fab..0fafc6c2 100644 --- a/src/shrpx_log.cc +++ b/src/shrpx_log.cc @@ -25,18 +25,18 @@ #include "shrpx_log.h" #ifdef HAVE_SYSLOG_H -#include +# include #endif // HAVE_SYSLOG_H #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #ifdef HAVE_INTTYPES_H -#include +# include #endif // HAVE_INTTYPES_H #include #include #ifdef HAVE_FCNTL_H -#include +# include #endif // HAVE_FCNTL_H #include diff --git a/src/shrpx_log_config.cc b/src/shrpx_log_config.cc index a8fbe416..668f91ab 100644 --- a/src/shrpx_log_config.cc +++ b/src/shrpx_log_config.cc @@ -57,14 +57,14 @@ LogConfig::LogConfig() } #ifndef NOTHREADS -#ifdef HAVE_THREAD_LOCAL +# ifdef HAVE_THREAD_LOCAL namespace { thread_local std::unique_ptr config = make_unique(); } // namespace LogConfig *log_config() { return config.get(); } void delete_log_config() {} -#else // !HAVE_THREAD_LOCAL +# else // !HAVE_THREAD_LOCAL namespace { pthread_key_t lckey; pthread_once_t lckey_once = PTHREAD_ONCE_INIT; @@ -85,8 +85,8 @@ LogConfig *log_config() { } void delete_log_config() { delete log_config(); } -#endif // !HAVE_THREAD_LOCAL -#else // NOTHREADS +# endif // !HAVE_THREAD_LOCAL +#else // NOTHREADS namespace { std::unique_ptr config = make_unique(); } // namespace @@ -94,7 +94,7 @@ std::unique_ptr config = make_unique(); LogConfig *log_config() { return config.get(); } void delete_log_config() {} -#endif // NOTHREADS +#endif // NOTHREADS void LogConfig::update_tstamp_millis( const std::chrono::system_clock::time_point &now) { diff --git a/src/shrpx_memcached_connection.cc b/src/shrpx_memcached_connection.cc index d087ac83..99ec1eb9 100644 --- a/src/shrpx_memcached_connection.cc +++ b/src/shrpx_memcached_connection.cc @@ -578,9 +578,9 @@ int MemcachedConnection::parse_packet() { #define DEFAULT_WR_IOVCNT 128 #if defined(IOV_MAX) && IOV_MAX < DEFAULT_WR_IOVCNT -#define MAX_WR_IOVCNT IOV_MAX +# define MAX_WR_IOVCNT IOV_MAX #else // !defined(IOV_MAX) || IOV_MAX >= DEFAULT_WR_IOVCNT -#define MAX_WR_IOVCNT DEFAULT_WR_IOVCNT +# define MAX_WR_IOVCNT DEFAULT_WR_IOVCNT #endif // !defined(IOV_MAX) || IOV_MAX >= DEFAULT_WR_IOVCNT size_t MemcachedConnection::fill_request_buffer(struct iovec *iov, diff --git a/src/shrpx_router_test.h b/src/shrpx_router_test.h index 03b49d25..d39cb87b 100644 --- a/src/shrpx_router_test.h +++ b/src/shrpx_router_test.h @@ -26,7 +26,7 @@ #define SHRPX_ROUTER_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H namespace shrpx { diff --git a/src/shrpx_tls.cc b/src/shrpx_tls.cc index 9f12f37a..74ca9e16 100644 --- a/src/shrpx_tls.cc +++ b/src/shrpx_tls.cc @@ -25,10 +25,10 @@ #include "shrpx_tls.h" #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif // HAVE_SYS_SOCKET_H #ifdef HAVE_NETDB_H -#include +# include #endif // HAVE_NETDB_H #include #include @@ -46,7 +46,7 @@ #include #include #ifndef OPENSSL_NO_OCSP -#include +# include #endif // OPENSSL_NO_OCSP #include @@ -204,21 +204,21 @@ int servername_callback(SSL *ssl, int *al, void *arg) { for (auto ssl_ctx : ssl_ctx_list) { auto cert = SSL_CTX_get0_certificate(ssl_ctx); -#if OPENSSL_1_1_API +# if OPENSSL_1_1_API auto pubkey = X509_get0_pubkey(cert); -#else // !OPENSSL_1_1_API +# else // !OPENSSL_1_1_API auto pubkey = X509_get_pubkey(cert); -#endif // !OPENSSL_1_1_API +# endif // !OPENSSL_1_1_API if (EVP_PKEY_base_id(pubkey) != EVP_PKEY_EC) { continue; } -#if OPENSSL_1_1_API +# if OPENSSL_1_1_API auto eckey = EVP_PKEY_get0_EC_KEY(pubkey); -#else // !OPENSSL_1_1_API +# else // !OPENSSL_1_1_API auto eckey = EVP_PKEY_get1_EC_KEY(pubkey); -#endif // !OPENSSL_1_1_API +# endif // !OPENSSL_1_1_API if (eckey == nullptr) { continue; @@ -227,10 +227,10 @@ int servername_callback(SSL *ssl, int *al, void *arg) { auto ecgroup = EC_KEY_get0_group(eckey); auto cert_curve = EC_GROUP_get_curve_name(ecgroup); -#if !OPENSSL_1_1_API +# if !OPENSSL_1_1_API EC_KEY_free(eckey); EVP_PKEY_free(pubkey); -#endif // !OPENSSL_1_1_API +# endif // !OPENSSL_1_1_API if (shared_curve == cert_curve) { SSL_set_SSL_CTX(ssl, ssl_ctx); @@ -251,13 +251,13 @@ int servername_callback(SSL *ssl, int *al, void *arg) { namespace { std::shared_ptr> get_ocsp_data(TLSContextData *tls_ctx_data) { -#ifdef HAVE_ATOMIC_STD_SHARED_PTR +# ifdef HAVE_ATOMIC_STD_SHARED_PTR return std::atomic_load_explicit(&tls_ctx_data->ocsp_data, std::memory_order_acquire); -#else // !HAVE_ATOMIC_STD_SHARED_PTR +# else // !HAVE_ATOMIC_STD_SHARED_PTR std::lock_guard g(tls_ctx_data->mu); return tls_ctx_data->ocsp_data; -#endif // !HAVE_ATOMIC_STD_SHARED_PTR +# endif // !HAVE_ATOMIC_STD_SHARED_PTR } } // namespace @@ -567,9 +567,9 @@ int alpn_select_proto_cb(SSL *ssl, const unsigned char **out, #if !LIBRESSL_IN_USE && OPENSSL_VERSION_NUMBER >= 0x10002000L -#ifndef TLSEXT_TYPE_signed_certificate_timestamp -#define TLSEXT_TYPE_signed_certificate_timestamp 18 -#endif // !TLSEXT_TYPE_signed_certificate_timestamp +# ifndef TLSEXT_TYPE_signed_certificate_timestamp +# define TLSEXT_TYPE_signed_certificate_timestamp 18 +# endif // !TLSEXT_TYPE_signed_certificate_timestamp namespace { int sct_add_cb(SSL *ssl, unsigned int ext_type, unsigned int context, @@ -629,7 +629,7 @@ int sct_parse_cb(SSL *ssl, unsigned int ext_type, unsigned int context, } } // namespace -#if !OPENSSL_1_1_1_API +# if !OPENSSL_1_1_1_API namespace { int legacy_sct_add_cb(SSL *ssl, unsigned int ext_type, @@ -654,8 +654,8 @@ int legacy_sct_parse_cb(SSL *ssl, unsigned int ext_type, } } // namespace -#endif // !OPENSSL_1_1_1_API -#endif // !LIBRESSL_IN_USE && OPENSSL_VERSION_NUMBER >= 0x10002000L +# endif // !OPENSSL_1_1_1_API +#endif // !LIBRESSL_IN_USE && OPENSSL_VERSION_NUMBER >= 0x10002000L #ifndef OPENSSL_NO_PSK namespace { @@ -794,18 +794,18 @@ SSL_CTX *create_ssl_context(const char *private_key_file, const char *cert_file, } #ifndef OPENSSL_NO_EC -#if !LIBRESSL_LEGACY_API && OPENSSL_VERSION_NUMBER >= 0x10002000L +# if !LIBRESSL_LEGACY_API && OPENSSL_VERSION_NUMBER >= 0x10002000L if (SSL_CTX_set1_curves_list(ssl_ctx, tlsconf.ecdh_curves.c_str()) != 1) { LOG(FATAL) << "SSL_CTX_set1_curves_list " << tlsconf.ecdh_curves << " failed"; DIE(); } -#if !defined(OPENSSL_IS_BORINGSSL) && !OPENSSL_1_1_API +# if !defined(OPENSSL_IS_BORINGSSL) && !OPENSSL_1_1_API // It looks like we need this function call for OpenSSL 1.0.2. This // function was deprecated in OpenSSL 1.1.0 and BoringSSL. SSL_CTX_set_ecdh_auto(ssl_ctx, 1); -#endif // !defined(OPENSSL_IS_BORINGSSL) && !OPENSSL_1_1_API -#else // LIBRESSL_LEGACY_API || OPENSSL_VERSION_NUBMER < 0x10002000L +# endif // !defined(OPENSSL_IS_BORINGSSL) && !OPENSSL_1_1_API +# else // LIBRESSL_LEGACY_API || OPENSSL_VERSION_NUBMER < 0x10002000L // Use P-256, which is sufficiently secure at the time of this // writing. auto ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); @@ -816,8 +816,8 @@ SSL_CTX *create_ssl_context(const char *private_key_file, const char *cert_file, } SSL_CTX_set_tmp_ecdh(ssl_ctx, ecdh); EC_KEY_free(ecdh); -#endif // LIBRESSL_LEGACY_API || OPENSSL_VERSION_NUBMER < 0x10002000L -#endif // OPENSSL_NO_EC +# endif // LIBRESSL_LEGACY_API || OPENSSL_VERSION_NUBMER < 0x10002000L +#endif // OPENSSL_NO_EC if (!tlsconf.dh_param_file.empty()) { // Read DH parameters from file @@ -939,7 +939,7 @@ SSL_CTX *create_ssl_context(const char *private_key_file, const char *cert_file, // OpenSSL handles signed_certificate_timestamp extension specially, // and it lets custom handler to process the extension. if (!sct_data.empty()) { -#if OPENSSL_1_1_1_API +# if OPENSSL_1_1_1_API // It is not entirely clear to me that SSL_EXT_CLIENT_HELLO is // required here. sct_parse_cb is called without // SSL_EXT_CLIENT_HELLO being set. But the passed context value @@ -953,7 +953,7 @@ SSL_CTX *create_ssl_context(const char *private_key_file, const char *cert_file, << ERR_error_string(ERR_get_error(), nullptr); DIE(); } -#else // !OPENSSL_1_1_1_API +# else // !OPENSSL_1_1_1_API if (SSL_CTX_add_server_custom_ext( ssl_ctx, TLSEXT_TYPE_signed_certificate_timestamp, legacy_sct_add_cb, legacy_sct_free_cb, nullptr, legacy_sct_parse_cb, @@ -962,7 +962,7 @@ SSL_CTX *create_ssl_context(const char *private_key_file, const char *cert_file, << ERR_error_string(ERR_get_error(), nullptr); DIE(); } -#endif // !OPENSSL_1_1_1_API +# endif // !OPENSSL_1_1_1_API } #endif // !LIBRESSL_IN_USE && OPENSSL_VERSION_NUMBER >= 0x10002000L @@ -1893,11 +1893,11 @@ int verify_ocsp_response(SSL_CTX *ssl_ctx, const uint8_t *ocsp_resp, return -1; } -#if OPENSSL_1_1_API +# if OPENSSL_1_1_API auto certid = OCSP_SINGLERESP_get0_id(sresp); -#else // !OPENSSL_1_1_API +# else // !OPENSSL_1_1_API auto certid = sresp->certId; -#endif // !OPENSSL_1_1_API +# endif // !OPENSSL_1_1_API assert(certid != nullptr); ASN1_INTEGER *serial; @@ -1971,10 +1971,10 @@ StringRef get_x509_issuer_name(BlockAllocator &balloc, X509 *x) { } #ifdef WORDS_BIGENDIAN -#define bswap64(N) (N) +# define bswap64(N) (N) #else /* !WORDS_BIGENDIAN */ -#define bswap64(N) \ - ((uint64_t)(ntohl((uint32_t)(N))) << 32 | ntohl((uint32_t)((N) >> 32))) +# define bswap64(N) \ + ((uint64_t)(ntohl((uint32_t)(N))) << 32 | ntohl((uint32_t)((N) >> 32))) #endif /* !WORDS_BIGENDIAN */ StringRef get_x509_serial(BlockAllocator &balloc, X509 *x) { diff --git a/src/shrpx_tls.h b/src/shrpx_tls.h index f3ee63c2..1ca20330 100644 --- a/src/shrpx_tls.h +++ b/src/shrpx_tls.h @@ -36,7 +36,7 @@ #include #ifdef HAVE_NEVERBLEED -#include +# include #endif // HAVE_NEVERBLEED #include "network.h" diff --git a/src/shrpx_tls_test.h b/src/shrpx_tls_test.h index 40360db9..e9c69d00 100644 --- a/src/shrpx_tls_test.h +++ b/src/shrpx_tls_test.h @@ -26,7 +26,7 @@ #define SHRPX_TLS_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H namespace shrpx { diff --git a/src/shrpx_worker.cc b/src/shrpx_worker.cc index 58019431..8b169d0a 100644 --- a/src/shrpx_worker.cc +++ b/src/shrpx_worker.cc @@ -25,7 +25,7 @@ #include "shrpx_worker.h" #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include @@ -37,7 +37,7 @@ #include "shrpx_log_config.h" #include "shrpx_memcached_dispatcher.h" #ifdef HAVE_MRUBY -#include "shrpx_mruby.h" +# include "shrpx_mruby.h" #endif // HAVE_MRUBY #include "util.h" #include "template.h" diff --git a/src/shrpx_worker.h b/src/shrpx_worker.h index a7a7773e..096dfca5 100644 --- a/src/shrpx_worker.h +++ b/src/shrpx_worker.h @@ -34,7 +34,7 @@ #include #include #ifndef NOTHREADS -#include +# include #endif // NOTHREADS #include diff --git a/src/shrpx_worker_process.cc b/src/shrpx_worker_process.cc index 647c167d..f1c67726 100644 --- a/src/shrpx_worker_process.cc +++ b/src/shrpx_worker_process.cc @@ -26,7 +26,7 @@ #include #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include #include diff --git a/src/shrpx_worker_test.cc b/src/shrpx_worker_test.cc index d907b327..7c5c3299 100644 --- a/src/shrpx_worker_test.cc +++ b/src/shrpx_worker_test.cc @@ -25,7 +25,7 @@ #include "shrpx_worker_test.h" #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include diff --git a/src/shrpx_worker_test.h b/src/shrpx_worker_test.h index c9bdfe0d..8ffa2f12 100644 --- a/src/shrpx_worker_test.h +++ b/src/shrpx_worker_test.h @@ -26,7 +26,7 @@ #define SHRPX_WORKER_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H namespace shrpx { diff --git a/src/ssl_compat.h b/src/ssl_compat.h index 777b83c9..9574b7cc 100644 --- a/src/ssl_compat.h +++ b/src/ssl_compat.h @@ -24,20 +24,20 @@ */ #ifndef OPENSSL_COMPAT_H -#include +# include -#if defined(LIBRESSL_VERSION_NUMBER) -#define OPENSSL_1_1_API 0 -#define OPENSSL_1_1_1_API 0 -#define LIBRESSL_IN_USE 1 -#define LIBRESSL_LEGACY_API (LIBRESSL_VERSION_NUMBER < 0x20700000L) -#define LIBRESSL_2_7_API (LIBRESSL_VERSION_NUMBER >= 0x20700000L) -#else // !defined(LIBRESSL_VERSION_NUMBER) -#define OPENSSL_1_1_API (OPENSSL_VERSION_NUMBER >= 0x1010000fL) -#define OPENSSL_1_1_1_API (OPENSSL_VERSION_NUMBER >= 0x10101000L) -#define LIBRESSL_IN_USE 0 -#define LIBRESSL_LEGACY_API 0 -#define LIBRESSL_2_7_API 0 -#endif // !defined(LIBRESSL_VERSION_NUMBER) +# if defined(LIBRESSL_VERSION_NUMBER) +# define OPENSSL_1_1_API 0 +# define OPENSSL_1_1_1_API 0 +# define LIBRESSL_IN_USE 1 +# define LIBRESSL_LEGACY_API (LIBRESSL_VERSION_NUMBER < 0x20700000L) +# define LIBRESSL_2_7_API (LIBRESSL_VERSION_NUMBER >= 0x20700000L) +# else // !defined(LIBRESSL_VERSION_NUMBER) +# define OPENSSL_1_1_API (OPENSSL_VERSION_NUMBER >= 0x1010000fL) +# define OPENSSL_1_1_1_API (OPENSSL_VERSION_NUMBER >= 0x10101000L) +# define LIBRESSL_IN_USE 0 +# define LIBRESSL_LEGACY_API 0 +# define LIBRESSL_2_7_API 0 +# endif // !defined(LIBRESSL_VERSION_NUMBER) #endif // OPENSSL_COMPAT_H diff --git a/src/template_test.h b/src/template_test.h index 1a5a85be..2c1448f3 100644 --- a/src/template_test.h +++ b/src/template_test.h @@ -26,7 +26,7 @@ #define TEMPLATE_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H namespace nghttp2 { diff --git a/src/timegm.h b/src/timegm.h index 4383fda1..56f9cc6c 100644 --- a/src/timegm.h +++ b/src/timegm.h @@ -26,7 +26,7 @@ #define TIMEGM_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #ifdef __cplusplus @@ -34,7 +34,7 @@ extern "C" { #endif /* __cplusplus */ #ifdef HAVE_TIME_H -#include +# include #endif // HAVE_TIME_H time_t nghttp2_timegm(struct tm *tm); diff --git a/src/util.cc b/src/util.cc index 485163f2..7bbad812 100644 --- a/src/util.cc +++ b/src/util.cc @@ -25,30 +25,30 @@ #include "util.h" #ifdef HAVE_TIME_H -#include +# include #endif // HAVE_TIME_H #include #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif // HAVE_SYS_SOCKET_H #ifdef HAVE_NETDB_H -#include +# include #endif // HAVE_NETDB_H #include #ifdef HAVE_FCNTL_H -#include +# include #endif // HAVE_FCNTL_H #ifdef HAVE_NETINET_IN_H -#include +# include #endif // HAVE_NETINET_IN_H #ifdef _WIN32 -#include -#include +# include +# include #else // !_WIN32 -#include +# include #endif // !_WIN32 #ifdef HAVE_ARPA_INET_H -#include +# include #endif // HAVE_ARPA_INET_H #include @@ -80,9 +80,9 @@ int nghttp2_inet_pton(int af, const char *src, void *dst) { namespace { // inet_pton-wrapper for Windows int nghttp2_inet_pton(int af, const char *src, void *dst) { -#if _WIN32_WINNT >= 0x0600 +# if _WIN32_WINNT >= 0x0600 return InetPtonA(af, src, dst); -#else +# else // the function takes a 'char*', so we need to make a copy char addr[INET6_ADDRSTRLEN + 1]; strncpy(addr, src, sizeof(addr)); @@ -93,7 +93,7 @@ int nghttp2_inet_pton(int af, const char *src, void *dst) { if (WSAStringToAddress(addr, af, NULL, (LPSOCKADDR)dst, &size) == 0) return 1; return 0; -#endif +# endif } } // namespace #endif // _WIN32 diff --git a/src/util.h b/src/util.h index cc85b2c5..e6a4cf6e 100644 --- a/src/util.h +++ b/src/util.h @@ -28,11 +28,11 @@ #include "nghttp2_config.h" #ifdef HAVE_UNISTD_H -#include +# include #endif // HAVE_UNISTD_H #include #ifdef HAVE_NETDB_H -#include +# include #endif // HAVE_NETDB_H #include diff --git a/src/util_test.h b/src/util_test.h index bfc934c3..41ba9fe2 100644 --- a/src/util_test.h +++ b/src/util_test.h @@ -26,7 +26,7 @@ #define UTIL_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif // HAVE_CONFIG_H namespace shrpx { diff --git a/src/xsi_strerror.c b/src/xsi_strerror.c index 1796b7dc..d008d4e2 100644 --- a/src/xsi_strerror.c +++ b/src/xsi_strerror.c @@ -26,11 +26,11 @@ /* Make sure that we get XSI-compliant version of strerror_r */ #ifdef _POSIX_C_SOURCE -#undef _POSIX_C_SOURCE +# undef _POSIX_C_SOURCE #endif /* _POSIX_C_SOURCE */ #ifdef _GNU_SOURCE -#undef _GNU_SOURCE +# undef _GNU_SOURCE #endif /* _GNU_SOURCE */ #include diff --git a/src/xsi_strerror.h b/src/xsi_strerror.h index 9bb61659..32cadc34 100644 --- a/src/xsi_strerror.h +++ b/src/xsi_strerror.h @@ -26,7 +26,7 @@ #define XSI_STRERROR_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/tests/failmalloc.c b/tests/failmalloc.c index 4d7376e4..6ca39165 100644 --- a/tests/failmalloc.c +++ b/tests/failmalloc.c @@ -23,7 +23,7 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/tests/failmalloc_test.h b/tests/failmalloc_test.h index c4306530..576932a7 100644 --- a/tests/failmalloc_test.h +++ b/tests/failmalloc_test.h @@ -26,7 +26,7 @@ #define FAILMALLOC_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ void test_nghttp2_session_send(void); diff --git a/tests/main.c b/tests/main.c index 4af7d419..41e52017 100644 --- a/tests/main.c +++ b/tests/main.c @@ -23,7 +23,7 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/tests/malloc_wrapper.h b/tests/malloc_wrapper.h index 62369d6f..a3a3dd79 100644 --- a/tests/malloc_wrapper.h +++ b/tests/malloc_wrapper.h @@ -26,7 +26,7 @@ #define MALLOC_WRAPPER_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include diff --git a/tests/nghttp2_buf_test.h b/tests/nghttp2_buf_test.h index c37e5150..714b89fd 100644 --- a/tests/nghttp2_buf_test.h +++ b/tests/nghttp2_buf_test.h @@ -26,7 +26,7 @@ #define NGHTTP2_BUF_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ void test_nghttp2_bufs_add(void); diff --git a/tests/nghttp2_frame_test.h b/tests/nghttp2_frame_test.h index 8c0d6d5b..488d710c 100644 --- a/tests/nghttp2_frame_test.h +++ b/tests/nghttp2_frame_test.h @@ -26,7 +26,7 @@ #define NGHTTP2_FRAME_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ void test_nghttp2_frame_pack_headers(void); diff --git a/tests/nghttp2_hd_test.h b/tests/nghttp2_hd_test.h index ab5fcae6..858afe6d 100644 --- a/tests/nghttp2_hd_test.h +++ b/tests/nghttp2_hd_test.h @@ -26,7 +26,7 @@ #define NGHTTP2_HD_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ void test_nghttp2_hd_deflate(void); diff --git a/tests/nghttp2_helper_test.h b/tests/nghttp2_helper_test.h index 68bdb6f9..cca8122a 100644 --- a/tests/nghttp2_helper_test.h +++ b/tests/nghttp2_helper_test.h @@ -26,7 +26,7 @@ #define NGHTTP2_HELPER_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ void test_nghttp2_adjust_local_window_size(void); diff --git a/tests/nghttp2_map_test.h b/tests/nghttp2_map_test.h index 9f2770a0..62ae54b3 100644 --- a/tests/nghttp2_map_test.h +++ b/tests/nghttp2_map_test.h @@ -26,7 +26,7 @@ #define NGHTTP2_MAP_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ void test_nghttp2_map(void); diff --git a/tests/nghttp2_npn_test.h b/tests/nghttp2_npn_test.h index 9d85e649..f1c97631 100644 --- a/tests/nghttp2_npn_test.h +++ b/tests/nghttp2_npn_test.h @@ -26,7 +26,7 @@ #define NGHTTP2_NPN_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ void test_nghttp2_npn(void); diff --git a/tests/nghttp2_pq_test.h b/tests/nghttp2_pq_test.h index 2ce16614..969662a9 100644 --- a/tests/nghttp2_pq_test.h +++ b/tests/nghttp2_pq_test.h @@ -26,7 +26,7 @@ #define NGHTTP2_PQ_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ void test_nghttp2_pq(void); diff --git a/tests/nghttp2_queue_test.h b/tests/nghttp2_queue_test.h index eb4d5299..64f8ce85 100644 --- a/tests/nghttp2_queue_test.h +++ b/tests/nghttp2_queue_test.h @@ -26,7 +26,7 @@ #define NGHTTP2_QUEUE_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ void test_nghttp2_queue(void); diff --git a/tests/nghttp2_session_test.h b/tests/nghttp2_session_test.h index 52d990c0..c06ad9aa 100644 --- a/tests/nghttp2_session_test.h +++ b/tests/nghttp2_session_test.h @@ -26,7 +26,7 @@ #define NGHTTP2_SESSION_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ void test_nghttp2_session_recv(void); diff --git a/tests/nghttp2_stream_test.h b/tests/nghttp2_stream_test.h index 16a1f0a1..ad7be640 100644 --- a/tests/nghttp2_stream_test.h +++ b/tests/nghttp2_stream_test.h @@ -26,7 +26,7 @@ #define NGHTTP2_STREAM_TEST_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #endif /* NGHTTP2_STREAM_TEST_H */ diff --git a/tests/nghttp2_test_helper.h b/tests/nghttp2_test_helper.h index 135f6ed8..c66298a0 100644 --- a/tests/nghttp2_test_helper.h +++ b/tests/nghttp2_test_helper.h @@ -26,7 +26,7 @@ #define NGHTTP2_TEST_HELPER_H #ifdef HAVE_CONFIG_H -#include +# include #endif /* HAVE_CONFIG_H */ #include "nghttp2_frame.h"