From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 045BF27D0E for ; Tue, 26 Feb 2019 07:11:41 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fOW33GXoDg3z for ; Tue, 26 Feb 2019 07:11:40 -0500 (EST) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 59DBF277F4 for ; Tue, 26 Feb 2019 07:11:40 -0500 (EST) From: Vladislav Shpilevoy Subject: [tarantool-patches] [PATCH v2 2/4] Move 'http_parser' to src/lib Date: Tue, 26 Feb 2019 15:11:34 +0300 Message-Id: In-Reply-To: References: In-Reply-To: References: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: kostja@tarantool.org Http_parser in fact does not depend on anything, even on the core. As a rule, such basic libraries are stored in src/lib. The patch is not necessary for anything, but it is a right thing to do, while some activity is happening there. --- src/CMakeLists.txt | 3 +-- src/lib/CMakeLists.txt | 1 + src/lib/http_parser/CMakeLists.txt | 1 + src/{ => lib/http_parser}/http_parser.c | 0 src/{ => lib/http_parser}/http_parser.h | 0 src/lua/httpc.c | 2 +- 6 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 src/lib/http_parser/CMakeLists.txt rename src/{ => lib/http_parser}/http_parser.c (100%) rename src/{ => lib/http_parser}/http_parser.h (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1abde73b3..3d8d6413c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -100,7 +100,6 @@ set (core_sources util.c random.c trigger.cc - http_parser.c coll.c coll_def.c mpstream.c @@ -219,7 +218,7 @@ endif() set_source_files_compile_flags(${server_sources}) add_library(server STATIC ${server_sources}) -target_link_libraries(server core bit uri uuid ${ICU_LIBRARIES}) +target_link_libraries(server core http_parser bit uri uuid ${ICU_LIBRARIES}) # Rule of thumb: if exporting a symbol from a static library, list the # library here. diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index e06934486..e06d35bf0 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -6,6 +6,7 @@ add_subdirectory(salad) add_subdirectory(csv) add_subdirectory(json) add_subdirectory(uri) +add_subdirectory(http_parser) if(ENABLE_BUNDLED_MSGPUCK) add_subdirectory(msgpuck EXCLUDE_FROM_ALL) endif() diff --git a/src/lib/http_parser/CMakeLists.txt b/src/lib/http_parser/CMakeLists.txt new file mode 100644 index 000000000..a48f83cb6 --- /dev/null +++ b/src/lib/http_parser/CMakeLists.txt @@ -0,0 +1 @@ +add_library(http_parser STATIC http_parser.c) diff --git a/src/http_parser.c b/src/lib/http_parser/http_parser.c similarity index 100% rename from src/http_parser.c rename to src/lib/http_parser/http_parser.c diff --git a/src/http_parser.h b/src/lib/http_parser/http_parser.h similarity index 100% rename from src/http_parser.h rename to src/lib/http_parser/http_parser.h diff --git a/src/lua/httpc.c b/src/lua/httpc.c index d31e664d6..976b2d4cf 100644 --- a/src/lua/httpc.c +++ b/src/lua/httpc.c @@ -34,7 +34,7 @@ */ #define DRIVER_LUA_UDATA_NAME "httpc" -#include +#include "http_parser/http_parser.h" #include "src/httpc.h" #include "say.h" #include "lua/utils.h" -- 2.17.2 (Apple Git-113)