From c390d6faed4dad7d819890744b90e8b49edcf40b Mon Sep 17 00:00:00 2001 From: "Dusan Cervenka (nxa14949)" Date: Thu, 21 Feb 2019 14:18:03 +0100 Subject: [PATCH] Replaced config.h with more unique name nghttp_user_config.h -- Merged two solution into one (use everywhere nghttp2_config.h). -- replace config.h with nghttp2_user_config.h --- CMakeLists.txt | 4 ++-- lib/nghttp2_buf.h | 4 +--- lib/nghttp2_callbacks.h | 4 +--- lib/nghttp2_debug.h | 4 +--- lib/nghttp2_frame.h | 4 +--- lib/nghttp2_hd.h | 4 +--- lib/nghttp2_hd_huffman.h | 4 +--- lib/nghttp2_helper.h | 4 +--- lib/nghttp2_http.h | 4 +--- lib/nghttp2_int.h | 4 +--- lib/nghttp2_map.h | 4 +--- lib/nghttp2_mem.h | 4 +--- lib/nghttp2_net.h | 4 +--- lib/nghttp2_npn.h | 4 +--- lib/nghttp2_option.h | 4 +--- lib/nghttp2_outbound_item.h | 4 +--- lib/nghttp2_pq.h | 4 +--- lib/nghttp2_priority_spec.h | 4 +--- lib/nghttp2_queue.h | 4 +--- lib/nghttp2_rcbuf.h | 4 +--- lib/nghttp2_session.h | 4 +--- lib/nghttp2_stream.h | 4 +--- lib/nghttp2_submit.h | 4 +--- lib/nghttp2_version.c | 4 +--- src/base64_test.h | 4 +--- src/buffer_test.h | 4 +--- src/comp_helper.h | 4 +--- src/deflatehd.cc | 4 +--- src/http2_test.h | 4 +--- src/inflatehd.cc | 4 +--- src/memchunk_test.h | 4 +--- src/network.h | 4 +--- src/nghttp2_config.h | 2 +- src/nghttp2_gzip.h | 4 +--- src/nghttp2_gzip_test.h | 4 +--- src/shrpx-unittest.cc | 4 +--- src/shrpx_config_test.h | 4 +--- src/shrpx_downstream_test.h | 4 +--- src/shrpx_http_test.h | 4 +--- src/shrpx_router_test.h | 4 +--- src/shrpx_tls_test.h | 4 +--- src/shrpx_worker_test.h | 4 +--- src/template_test.h | 4 +--- src/timegm.h | 4 +--- src/util_test.h | 4 +--- src/xsi_strerror.h | 4 +--- tests/failmalloc.c | 4 +--- tests/failmalloc_test.h | 4 +--- tests/main.c | 4 +--- tests/malloc_wrapper.h | 4 +--- tests/nghttp2_buf_test.h | 4 +--- tests/nghttp2_frame_test.h | 4 +--- tests/nghttp2_hd_test.h | 4 +--- tests/nghttp2_helper_test.h | 4 +--- tests/nghttp2_map_test.h | 4 +--- tests/nghttp2_npn_test.h | 4 +--- tests/nghttp2_pq_test.h | 4 +--- tests/nghttp2_queue_test.h | 4 +--- tests/nghttp2_session_test.h | 4 +--- tests/nghttp2_stream_test.h | 4 +--- tests/nghttp2_test_helper.h | 4 +--- 61 files changed, 62 insertions(+), 180 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 913e8b02..97ed00e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -396,7 +396,7 @@ if(NOT ENABLE_THREADS OR NOT HAVE_STD_FUTURE) endif() add_definitions(-DHAVE_CONFIG_H) -configure_file(cmakeconfig.h.in config.h) +configure_file(cmakeconfig.h.in nghttp2_config.h) # autotools-compatible names # Sphinx expects relative paths in the .rst files. Use the fact that the files # below are all one directory level deep. @@ -442,7 +442,7 @@ foreach(name endforeach() include_directories( - "${CMAKE_CURRENT_BINARY_DIR}" # for config.h + "${CMAKE_CURRENT_BINARY_DIR}" # for nghttp2_config.h ) # For use in src/CMakeLists.txt set(PKGDATADIR "${CMAKE_INSTALL_FULL_DATADIR}/${CMAKE_PROJECT_NAME}") diff --git a/lib/nghttp2_buf.h b/lib/nghttp2_buf.h index 06cce67a..df53546b 100644 --- a/lib/nghttp2_buf.h +++ b/lib/nghttp2_buf.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_BUF_H #define NGHTTP2_BUF_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/lib/nghttp2_callbacks.h b/lib/nghttp2_callbacks.h index 61e51fa5..e25e7ff3 100644 --- a/lib/nghttp2_callbacks.h +++ b/lib/nghttp2_callbacks.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_CALLBACKS_H #define NGHTTP2_CALLBACKS_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/lib/nghttp2_debug.h b/lib/nghttp2_debug.h index cbb4dd57..5e23868e 100644 --- a/lib/nghttp2_debug.h +++ b/lib/nghttp2_debug.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_DEBUG_H #define NGHTTP2_DEBUG_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/lib/nghttp2_frame.h b/lib/nghttp2_frame.h index 615bbf31..4fe0d42b 100644 --- a/lib/nghttp2_frame.h +++ b/lib/nghttp2_frame.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_FRAME_H #define NGHTTP2_FRAME_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include #include "nghttp2_hd.h" diff --git a/lib/nghttp2_hd.h b/lib/nghttp2_hd.h index 14ae9807..533285fa 100644 --- a/lib/nghttp2_hd.h +++ b/lib/nghttp2_hd.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_HD_H #define NGHTTP2_HD_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/lib/nghttp2_hd_huffman.h b/lib/nghttp2_hd_huffman.h index c6e3942e..e1322826 100644 --- a/lib/nghttp2_hd_huffman.h +++ b/lib/nghttp2_hd_huffman.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_HD_HUFFMAN_H #define NGHTTP2_HD_HUFFMAN_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/lib/nghttp2_helper.h b/lib/nghttp2_helper.h index b1f18ce5..f459283c 100644 --- a/lib/nghttp2_helper.h +++ b/lib/nghttp2_helper.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_HELPER_H #define NGHTTP2_HELPER_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include #include diff --git a/lib/nghttp2_http.h b/lib/nghttp2_http.h index dd057cdb..73981169 100644 --- a/lib/nghttp2_http.h +++ b/lib/nghttp2_http.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_HTTP_H #define NGHTTP2_HTTP_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include #include "nghttp2_session.h" diff --git a/lib/nghttp2_int.h b/lib/nghttp2_int.h index b23585cc..caa917a1 100644 --- a/lib/nghttp2_int.h +++ b/lib/nghttp2_int.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_INT_H #define NGHTTP2_INT_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/lib/nghttp2_map.h b/lib/nghttp2_map.h index f6e29e35..b2c40915 100644 --- a/lib/nghttp2_map.h +++ b/lib/nghttp2_map.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_MAP_H #define NGHTTP2_MAP_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include #include "nghttp2_int.h" diff --git a/lib/nghttp2_mem.h b/lib/nghttp2_mem.h index f83dbcb8..a32ae756 100644 --- a/lib/nghttp2_mem.h +++ b/lib/nghttp2_mem.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_MEM_H #define NGHTTP2_MEM_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/lib/nghttp2_net.h b/lib/nghttp2_net.h index 95ffee74..0c9e9b2e 100644 --- a/lib/nghttp2_net.h +++ b/lib/nghttp2_net.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_NET_H #define NGHTTP2_NET_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #ifdef HAVE_ARPA_INET_H # include diff --git a/lib/nghttp2_npn.h b/lib/nghttp2_npn.h index c6f1c04b..7f84f17b 100644 --- a/lib/nghttp2_npn.h +++ b/lib/nghttp2_npn.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_NPN_H #define NGHTTP2_NPN_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/lib/nghttp2_option.h b/lib/nghttp2_option.h index 29e72aa3..9c2d1b1c 100644 --- a/lib/nghttp2_option.h +++ b/lib/nghttp2_option.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_OPTION_H #define NGHTTP2_OPTION_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/lib/nghttp2_outbound_item.h b/lib/nghttp2_outbound_item.h index b5f503a3..042bc38f 100644 --- a/lib/nghttp2_outbound_item.h +++ b/lib/nghttp2_outbound_item.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_OUTBOUND_ITEM_H #define NGHTTP2_OUTBOUND_ITEM_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include #include "nghttp2_frame.h" diff --git a/lib/nghttp2_pq.h b/lib/nghttp2_pq.h index 2d7b702a..c4a00569 100644 --- a/lib/nghttp2_pq.h +++ b/lib/nghttp2_pq.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_PQ_H #define NGHTTP2_PQ_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include #include "nghttp2_int.h" diff --git a/lib/nghttp2_priority_spec.h b/lib/nghttp2_priority_spec.h index 92ece822..9416781d 100644 --- a/lib/nghttp2_priority_spec.h +++ b/lib/nghttp2_priority_spec.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_PRIORITY_SPEC_H #define NGHTTP2_PRIORITY_SPEC_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/lib/nghttp2_queue.h b/lib/nghttp2_queue.h index a06fa6c7..2e2f539d 100644 --- a/lib/nghttp2_queue.h +++ b/lib/nghttp2_queue.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_QUEUE_H #define NGHTTP2_QUEUE_H -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/lib/nghttp2_rcbuf.h b/lib/nghttp2_rcbuf.h index 6814e709..1e82d9f3 100644 --- a/lib/nghttp2_rcbuf.h +++ b/lib/nghttp2_rcbuf.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_RCBUF_H #define NGHTTP2_RCBUF_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/lib/nghttp2_session.h b/lib/nghttp2_session.h index 40a8865a..f6c32b2d 100644 --- a/lib/nghttp2_session.h +++ b/lib/nghttp2_session.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_SESSION_H #define NGHTTP2_SESSION_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include #include "nghttp2_map.h" diff --git a/lib/nghttp2_stream.h b/lib/nghttp2_stream.h index fb8dc14d..8885186d 100644 --- a/lib/nghttp2_stream.h +++ b/lib/nghttp2_stream.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_STREAM_H #define NGHTTP2_STREAM_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include #include "nghttp2_outbound_item.h" diff --git a/lib/nghttp2_submit.h b/lib/nghttp2_submit.h index 74d702fb..4008517c 100644 --- a/lib/nghttp2_submit.h +++ b/lib/nghttp2_submit.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_SUBMIT_H #define NGHTTP2_SUBMIT_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/lib/nghttp2_version.c b/lib/nghttp2_version.c index 4211f2cf..d67540b0 100644 --- a/lib/nghttp2_version.c +++ b/lib/nghttp2_version.c @@ -22,9 +22,7 @@ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/src/base64_test.h b/src/base64_test.h index 8bdb84f8..a7485ee8 100644 --- a/src/base64_test.h +++ b/src/base64_test.h @@ -25,9 +25,7 @@ #ifndef BASE64_TEST_H #define BASE64_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" namespace nghttp2 { diff --git a/src/buffer_test.h b/src/buffer_test.h index 6789aa39..2d135ab9 100644 --- a/src/buffer_test.h +++ b/src/buffer_test.h @@ -25,9 +25,7 @@ #ifndef BUFFER_TEST_H #define BUFFER_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" namespace nghttp2 { diff --git a/src/comp_helper.h b/src/comp_helper.h index 131ed21b..98130f69 100644 --- a/src/comp_helper.h +++ b/src/comp_helper.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_COMP_HELPER_H #define NGHTTP2_COMP_HELPER_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/src/deflatehd.cc b/src/deflatehd.cc index 5d28e241..8ca4a14c 100644 --- a/src/deflatehd.cc +++ b/src/deflatehd.cc @@ -22,9 +22,7 @@ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" #ifdef HAVE_UNISTD_H # include diff --git a/src/http2_test.h b/src/http2_test.h index 0d63020e..4376bde8 100644 --- a/src/http2_test.h +++ b/src/http2_test.h @@ -25,9 +25,7 @@ #ifndef SHRPX_HTTP2_TEST_H #define SHRPX_HTTP2_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" namespace shrpx { diff --git a/src/inflatehd.cc b/src/inflatehd.cc index 9a159ad6..e0df5fce 100644 --- a/src/inflatehd.cc +++ b/src/inflatehd.cc @@ -22,9 +22,7 @@ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" #ifdef HAVE_UNISTD_H # include diff --git a/src/memchunk_test.h b/src/memchunk_test.h index 7d677e78..21814da3 100644 --- a/src/memchunk_test.h +++ b/src/memchunk_test.h @@ -25,9 +25,7 @@ #ifndef MEMCHUNK_TEST_H #define MEMCHUNK_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" namespace nghttp2 { diff --git a/src/network.h b/src/network.h index 45311d84..079dc542 100644 --- a/src/network.h +++ b/src/network.h @@ -25,9 +25,7 @@ #ifndef NETWORK_H #define NETWORK_H -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" #include #ifdef HAVE_SYS_SOCKET_H diff --git a/src/nghttp2_config.h b/src/nghttp2_config.h index 8e6cd05f..6f058ba6 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 "nghttp2_user_config.h" #endif // HAVE_CONFIG_H #endif // NGHTTP2_CONFIG_H diff --git a/src/nghttp2_gzip.h b/src/nghttp2_gzip.h index a40352c3..8030b2c2 100644 --- a/src/nghttp2_gzip.h +++ b/src/nghttp2_gzip.h @@ -24,9 +24,7 @@ */ #ifndef NGHTTP2_GZIP_H -# ifdef HAVE_CONFIG_H -# include -# endif /* HAVE_CONFIG_H */ +# include "nghttp2_config.h" # include # include diff --git a/src/nghttp2_gzip_test.h b/src/nghttp2_gzip_test.h index 8d554f72..30874e69 100644 --- a/src/nghttp2_gzip_test.h +++ b/src/nghttp2_gzip_test.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_GZIP_TEST_H #define NGHTTP2_GZIP_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #ifdef __cplusplus extern "C" { diff --git a/src/shrpx-unittest.cc b/src/shrpx-unittest.cc index dd4fadf1..69e7a3d2 100644 --- a/src/shrpx-unittest.cc +++ b/src/shrpx-unittest.cc @@ -22,9 +22,7 @@ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" #include #include diff --git a/src/shrpx_config_test.h b/src/shrpx_config_test.h index a30de41a..245e3cd5 100644 --- a/src/shrpx_config_test.h +++ b/src/shrpx_config_test.h @@ -25,9 +25,7 @@ #ifndef SHRPX_CONFIG_TEST_H #define SHRPX_CONFIG_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" namespace shrpx { diff --git a/src/shrpx_downstream_test.h b/src/shrpx_downstream_test.h index ef06ea30..db5a6cc3 100644 --- a/src/shrpx_downstream_test.h +++ b/src/shrpx_downstream_test.h @@ -25,9 +25,7 @@ #ifndef SHRPX_DOWNSTREAM_TEST_H #define SHRPX_DOWNSTREAM_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" namespace shrpx { diff --git a/src/shrpx_http_test.h b/src/shrpx_http_test.h index 8bd8395d..35c8dd12 100644 --- a/src/shrpx_http_test.h +++ b/src/shrpx_http_test.h @@ -25,9 +25,7 @@ #ifndef SHRPX_HTTP_TEST_H #define SHRPX_HTTP_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" namespace shrpx { diff --git a/src/shrpx_router_test.h b/src/shrpx_router_test.h index d39cb87b..452cf622 100644 --- a/src/shrpx_router_test.h +++ b/src/shrpx_router_test.h @@ -25,9 +25,7 @@ #ifndef SHRPX_ROUTER_TEST_H #define SHRPX_ROUTER_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" namespace shrpx { diff --git a/src/shrpx_tls_test.h b/src/shrpx_tls_test.h index e9c69d00..cb5b2f0d 100644 --- a/src/shrpx_tls_test.h +++ b/src/shrpx_tls_test.h @@ -25,9 +25,7 @@ #ifndef SHRPX_TLS_TEST_H #define SHRPX_TLS_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" namespace shrpx { diff --git a/src/shrpx_worker_test.h b/src/shrpx_worker_test.h index 8ffa2f12..b5945016 100644 --- a/src/shrpx_worker_test.h +++ b/src/shrpx_worker_test.h @@ -25,9 +25,7 @@ #ifndef SHRPX_WORKER_TEST_H #define SHRPX_WORKER_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" namespace shrpx { diff --git a/src/template_test.h b/src/template_test.h index 2c1448f3..ba3593fc 100644 --- a/src/template_test.h +++ b/src/template_test.h @@ -25,9 +25,7 @@ #ifndef TEMPLATE_TEST_H #define TEMPLATE_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" namespace nghttp2 { diff --git a/src/timegm.h b/src/timegm.h index 56f9cc6c..f2fadf2d 100644 --- a/src/timegm.h +++ b/src/timegm.h @@ -25,9 +25,7 @@ #ifndef TIMEGM_H #define TIMEGM_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #ifdef __cplusplus extern "C" { diff --git a/src/util_test.h b/src/util_test.h index 41ba9fe2..bfbc4c83 100644 --- a/src/util_test.h +++ b/src/util_test.h @@ -25,9 +25,7 @@ #ifndef UTIL_TEST_H #define UTIL_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif // HAVE_CONFIG_H +#include "nghttp2_config.h" namespace shrpx { diff --git a/src/xsi_strerror.h b/src/xsi_strerror.h index 32cadc34..ecec975f 100644 --- a/src/xsi_strerror.h +++ b/src/xsi_strerror.h @@ -25,9 +25,7 @@ #ifndef XSI_STRERROR_H #define XSI_STRERROR_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/tests/failmalloc.c b/tests/failmalloc.c index 4bf83ca5..bc998f6f 100644 --- a/tests/failmalloc.c +++ b/tests/failmalloc.c @@ -22,9 +22,7 @@ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include #include diff --git a/tests/failmalloc_test.h b/tests/failmalloc_test.h index 576932a7..93b5a145 100644 --- a/tests/failmalloc_test.h +++ b/tests/failmalloc_test.h @@ -25,9 +25,7 @@ #ifndef FAILMALLOC_TEST_H #define FAILMALLOC_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" void test_nghttp2_session_send(void); void test_nghttp2_session_send_server(void); diff --git a/tests/main.c b/tests/main.c index 13865de7..14a62dee 100644 --- a/tests/main.c +++ b/tests/main.c @@ -22,9 +22,7 @@ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include #include diff --git a/tests/malloc_wrapper.h b/tests/malloc_wrapper.h index a3a3dd79..aafed28d 100644 --- a/tests/malloc_wrapper.h +++ b/tests/malloc_wrapper.h @@ -25,9 +25,7 @@ #ifndef MALLOC_WRAPPER_H #define MALLOC_WRAPPER_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include diff --git a/tests/nghttp2_buf_test.h b/tests/nghttp2_buf_test.h index 714b89fd..9bb8939d 100644 --- a/tests/nghttp2_buf_test.h +++ b/tests/nghttp2_buf_test.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_BUF_TEST_H #define NGHTTP2_BUF_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" void test_nghttp2_bufs_add(void); void test_nghttp2_bufs_add_stack_buffer_overflow_bug(void); diff --git a/tests/nghttp2_frame_test.h b/tests/nghttp2_frame_test.h index 488d710c..59c218e2 100644 --- a/tests/nghttp2_frame_test.h +++ b/tests/nghttp2_frame_test.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_FRAME_TEST_H #define NGHTTP2_FRAME_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" void test_nghttp2_frame_pack_headers(void); void test_nghttp2_frame_pack_headers_frame_too_large(void); diff --git a/tests/nghttp2_hd_test.h b/tests/nghttp2_hd_test.h index 858afe6d..61fb4f21 100644 --- a/tests/nghttp2_hd_test.h +++ b/tests/nghttp2_hd_test.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_HD_TEST_H #define NGHTTP2_HD_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" void test_nghttp2_hd_deflate(void); void test_nghttp2_hd_deflate_same_indexed_repr(void); diff --git a/tests/nghttp2_helper_test.h b/tests/nghttp2_helper_test.h index cca8122a..6efa4b45 100644 --- a/tests/nghttp2_helper_test.h +++ b/tests/nghttp2_helper_test.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_HELPER_TEST_H #define NGHTTP2_HELPER_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" void test_nghttp2_adjust_local_window_size(void); void test_nghttp2_check_header_name(void); diff --git a/tests/nghttp2_map_test.h b/tests/nghttp2_map_test.h index 62ae54b3..db9f5420 100644 --- a/tests/nghttp2_map_test.h +++ b/tests/nghttp2_map_test.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_MAP_TEST_H #define NGHTTP2_MAP_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" void test_nghttp2_map(void); void test_nghttp2_map_functional(void); diff --git a/tests/nghttp2_npn_test.h b/tests/nghttp2_npn_test.h index f1c97631..c65609a3 100644 --- a/tests/nghttp2_npn_test.h +++ b/tests/nghttp2_npn_test.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_NPN_TEST_H #define NGHTTP2_NPN_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" void test_nghttp2_npn(void); diff --git a/tests/nghttp2_pq_test.h b/tests/nghttp2_pq_test.h index 969662a9..76d0b90c 100644 --- a/tests/nghttp2_pq_test.h +++ b/tests/nghttp2_pq_test.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_PQ_TEST_H #define NGHTTP2_PQ_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" void test_nghttp2_pq(void); void test_nghttp2_pq_update(void); diff --git a/tests/nghttp2_queue_test.h b/tests/nghttp2_queue_test.h index 64f8ce85..b3173071 100644 --- a/tests/nghttp2_queue_test.h +++ b/tests/nghttp2_queue_test.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_QUEUE_TEST_H #define NGHTTP2_QUEUE_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" void test_nghttp2_queue(void); diff --git a/tests/nghttp2_session_test.h b/tests/nghttp2_session_test.h index 35a48b82..11574949 100644 --- a/tests/nghttp2_session_test.h +++ b/tests/nghttp2_session_test.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_SESSION_TEST_H #define NGHTTP2_SESSION_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" void test_nghttp2_session_recv(void); void test_nghttp2_session_recv_invalid_stream_id(void); diff --git a/tests/nghttp2_stream_test.h b/tests/nghttp2_stream_test.h index ad7be640..7f9ceb8f 100644 --- a/tests/nghttp2_stream_test.h +++ b/tests/nghttp2_stream_test.h @@ -25,8 +25,6 @@ #ifndef NGHTTP2_STREAM_TEST_H #define NGHTTP2_STREAM_TEST_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #endif /* NGHTTP2_STREAM_TEST_H */ diff --git a/tests/nghttp2_test_helper.h b/tests/nghttp2_test_helper.h index c66298a0..f9086a9a 100644 --- a/tests/nghttp2_test_helper.h +++ b/tests/nghttp2_test_helper.h @@ -25,9 +25,7 @@ #ifndef NGHTTP2_TEST_HELPER_H #define NGHTTP2_TEST_HELPER_H -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include "nghttp2_config.h" #include "nghttp2_frame.h" #include "nghttp2_hd.h"