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 AA28F27DD2 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 Aw8nIdqJLX8X for ; Tue, 26 Feb 2019 07:11:41 -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 1278727D13 for ; Tue, 26 Feb 2019 07:11:41 -0500 (EST) From: Vladislav Shpilevoy Subject: [tarantool-patches] [PATCH v2 3/4] Move 'core' and 'uuid' libs to src/lib Date: Tue, 26 Feb 2019 15:11:35 +0300 Message-Id: <4b2b42ea9303550481c3cc462c833242c5281013.1551182934.git.v.shpilevoy@tarantool.org> 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 For the same reason why 'uri' was moved to src/lib - SWIM needs core and uuid, and SWIM will live in src/lib. This commit follows 'uri' relocation as a separate one because 'uri' relocation required some changes in the files, moved by this commit. Needed for #3234 --- CMakeLists.txt | 1 + src/CMakeLists.txt | 70 +++--------------------------- src/box/applier.h | 2 +- src/box/recovery.h | 1 - src/box/replication.h | 2 +- src/box/tuple.c | 1 - src/box/tuple.h | 2 +- src/box/xlog.h | 2 +- src/box/xrow.h | 2 +- src/lib/CMakeLists.txt | 2 + src/lib/core/CMakeLists.txt | 48 ++++++++++++++++++++ src/{ => lib/core}/assoc.c | 0 src/{ => lib/core}/assoc.h | 0 src/{ => lib/core}/backtrace.cc | 0 src/{ => lib/core}/backtrace.h | 0 src/{ => lib/core}/cbus.c | 0 src/{ => lib/core}/cbus.h | 0 src/{ => lib/core}/clock.c | 0 src/{ => lib/core}/clock.h | 0 src/{ => lib/core}/coio.cc | 0 src/{ => lib/core}/coio.h | 0 src/{ => lib/core}/coio_buf.cc | 0 src/{ => lib/core}/coio_buf.h | 0 src/{ => lib/core}/coio_file.c | 0 src/{ => lib/core}/coio_file.h | 0 src/{ => lib/core}/coio_task.c | 0 src/{ => lib/core}/coio_task.h | 0 src/{ => lib/core}/coll.c | 0 src/{ => lib/core}/coll.h | 0 src/{ => lib/core}/coll_def.c | 0 src/{ => lib/core}/coll_def.h | 0 src/{ => lib/core}/diag.c | 0 src/{ => lib/core}/diag.h | 0 src/{ => lib/core}/errinj.c | 0 src/{ => lib/core}/errinj.h | 0 src/{ => lib/core}/evio.c | 0 src/{ => lib/core}/evio.h | 0 src/{ => lib/core}/exception.cc | 0 src/{ => lib/core}/exception.h | 0 src/{ => lib/core}/fiber.c | 0 src/{ => lib/core}/fiber.h | 0 src/{ => lib/core}/fiber_channel.c | 0 src/{ => lib/core}/fiber_channel.h | 0 src/{ => lib/core}/fiber_cond.c | 0 src/{ => lib/core}/fiber_cond.h | 0 src/{ => lib/core}/fiber_pool.c | 0 src/{ => lib/core}/fiber_pool.h | 0 src/{ => lib/core}/fio.c | 0 src/{ => lib/core}/fio.h | 0 src/{ => lib/core}/latch.c | 0 src/{ => lib/core}/latch.h | 0 src/{ => lib/core}/memory.c | 0 src/{ => lib/core}/memory.h | 0 src/{ => lib/core}/mpstream.c | 0 src/{ => lib/core}/mpstream.h | 0 src/{ => lib/core}/port.c | 0 src/{ => lib/core}/port.h | 0 src/{ => lib/core}/random.c | 0 src/{ => lib/core}/random.h | 0 src/{ => lib/core}/ratelimit.h | 0 src/{ => lib/core}/reflection.c | 0 src/{ => lib/core}/reflection.h | 0 src/{ => lib/core}/say.c | 0 src/{ => lib/core}/say.h | 0 src/{ => lib/core}/sio.c | 0 src/{ => lib/core}/sio.h | 0 src/{ => lib/core}/trigger.cc | 0 src/{ => lib/core}/trigger.h | 0 src/{ => lib/core}/util.c | 0 src/lib/uuid/CMakeLists.txt | 2 + src/{ => lib/uuid}/tt_uuid.c | 0 src/{ => lib/uuid}/tt_uuid.h | 0 src/lua/httpc.c | 2 +- src/main.cc | 1 - test/unit/CMakeLists.txt | 4 +- test/unit/uuid.c | 2 +- test/unit/vy_iterators_helper.c | 2 +- test/unit/xrow.cc | 2 +- 78 files changed, 71 insertions(+), 77 deletions(-) create mode 100644 src/lib/core/CMakeLists.txt rename src/{ => lib/core}/assoc.c (100%) rename src/{ => lib/core}/assoc.h (100%) rename src/{ => lib/core}/backtrace.cc (100%) rename src/{ => lib/core}/backtrace.h (100%) rename src/{ => lib/core}/cbus.c (100%) rename src/{ => lib/core}/cbus.h (100%) rename src/{ => lib/core}/clock.c (100%) rename src/{ => lib/core}/clock.h (100%) rename src/{ => lib/core}/coio.cc (100%) rename src/{ => lib/core}/coio.h (100%) rename src/{ => lib/core}/coio_buf.cc (100%) rename src/{ => lib/core}/coio_buf.h (100%) rename src/{ => lib/core}/coio_file.c (100%) rename src/{ => lib/core}/coio_file.h (100%) rename src/{ => lib/core}/coio_task.c (100%) rename src/{ => lib/core}/coio_task.h (100%) rename src/{ => lib/core}/coll.c (100%) rename src/{ => lib/core}/coll.h (100%) rename src/{ => lib/core}/coll_def.c (100%) rename src/{ => lib/core}/coll_def.h (100%) rename src/{ => lib/core}/diag.c (100%) rename src/{ => lib/core}/diag.h (100%) rename src/{ => lib/core}/errinj.c (100%) rename src/{ => lib/core}/errinj.h (100%) rename src/{ => lib/core}/evio.c (100%) rename src/{ => lib/core}/evio.h (100%) rename src/{ => lib/core}/exception.cc (100%) rename src/{ => lib/core}/exception.h (100%) rename src/{ => lib/core}/fiber.c (100%) rename src/{ => lib/core}/fiber.h (100%) rename src/{ => lib/core}/fiber_channel.c (100%) rename src/{ => lib/core}/fiber_channel.h (100%) rename src/{ => lib/core}/fiber_cond.c (100%) rename src/{ => lib/core}/fiber_cond.h (100%) rename src/{ => lib/core}/fiber_pool.c (100%) rename src/{ => lib/core}/fiber_pool.h (100%) rename src/{ => lib/core}/fio.c (100%) rename src/{ => lib/core}/fio.h (100%) rename src/{ => lib/core}/latch.c (100%) rename src/{ => lib/core}/latch.h (100%) rename src/{ => lib/core}/memory.c (100%) rename src/{ => lib/core}/memory.h (100%) rename src/{ => lib/core}/mpstream.c (100%) rename src/{ => lib/core}/mpstream.h (100%) rename src/{ => lib/core}/port.c (100%) rename src/{ => lib/core}/port.h (100%) rename src/{ => lib/core}/random.c (100%) rename src/{ => lib/core}/random.h (100%) rename src/{ => lib/core}/ratelimit.h (100%) rename src/{ => lib/core}/reflection.c (100%) rename src/{ => lib/core}/reflection.h (100%) rename src/{ => lib/core}/say.c (100%) rename src/{ => lib/core}/say.h (100%) rename src/{ => lib/core}/sio.c (100%) rename src/{ => lib/core}/sio.h (100%) rename src/{ => lib/core}/trigger.cc (100%) rename src/{ => lib/core}/trigger.h (100%) rename src/{ => lib/core}/util.c (100%) create mode 100644 src/lib/uuid/CMakeLists.txt rename src/{ => lib/uuid}/tt_uuid.c (100%) rename src/{ => lib/uuid}/tt_uuid.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index c2606de23..2d60ad2bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,6 +207,7 @@ include_directories(${PROJECT_BINARY_DIR}/src) include_directories(${PROJECT_SOURCE_DIR}/src/lib) include_directories(${PROJECT_SOURCE_DIR}/src/lib/small) include_directories(${PROJECT_SOURCE_DIR}/src/lib/small/third_party) +include_directories(${PROJECT_SOURCE_DIR}/src/lib/core) include_directories(${PROJECT_SOURCE_DIR}) # diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3d8d6413c..b115e14c9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -73,65 +73,9 @@ if(NOT "${DL_LIBRARY}" STREQUAL "DL_LIBRARY-NOTFOUND") set(generic_libraries ${generic_libraries} dl) endif() -set (core_sources - diag.c - say.c - memory.c - clock.c - fiber.c - backtrace.cc - cbus.c - fiber_pool.c - fiber_cond.c - fiber_channel.c - latch.c - sio.c - evio.c - coio.cc - coio_task.c - coio_file.c - coio_buf.cc - fio.c - cbus.c - exception.cc - errinj.c - reflection.c - assoc.c - util.c - random.c - trigger.cc - coll.c - coll_def.c - mpstream.c - port.c - ) - -if (TARGET_OS_NETBSD) - # A workaround for "undefined reference to `__gcc_personality_v0'" - # on x86_64-rumprun-netbsd-gcc - set_source_files_properties(util.c PROPERTIES COMPILE_FLAGS - -fno-exceptions) -endif () - -add_library(core STATIC ${core_sources}) -target_link_libraries(core - salad small uri - ${LIBEV_LIBRARIES} - ${LIBEIO_LIBRARIES} - ${LIBCORO_LIBRARIES} - ${MSGPUCK_LIBRARIES} - ${generic_libraries}) - add_library(stat STATIC rmean.c latency.c histogram.c) target_link_libraries(stat core) -if (ENABLE_BACKTRACE AND NOT TARGET_OS_DARWIN) - target_link_libraries(core gcc_s ${UNWIND_LIBRARIES}) -endif() - -add_library(uuid STATIC tt_uuid.c) -target_link_libraries(uuid core bit) - add_library(scramble STATIC scramble.c) target_link_libraries(scramble core misc) @@ -182,11 +126,11 @@ set (server_sources set(api_headers ${CMAKE_BINARY_DIR}/src/trivia/config.h ${CMAKE_SOURCE_DIR}/src/trivia/util.h - ${CMAKE_SOURCE_DIR}/src/say.h - ${CMAKE_SOURCE_DIR}/src/fiber.h - ${CMAKE_SOURCE_DIR}/src/fiber_cond.h - ${CMAKE_SOURCE_DIR}/src/coio.h - ${CMAKE_SOURCE_DIR}/src/coio_task.h + ${CMAKE_SOURCE_DIR}/src/lib/core/say.h + ${CMAKE_SOURCE_DIR}/src/lib/core/fiber.h + ${CMAKE_SOURCE_DIR}/src/lib/core/fiber_cond.h + ${CMAKE_SOURCE_DIR}/src/lib/core/coio.h + ${CMAKE_SOURCE_DIR}/src/lib/core/coio_task.h ${CMAKE_SOURCE_DIR}/src/lua/utils.h ${CMAKE_SOURCE_DIR}/src/lua/error.h ${CMAKE_SOURCE_DIR}/src/lua/string.h @@ -203,8 +147,8 @@ set(api_headers ${CMAKE_SOURCE_DIR}/src/box/error.h ${CMAKE_SOURCE_DIR}/src/box/lua/call.h ${CMAKE_SOURCE_DIR}/src/box/lua/tuple.h - ${CMAKE_SOURCE_DIR}/src/latch.h - ${CMAKE_SOURCE_DIR}/src/clock.h + ${CMAKE_SOURCE_DIR}/src/lib/core/latch.h + ${CMAKE_SOURCE_DIR}/src/lib/core/clock.h ) rebuild_module_api(${api_headers}) diff --git a/src/box/applier.h b/src/box/applier.h index 25a795fe5..d942b6fbb 100644 --- a/src/box/applier.h +++ b/src/box/applier.h @@ -40,7 +40,7 @@ #include "fiber_cond.h" #include "trigger.h" #include "trivia/util.h" -#include "tt_uuid.h" +#include "uuid/tt_uuid.h" #include "uri/uri.h" #include "xrow.h" diff --git a/src/box/recovery.h b/src/box/recovery.h index 662be3cac..6e68abc0b 100644 --- a/src/box/recovery.h +++ b/src/box/recovery.h @@ -35,7 +35,6 @@ #include "third_party/tarantool_ev.h" #include "xlog.h" #include "vclock.h" -#include "tt_uuid.h" #if defined(__cplusplus) extern "C" { diff --git a/src/box/replication.h b/src/box/replication.h index 2ac620d86..925af8bd6 100644 --- a/src/box/replication.h +++ b/src/box/replication.h @@ -30,7 +30,7 @@ * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -#include "tt_uuid.h" +#include "uuid/tt_uuid.h" #include "trigger.h" #include #define RB_COMPACT 1 diff --git a/src/box/tuple.c b/src/box/tuple.c index 0770db66b..311813dc3 100644 --- a/src/box/tuple.c +++ b/src/box/tuple.c @@ -33,7 +33,6 @@ #include "trivia/util.h" #include "memory.h" #include "fiber.h" -#include "tt_uuid.h" #include "small/quota.h" #include "small/small.h" diff --git a/src/box/tuple.h b/src/box/tuple.h index 45d873d57..555611c5c 100644 --- a/src/box/tuple.h +++ b/src/box/tuple.h @@ -34,7 +34,7 @@ #include "say.h" #include "diag.h" #include "error.h" -#include "tt_uuid.h" /* tuple_field_uuid */ +#include "uuid/tt_uuid.h" /* tuple_field_uuid */ #include "tuple_format.h" #if defined(__cplusplus) diff --git a/src/box/xlog.h b/src/box/xlog.h index 6b45c8604..18c513beb 100644 --- a/src/box/xlog.h +++ b/src/box/xlog.h @@ -33,7 +33,7 @@ #include #include #include -#include "tt_uuid.h" +#include "uuid/tt_uuid.h" #include "vclock.h" #define ZSTD_STATIC_LINKING_ONLY diff --git a/src/box/xrow.h b/src/box/xrow.h index e37da1e0f..5317ae22d 100644 --- a/src/box/xrow.h +++ b/src/box/xrow.h @@ -35,7 +35,7 @@ #include #include /* struct iovec */ -#include "tt_uuid.h" +#include "uuid/tt_uuid.h" #include "diag.h" #include "vclock.h" diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index e06d35bf0..9e90c75ab 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -7,6 +7,8 @@ add_subdirectory(csv) add_subdirectory(json) add_subdirectory(uri) add_subdirectory(http_parser) +add_subdirectory(core) +add_subdirectory(uuid) if(ENABLE_BUNDLED_MSGPUCK) add_subdirectory(msgpuck EXCLUDE_FROM_ALL) endif() diff --git a/src/lib/core/CMakeLists.txt b/src/lib/core/CMakeLists.txt new file mode 100644 index 000000000..6238f3cee --- /dev/null +++ b/src/lib/core/CMakeLists.txt @@ -0,0 +1,48 @@ +set(core_sources + diag.c + say.c + memory.c + clock.c + fiber.c + backtrace.cc + cbus.c + fiber_pool.c + fiber_cond.c + fiber_channel.c + latch.c + sio.c + evio.c + coio.cc + coio_task.c + coio_file.c + coio_buf.cc + fio.c + exception.cc + errinj.c + reflection.c + assoc.c + util.c + random.c + trigger.cc + coll.c + coll_def.c + mpstream.c + port.c +) + +if (TARGET_OS_NETBSD) + # A workaround for "undefined reference to `__gcc_personality_v0'" + # on x86_64-rumprun-netbsd-gcc + set_source_files_properties(util.c PROPERTIES COMPILE_FLAGS + -fno-exceptions) +endif() + +add_library(core STATIC ${core_sources}) + +target_link_libraries(core salad small uri ${LIBEV_LIBRARIES} + ${LIBEIO_LIBRARIES} ${LIBCORO_LIBRARIES} + ${MSGPUCK_LIBRARIES}) + +if (ENABLE_BACKTRACE AND NOT TARGET_OS_DARWIN) + target_link_libraries(core gcc_s ${UNWIND_LIBRARIES}) +endif() diff --git a/src/assoc.c b/src/lib/core/assoc.c similarity index 100% rename from src/assoc.c rename to src/lib/core/assoc.c diff --git a/src/assoc.h b/src/lib/core/assoc.h similarity index 100% rename from src/assoc.h rename to src/lib/core/assoc.h diff --git a/src/backtrace.cc b/src/lib/core/backtrace.cc similarity index 100% rename from src/backtrace.cc rename to src/lib/core/backtrace.cc diff --git a/src/backtrace.h b/src/lib/core/backtrace.h similarity index 100% rename from src/backtrace.h rename to src/lib/core/backtrace.h diff --git a/src/cbus.c b/src/lib/core/cbus.c similarity index 100% rename from src/cbus.c rename to src/lib/core/cbus.c diff --git a/src/cbus.h b/src/lib/core/cbus.h similarity index 100% rename from src/cbus.h rename to src/lib/core/cbus.h diff --git a/src/clock.c b/src/lib/core/clock.c similarity index 100% rename from src/clock.c rename to src/lib/core/clock.c diff --git a/src/clock.h b/src/lib/core/clock.h similarity index 100% rename from src/clock.h rename to src/lib/core/clock.h diff --git a/src/coio.cc b/src/lib/core/coio.cc similarity index 100% rename from src/coio.cc rename to src/lib/core/coio.cc diff --git a/src/coio.h b/src/lib/core/coio.h similarity index 100% rename from src/coio.h rename to src/lib/core/coio.h diff --git a/src/coio_buf.cc b/src/lib/core/coio_buf.cc similarity index 100% rename from src/coio_buf.cc rename to src/lib/core/coio_buf.cc diff --git a/src/coio_buf.h b/src/lib/core/coio_buf.h similarity index 100% rename from src/coio_buf.h rename to src/lib/core/coio_buf.h diff --git a/src/coio_file.c b/src/lib/core/coio_file.c similarity index 100% rename from src/coio_file.c rename to src/lib/core/coio_file.c diff --git a/src/coio_file.h b/src/lib/core/coio_file.h similarity index 100% rename from src/coio_file.h rename to src/lib/core/coio_file.h diff --git a/src/coio_task.c b/src/lib/core/coio_task.c similarity index 100% rename from src/coio_task.c rename to src/lib/core/coio_task.c diff --git a/src/coio_task.h b/src/lib/core/coio_task.h similarity index 100% rename from src/coio_task.h rename to src/lib/core/coio_task.h diff --git a/src/coll.c b/src/lib/core/coll.c similarity index 100% rename from src/coll.c rename to src/lib/core/coll.c diff --git a/src/coll.h b/src/lib/core/coll.h similarity index 100% rename from src/coll.h rename to src/lib/core/coll.h diff --git a/src/coll_def.c b/src/lib/core/coll_def.c similarity index 100% rename from src/coll_def.c rename to src/lib/core/coll_def.c diff --git a/src/coll_def.h b/src/lib/core/coll_def.h similarity index 100% rename from src/coll_def.h rename to src/lib/core/coll_def.h diff --git a/src/diag.c b/src/lib/core/diag.c similarity index 100% rename from src/diag.c rename to src/lib/core/diag.c diff --git a/src/diag.h b/src/lib/core/diag.h similarity index 100% rename from src/diag.h rename to src/lib/core/diag.h diff --git a/src/errinj.c b/src/lib/core/errinj.c similarity index 100% rename from src/errinj.c rename to src/lib/core/errinj.c diff --git a/src/errinj.h b/src/lib/core/errinj.h similarity index 100% rename from src/errinj.h rename to src/lib/core/errinj.h diff --git a/src/evio.c b/src/lib/core/evio.c similarity index 100% rename from src/evio.c rename to src/lib/core/evio.c diff --git a/src/evio.h b/src/lib/core/evio.h similarity index 100% rename from src/evio.h rename to src/lib/core/evio.h diff --git a/src/exception.cc b/src/lib/core/exception.cc similarity index 100% rename from src/exception.cc rename to src/lib/core/exception.cc diff --git a/src/exception.h b/src/lib/core/exception.h similarity index 100% rename from src/exception.h rename to src/lib/core/exception.h diff --git a/src/fiber.c b/src/lib/core/fiber.c similarity index 100% rename from src/fiber.c rename to src/lib/core/fiber.c diff --git a/src/fiber.h b/src/lib/core/fiber.h similarity index 100% rename from src/fiber.h rename to src/lib/core/fiber.h diff --git a/src/fiber_channel.c b/src/lib/core/fiber_channel.c similarity index 100% rename from src/fiber_channel.c rename to src/lib/core/fiber_channel.c diff --git a/src/fiber_channel.h b/src/lib/core/fiber_channel.h similarity index 100% rename from src/fiber_channel.h rename to src/lib/core/fiber_channel.h diff --git a/src/fiber_cond.c b/src/lib/core/fiber_cond.c similarity index 100% rename from src/fiber_cond.c rename to src/lib/core/fiber_cond.c diff --git a/src/fiber_cond.h b/src/lib/core/fiber_cond.h similarity index 100% rename from src/fiber_cond.h rename to src/lib/core/fiber_cond.h diff --git a/src/fiber_pool.c b/src/lib/core/fiber_pool.c similarity index 100% rename from src/fiber_pool.c rename to src/lib/core/fiber_pool.c diff --git a/src/fiber_pool.h b/src/lib/core/fiber_pool.h similarity index 100% rename from src/fiber_pool.h rename to src/lib/core/fiber_pool.h diff --git a/src/fio.c b/src/lib/core/fio.c similarity index 100% rename from src/fio.c rename to src/lib/core/fio.c diff --git a/src/fio.h b/src/lib/core/fio.h similarity index 100% rename from src/fio.h rename to src/lib/core/fio.h diff --git a/src/latch.c b/src/lib/core/latch.c similarity index 100% rename from src/latch.c rename to src/lib/core/latch.c diff --git a/src/latch.h b/src/lib/core/latch.h similarity index 100% rename from src/latch.h rename to src/lib/core/latch.h diff --git a/src/memory.c b/src/lib/core/memory.c similarity index 100% rename from src/memory.c rename to src/lib/core/memory.c diff --git a/src/memory.h b/src/lib/core/memory.h similarity index 100% rename from src/memory.h rename to src/lib/core/memory.h diff --git a/src/mpstream.c b/src/lib/core/mpstream.c similarity index 100% rename from src/mpstream.c rename to src/lib/core/mpstream.c diff --git a/src/mpstream.h b/src/lib/core/mpstream.h similarity index 100% rename from src/mpstream.h rename to src/lib/core/mpstream.h diff --git a/src/port.c b/src/lib/core/port.c similarity index 100% rename from src/port.c rename to src/lib/core/port.c diff --git a/src/port.h b/src/lib/core/port.h similarity index 100% rename from src/port.h rename to src/lib/core/port.h diff --git a/src/random.c b/src/lib/core/random.c similarity index 100% rename from src/random.c rename to src/lib/core/random.c diff --git a/src/random.h b/src/lib/core/random.h similarity index 100% rename from src/random.h rename to src/lib/core/random.h diff --git a/src/ratelimit.h b/src/lib/core/ratelimit.h similarity index 100% rename from src/ratelimit.h rename to src/lib/core/ratelimit.h diff --git a/src/reflection.c b/src/lib/core/reflection.c similarity index 100% rename from src/reflection.c rename to src/lib/core/reflection.c diff --git a/src/reflection.h b/src/lib/core/reflection.h similarity index 100% rename from src/reflection.h rename to src/lib/core/reflection.h diff --git a/src/say.c b/src/lib/core/say.c similarity index 100% rename from src/say.c rename to src/lib/core/say.c diff --git a/src/say.h b/src/lib/core/say.h similarity index 100% rename from src/say.h rename to src/lib/core/say.h diff --git a/src/sio.c b/src/lib/core/sio.c similarity index 100% rename from src/sio.c rename to src/lib/core/sio.c diff --git a/src/sio.h b/src/lib/core/sio.h similarity index 100% rename from src/sio.h rename to src/lib/core/sio.h diff --git a/src/trigger.cc b/src/lib/core/trigger.cc similarity index 100% rename from src/trigger.cc rename to src/lib/core/trigger.cc diff --git a/src/trigger.h b/src/lib/core/trigger.h similarity index 100% rename from src/trigger.h rename to src/lib/core/trigger.h diff --git a/src/util.c b/src/lib/core/util.c similarity index 100% rename from src/util.c rename to src/lib/core/util.c diff --git a/src/lib/uuid/CMakeLists.txt b/src/lib/uuid/CMakeLists.txt new file mode 100644 index 000000000..581e4495a --- /dev/null +++ b/src/lib/uuid/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(uuid STATIC tt_uuid.c) +target_link_libraries(uuid core bit) diff --git a/src/tt_uuid.c b/src/lib/uuid/tt_uuid.c similarity index 100% rename from src/tt_uuid.c rename to src/lib/uuid/tt_uuid.c diff --git a/src/tt_uuid.h b/src/lib/uuid/tt_uuid.h similarity index 100% rename from src/tt_uuid.h rename to src/lib/uuid/tt_uuid.h diff --git a/src/lua/httpc.c b/src/lua/httpc.c index 976b2d4cf..7338799ca 100644 --- a/src/lua/httpc.c +++ b/src/lua/httpc.c @@ -39,7 +39,7 @@ #include "say.h" #include "lua/utils.h" #include "lua/httpc.h" -#include "src/fiber.h" +#include "core/fiber.h" /** Internal util functions * {{{ diff --git a/src/main.cc b/src/main.cc index b4bd3df0d..df7468907 100644 --- a/src/main.cc +++ b/src/main.cc @@ -67,7 +67,6 @@ #include "box/error.h" #include "scoped_guard.h" #include "random.h" -#include "tt_uuid.h" #include "cfg.h" #include "version.h" #include diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index 16739f75d..18118d374 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -123,9 +123,9 @@ add_executable(find_path.test find_path.c ) add_executable(reflection_c.test reflection_c.c unit.c - ${CMAKE_SOURCE_DIR}/src/reflection.c) + ${CMAKE_SOURCE_DIR}/src/lib/core/reflection.c) add_executable(reflection_cxx.test reflection_cxx.cc unit.c - ${CMAKE_SOURCE_DIR}/src/reflection.c) + ${CMAKE_SOURCE_DIR}/src/lib/core/reflection.c) add_executable(csv.test csv.c) target_link_libraries(csv.test csv) diff --git a/test/unit/uuid.c b/test/unit/uuid.c index fbebee329..c43d93b4f 100644 --- a/test/unit/uuid.c +++ b/test/unit/uuid.c @@ -1,5 +1,5 @@ #include "unit.h" -#include +#include "uuid/tt_uuid.h" #include static void diff --git a/test/unit/vy_iterators_helper.c b/test/unit/vy_iterators_helper.c index 55d8504bb..9fd457664 100644 --- a/test/unit/vy_iterators_helper.c +++ b/test/unit/vy_iterators_helper.c @@ -1,7 +1,7 @@ #include "vy_iterators_helper.h" #include "memory.h" #include "fiber.h" -#include "tt_uuid.h" +#include "uuid/tt_uuid.h" #include "say.h" struct tt_uuid INSTANCE_UUID; diff --git a/test/unit/xrow.cc b/test/unit/xrow.cc index 0a202ccea..d7c172955 100644 --- a/test/unit/xrow.cc +++ b/test/unit/xrow.cc @@ -34,7 +34,7 @@ extern "C" { #include "trivia/util.h" #include "box/xrow.h" #include "box/iproto_constants.h" -#include "tt_uuid.h" +#include "uuid/tt_uuid.h" #include "version.h" #include "random.h" #include "memory.h" -- 2.17.2 (Apple Git-113)