diff --git a/.reuse/dep5 b/.reuse/dep5 index c5f0b263d..c22be91c2 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -111,18 +111,18 @@ Files: deps/hiredict/.gitignore deps/hiredict/.travis.yml deps/hiredict/appveyor Copyright: Salvatore Sanfilippo License: BSD-3-Clause -Files: deps/hiredict/hiredict.pc.in deps/hiredict/hiredict.targets deps/hiredict/hiredict_ssl.pc.in +Files: deps/hiredict/util/hiredict.pc.in deps/hiredict/util/hiredict.targets deps/hiredict/util/hiredict_ssl.pc.in Copyright: Salvatore Sanfilippo License: BSD-3-Clause -Files: deps/hiredict/shim/hiredis.pc.in deps/hiredict/shim/hiredis_ssl.pc.in +Files: deps/hiredict/util/hiredis.pc.in deps/hiredict/util/hiredis_ssl.pc.in Copyright: Salvatore Sanfilippo License: BSD-3-Clause -Files: deps/hiredict/hiredict-config.cmake.in deps/hiredict/hiredict_ssl-config.cmake.in +Files: deps/hiredict/util/hiredict-config.cmake.in deps/hiredict/util/hiredict_ssl-config.cmake.in Copyright: Salvatore Sanfilippo License: BSD-3-Clause -Files: deps/hiredict/hiredict.targets +Files: deps/hiredict/util/hiredict.targets Copyright: Salvatore Sanfilippo License: BSD-3-Clause diff --git a/deps/hiredict/.gitignore b/deps/hiredict/.gitignore index 1fe9080f9..327b0e946 100644 --- a/deps/hiredict/.gitignore +++ b/deps/hiredict/.gitignore @@ -1,6 +1,7 @@ /hiredict-test /examples/hiredict-example* -/*.o +src/*.o +src/*.d /*.so /*.dylib /*.a diff --git a/deps/hiredict/.reuse/dep5 b/deps/hiredict/.reuse/dep5 index c68298a8f..b7b64df48 100644 --- a/deps/hiredict/.reuse/dep5 +++ b/deps/hiredict/.reuse/dep5 @@ -7,18 +7,18 @@ Files: .gitignore .travis.yml appveyor.yml Copyright: Salvatore Sanfilippo License: BSD-3-Clause -Files: hiredict.pc.in hiredict.targets hiredict_ssl.pc.in +Files: util/hiredict.pc.in util/hiredict.targets util/hiredict_ssl.pc.in Copyright: Salvatore Sanfilippo License: BSD-3-Clause -Files: shim/hiredis.pc.in shim/hiredis_ssl.pc.in +Files: util/hiredis.pc.in util/hiredis_ssl.pc.in Copyright: Salvatore Sanfilippo License: BSD-3-Clause -Files: hiredict-config.cmake.in hiredict_ssl-config.cmake.in +Files: util/hiredict-config.cmake.in util/hiredict_ssl-config.cmake.in Copyright: Salvatore Sanfilippo License: BSD-3-Clause -Files: hiredict.targets +Files: util/hiredict.targets Copyright: Salvatore Sanfilippo License: BSD-3-Clause diff --git a/deps/hiredict/CMakeLists.txt b/deps/hiredict/CMakeLists.txt index 872de4527..84eeb0338 100644 --- a/deps/hiredict/CMakeLists.txt +++ b/deps/hiredict/CMakeLists.txt @@ -8,7 +8,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0) MACRO(getVersionBit name) SET(VERSION_REGEX "^#define ${name} (.+)$") - FILE(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/hiredict.h" + FILE(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/hiredict/hiredict.h" VERSION_BIT REGEX ${VERSION_REGEX}) STRING(REGEX REPLACE ${VERSION_REGEX} "\\1" ${name} "${VERSION_BIT}") ENDMACRO(getVersionBit) @@ -38,13 +38,13 @@ SET(CMAKE_C_STANDARD 99) SET(CMAKE_DEBUG_POSTFIX d) SET(hiredict_sources - alloc.c - async.c - hiredict.c - net.c - read.c - sds.c - sockcompat.c) + src/alloc.c + src/async.c + src/hiredict.c + src/net.c + src/read.c + src/sds.c + src/sockcompat.c) SET(hiredict_sources ${hiredict_sources}) @@ -52,6 +52,7 @@ IF(WIN32) ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -DWIN32_LEAN_AND_MEAN) ENDIF() +INCLUDE_DIRECTORIES(include) ADD_LIBRARY(hiredict ${hiredict_sources}) ADD_LIBRARY(hiredict::hiredict ALIAS hiredict) set(hiredict_export_name hiredict CACHE STRING "Name of the exported target") @@ -76,8 +77,8 @@ ENDIF() TARGET_INCLUDE_DIRECTORIES(hiredict PUBLIC $ $) -CONFIGURE_FILE(hiredict.pc.in hiredict.pc @ONLY) -CONFIGURE_FILE(shim/hiredis.pc.in hiredis.pc @ONLY) +CONFIGURE_FILE(util/hiredict.pc.in hiredict.pc @ONLY) +CONFIGURE_FILE(util/hiredis.pc.in hiredis.pc @ONLY) set(CPACK_PACKAGE_VENDOR "Redict") set(CPACK_PACKAGE_DESCRIPTION "\ @@ -118,18 +119,24 @@ endif() if (ENABLE_NUGET) # For NuGet packages - INSTALL(FILES hiredict.targets + INSTALL(FILES util/hiredict.targets DESTINATION build/native) endif() -INSTALL(FILES hiredict.h read.h sds.h async.h alloc.h sockcompat.h +INSTALL(FILES + include/hiredict/hiredict.h + include/hiredict/read.h + include/hiredict/sds.h + include/hiredict/async.h + include/hiredict/alloc.h + include/hiredict/sockcompat.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hiredict) INSTALL(FILES shim/hiredis.h shim/read.h shim/sds.h shim/async.h shim/alloc.h shim/sockcompat.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hiredis) -INSTALL(DIRECTORY adapters +INSTALL(DIRECTORY include/hiredict/adapters DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hiredict) INSTALL(DIRECTORY shim/adapters @@ -154,7 +161,7 @@ SET(INCLUDE_INSTALL_DIR include) include(CMakePackageConfigHelpers) write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/hiredict-config-version.cmake" COMPATIBILITY SameMajorVersion) -configure_package_config_file(hiredict-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/hiredict-config.cmake +configure_package_config_file(util/hiredict-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/hiredict-config.cmake INSTALL_DESTINATION ${CMAKE_CONF_INSTALL_DIR} PATH_VARS INCLUDE_INSTALL_DIR) @@ -176,7 +183,7 @@ IF(ENABLE_SSL) ENDIF() FIND_PACKAGE(OpenSSL REQUIRED) SET(hiredict_ssl_sources - ssl.c) + src/ssl.c) ADD_LIBRARY(hiredict_ssl ${hiredict_ssl_sources}) ADD_LIBRARY(hiredict::hiredict_ssl ALIAS hiredict_ssl) @@ -196,8 +203,8 @@ IF(ENABLE_SSL) IF(WIN32) TARGET_LINK_LIBRARIES(hiredict_ssl PRIVATE hiredict) ENDIF() - CONFIGURE_FILE(hiredict_ssl.pc.in hiredict_ssl.pc @ONLY) - CONFIGURE_FILE(shim/hiredis_ssl.pc.in hiredis_ssl.pc @ONLY) + CONFIGURE_FILE(util/hiredict_ssl.pc.in hiredict_ssl.pc @ONLY) + CONFIGURE_FILE(util/hiredis_ssl.pc.in hiredis_ssl.pc @ONLY) INSTALL(TARGETS hiredict_ssl EXPORT hiredict_ssl-targets @@ -211,7 +218,7 @@ IF(ENABLE_SSL) CONFIGURATIONS Debug RelWithDebInfo) endif() - INSTALL(FILES hiredict_ssl.h + INSTALL(FILES include/hiredict/hiredict_ssl.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hiredict) INSTALL(FILES shim/hiredis_ssl.h @@ -232,7 +239,7 @@ IF(ENABLE_SSL) else() SET(CMAKE_CONF_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/hiredict_ssl) endif() - configure_package_config_file(hiredict_ssl-config.cmake.in + configure_package_config_file(util/hiredict_ssl-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/hiredict_ssl-config.cmake INSTALL_DESTINATION ${CMAKE_CONF_INSTALL_DIR} PATH_VARS INCLUDE_INSTALL_DIR) @@ -248,7 +255,7 @@ ENDIF() IF(NOT DISABLE_TESTS) ENABLE_TESTING() - ADD_EXECUTABLE(hiredict-test test.c) + ADD_EXECUTABLE(hiredict-test src/test.c) TARGET_LINK_LIBRARIES(hiredict-test hiredict) IF(ENABLE_SSL_TESTS) ADD_DEFINITIONS(-DHIREDICT_TEST_SSL=1) @@ -259,7 +266,7 @@ IF(NOT DISABLE_TESTS) TARGET_LINK_LIBRARIES(hiredict-test event) ENDIF() ADD_TEST(NAME hiredict-test - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test.sh) + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/util/test.sh) ENDIF() # Add examples diff --git a/deps/hiredict/Makefile b/deps/hiredict/Makefile index b62a840a3..c54ede3a4 100644 --- a/deps/hiredict/Makefile +++ b/deps/hiredict/Makefile @@ -9,20 +9,38 @@ # SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: LGPL-3.0-or-later -OBJ=alloc.o net.o hiredict.o sds.o async.o read.o sockcompat.o +OBJ=src/alloc.o src/net.o src/hiredict.o src/sds.o src/async.o src/read.o src/sockcompat.o src/test.o EXAMPLES=hiredict-example hiredict-example-libevent hiredict-example-libev hiredict-example-glib hiredict-example-push hiredict-example-poll TESTS=hiredict-test LIBNAME=libhiredict PKGCONFNAME=hiredict.pc -SHIM_PKGCONFNAME=shim/hiredis.pc +SHIM_PKGCONFNAME=hiredis.pc -HIREDICT_MAJOR=$(shell grep HIREDICT_MAJOR hiredict.h | awk '{print $$3}') -HIREDICT_MINOR=$(shell grep HIREDICT_MINOR hiredict.h | awk '{print $$3}') -HIREDICT_PATCH=$(shell grep HIREDICT_PATCH hiredict.h | awk '{print $$3}') -HIREDICT_SONAME=$(shell grep HIREDICT_SONAME hiredict.h | awk '{print $$3}') +HIREDICT_HEADER=include/hiredict/hiredict.h + +HIREDICT_MAJOR=$(shell grep HIREDICT_MAJOR $(HIREDICT_HEADER) | awk '{print $$3}') +HIREDICT_MINOR=$(shell grep HIREDICT_MINOR $(HIREDICT_HEADER) | awk '{print $$3}') +HIREDICT_PATCH=$(shell grep HIREDICT_PATCH $(HIREDICT_HEADER) | awk '{print $$3}') +HIREDICT_SONAME=$(shell grep HIREDICT_SONAME $(HIREDICT_HEADER) | awk '{print $$3}') HIREDICT_VERSION=$(HIREDICT_MAJOR).$(HIREDICT_MINOR).$(HIREDICT_PATCH) +INSTALL_HEADERS=$(HIREDICT_HEADER) \ + include/hiredict/adapters \ + include/hiredict/alloc.h \ + include/hiredict/async.h \ + include/hiredict/read.h \ + include/hiredict/sds.h \ + include/hiredict/sockcompat.h + +INSTALL_SHIM_HEADERS=shim/hiredis.h \ + shim/adapters \ + shim/alloc.h \ + shim/async.h \ + shim/read.h \ + shim/sds.h \ + shim/sockcompat.h + # Installation related variables and target PREFIX?=/usr/local INCLUDE_PATH?=include/hiredict @@ -56,6 +74,7 @@ ifeq ($(USE_WERROR),1) WARNINGS+=-Werror endif DEBUG_FLAGS?= -g -ggdb +CFLAGS+=-Iinclude -MMD REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CPPFLAGS) $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) $(PLATFORM_FLAGS) REAL_LDFLAGS=$(LDFLAGS) @@ -70,10 +89,10 @@ STLIBNAME=$(LIBNAME).$(STLIBSUFFIX) STLIB_MAKE_CMD=$(AR) rcs #################### SSL variables start #################### -SSL_OBJ=ssl.o +SSL_OBJ=src/ssl.o SSL_LIBNAME=libhiredict_ssl SSL_PKGCONFNAME=hiredict_ssl.pc -SSL_SHIM_PKGCONFNAME=shim/hiredis_ssl.pc +SSL_SHIM_PKGCONFNAME=hiredis_ssl.pc SSL_INSTALLNAME=install-ssl SSL_DYLIB_MINOR_NAME=$(SSL_LIBNAME).$(DYLIBSUFFIX).$(HIREDICT_SONAME) SSL_DYLIB_MAJOR_NAME=$(SSL_LIBNAME).$(DYLIBSUFFIX).$(HIREDICT_MAJOR) @@ -155,7 +174,10 @@ endif ifeq ($(uname_S),Darwin) DYLIBSUFFIX=dylib DYLIB_MINOR_NAME=$(LIBNAME).$(HIREDICT_SONAME).$(DYLIBSUFFIX) + DYLIB_MAJOR_NAME=$(LIBNAME).$(HIREDICT_MAJOR).$(DYLIBSUFFIX) DYLIB_MAKE_CMD=$(CC) -dynamiclib -Wl,-install_name,$(PREFIX)/$(LIBRARY_PATH)/$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS) + SSL_DYLIB_MINOR_NAME=$(SSL_LIBNAME).$(HIREDICT_SONAME).$(DYLIBSUFFIX) + SSL_DYLIB_MAJOR_NAME=$(SSL_LIBNAME).$(HIREDICT_MAJOR).$(DYLIBSUFFIX) SSL_DYLIB_MAKE_CMD=$(CC) -dynamiclib -Wl,-install_name,$(PREFIX)/$(LIBRARY_PATH)/$(SSL_DYLIB_MINOR_NAME) -o $(SSL_DYLIBNAME) $(LDFLAGS) $(SSL_LDFLAGS) DYLIB_PLUGIN=-Wl,-undefined -Wl,dynamic_lookup endif @@ -168,16 +190,8 @@ static: $(STLIBNAME) $(SSL_STLIB) pkgconfig: $(PKGCONFNAME) $(SHIM_PKGCONFNAME) $(SSL_PKGCONF) $(SSL_SHIM_PKGCONF) -# Deps (use make dep to generate this) -alloc.o: alloc.c fmacros.h alloc.h -async.o: async.c fmacros.h alloc.h async.h hiredict.h read.h sds.h net.h dict.c dict.h win32.h async_private.h -dict.o: dict.c fmacros.h alloc.h dict.h -hiredict.o: hiredict.c fmacros.h hiredict.h read.h sds.h alloc.h net.h async.h win32.h -net.o: net.c fmacros.h net.h hiredict.h read.h sds.h alloc.h sockcompat.h win32.h -read.o: read.c fmacros.h alloc.h read.h sds.h win32.h -sds.o: sds.c sds.h sdsalloc.h alloc.h -sockcompat.o: sockcompat.c sockcompat.h -test.o: test.c fmacros.h hiredict.h read.h sds.h alloc.h net.h sockcompat.h win32.h +# include header dependencies generated by -MMD. +-include $(OBJ:%.o=%.d) $(DYLIBNAME): $(OBJ) $(DYLIB_MAKE_CMD) -o $(DYLIBNAME) $(OBJ) $(REAL_LDFLAGS) @@ -191,8 +205,6 @@ $(SSL_DYLIBNAME): $(SSL_OBJ) $(SSL_STLIBNAME): $(SSL_OBJ) $(STLIB_MAKE_CMD) $(SSL_STLIBNAME) $(SSL_OBJ) - -$(SSL_OBJ): ssl.c hiredict.h read.h sds.h alloc.h async.h win32.h async_private.h #################### SSL building rules end #################### # Binaries: @@ -272,7 +284,7 @@ ifeq ($(TEST_ASYNC),1) TEST_LDFLAGS += -levent endif -hiredict-test: test.o $(TEST_LIBS) +hiredict-test: src/test.o $(TEST_LIBS) $(CC) -o $@ $(REAL_CFLAGS) -I. $^ $(REAL_LDFLAGS) $(TEST_LDFLAGS) hiredict-%: %.o $(STLIBNAME) @@ -282,22 +294,22 @@ test: hiredict-test ./hiredict-test check: hiredict-test - TEST_SSL=$(USE_SSL) ./test.sh + TEST_SSL=$(USE_SSL) ./util/test.sh .c.o: - $(CC) -std=c99 -c $(REAL_CFLAGS) $< + $(CC) -std=c99 -c $(REAL_CFLAGS) $< -o $@ clean: rm -rf $(DYLIBNAME) $(STLIBNAME) $(SSL_DYLIBNAME) $(SSL_STLIBNAME) $(TESTS) \ $(PKGCONFNAME) $(SHIM_PKGCONFNAME) $(SSL_PKGCONFNAME) $(SSL_SHIM_PKGCONFNAME) \ - examples/hiredict-example* *.o *.gcda *.gcno *.gcov + examples/hiredict-example* src/*.o src/*.d *.gcda *.gcno *.gcov dep: - $(CC) $(CPPFLAGS) $(CFLAGS) -MM *.c + $(CC) $(CPPFLAGS) $(CFLAGS) -MM src/*.c INSTALL?= cp -pPR -%.pc: %.pc.in +%.pc: util/%.pc.in @echo "Generating $@ for pkgconfig..." @sed -e 's#@PREFIX@#$(PREFIX)#' \ -e 's#@LIBDIR@#$(LIBRARY_PATH)#' \ @@ -305,11 +317,12 @@ INSTALL?= cp -pPR "$<" > "$@" install: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME) $(SHIM_PKGCONFNAME) $(SSL_INSTALL) - mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_INCLUDE_PATH)/adapters $(INSTALL_LIBRARY_PATH) $(SHIM_INSTALL_INCLUDE_PATH) $(SHIM_INSTALL_INCLUDE_PATH)/adapters - $(INSTALL) hiredict.h async.h read.h sds.h alloc.h sockcompat.h $(INSTALL_INCLUDE_PATH) - $(INSTALL) shim/hiredis.h shim/async.h shim/read.h shim/sds.h shim/alloc.h shim/sockcompat.h $(SHIM_INSTALL_INCLUDE_PATH) - $(INSTALL) adapters/*.h $(INSTALL_INCLUDE_PATH)/adapters - $(INSTALL) shim/adapters/*.h $(SHIM_INSTALL_INCLUDE_PATH)/adapters + mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_INCLUDE_PATH)/adapters $(INSTALL_LIBRARY_PATH) \ + $(SHIM_INSTALL_INCLUDE_PATH) $(SHIM_INSTALL_INCLUDE_PATH)/adapters + + $(INSTALL) $(INSTALL_HEADERS) $(INSTALL_INCLUDE_PATH) + $(INSTALL) $(INSTALL_SHIM_HEADERS) $(SHIM_INSTALL_INCLUDE_PATH) + $(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME) cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIBNAME) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIB_MAJOR_NAME) $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH) @@ -318,7 +331,7 @@ install: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME) $(SHIM_PKGCONFNAME) $(SSL_INST install-ssl: $(SSL_DYLIBNAME) $(SSL_STLIBNAME) $(SSL_PKGCONFNAME) $(SSL_SHIM_PKGCONFNAME) mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH) $(SHIM_INSTALL_INCLUDE_PATH) - $(INSTALL) hiredict_ssl.h $(INSTALL_INCLUDE_PATH) + $(INSTALL) include/hiredict/hiredict_ssl.h $(INSTALL_INCLUDE_PATH) $(INSTALL) shim/hiredis_ssl.h $(SHIM_INSTALL_INCLUDE_PATH) $(INSTALL) $(SSL_DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(SSL_DYLIB_MINOR_NAME) cd $(INSTALL_LIBRARY_PATH) && ln -sf $(SSL_DYLIB_MINOR_NAME) $(SSL_DYLIBNAME) && ln -sf $(SSL_DYLIB_MINOR_NAME) $(SSL_DYLIB_MAJOR_NAME) diff --git a/deps/hiredict/appveyor.yml b/deps/hiredict/appveyor.yml deleted file mode 100644 index 6791923c6..000000000 --- a/deps/hiredict/appveyor.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Appveyor configuration file for CI build of hiredict on Windows (under Cygwin) - -environment: - matrix: - - CYG_BASH: C:\cygwin64\bin\bash - CC: gcc - - CYG_BASH: C:\cygwin\bin\bash - CC: gcc - CFLAGS: -m32 - CXXFLAGS: -m32 - LDFLAGS: -m32 - -clone_depth: 1 - -# Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail -init: - - git config --global core.autocrlf input - -# Install needed build dependencies -install: - - '%CYG_BASH% -lc "cygcheck -dc cygwin"' - -build_script: - - 'echo building...' - - '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0 #include -#include -#include -#include +#include +#include +#include /* Put event loop in the global scope, so it can be explicitly stopped */ static aeEventLoop *loop; diff --git a/deps/hiredict/examples/example-glib.c b/deps/hiredict/examples/example-glib.c index 97cf279b2..ec36eba1f 100644 --- a/deps/hiredict/examples/example-glib.c +++ b/deps/hiredict/examples/example-glib.c @@ -6,9 +6,9 @@ #include -#include -#include -#include +#include +#include +#include static GMainLoop *mainloop; diff --git a/deps/hiredict/examples/example-ivykis.c b/deps/hiredict/examples/example-ivykis.c index 8aa257078..a2047db05 100644 --- a/deps/hiredict/examples/example-ivykis.c +++ b/deps/hiredict/examples/example-ivykis.c @@ -9,9 +9,9 @@ #include #include -#include -#include -#include +#include +#include +#include void getCallback(redictAsyncContext *c, void *r, void *privdata) { redictReply *reply = r; diff --git a/deps/hiredict/examples/example-libev.c b/deps/hiredict/examples/example-libev.c index b1806745a..511983749 100644 --- a/deps/hiredict/examples/example-libev.c +++ b/deps/hiredict/examples/example-libev.c @@ -9,9 +9,9 @@ #include #include -#include -#include -#include +#include +#include +#include void getCallback(redictAsyncContext *c, void *r, void *privdata) { redictReply *reply = r; diff --git a/deps/hiredict/examples/example-libevent-ssl.c b/deps/hiredict/examples/example-libevent-ssl.c index b15e7e2d9..336b439c7 100644 --- a/deps/hiredict/examples/example-libevent-ssl.c +++ b/deps/hiredict/examples/example-libevent-ssl.c @@ -9,10 +9,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include void getCallback(redictAsyncContext *c, void *r, void *privdata) { redictReply *reply = r; diff --git a/deps/hiredict/examples/example-libevent.c b/deps/hiredict/examples/example-libevent.c index efc21d6bc..c093230de 100644 --- a/deps/hiredict/examples/example-libevent.c +++ b/deps/hiredict/examples/example-libevent.c @@ -9,9 +9,9 @@ #include #include -#include -#include -#include +#include +#include +#include void getCallback(redictAsyncContext *c, void *r, void *privdata) { redictReply *reply = r; diff --git a/deps/hiredict/examples/example-libhv.c b/deps/hiredict/examples/example-libhv.c index ca053c0c3..bf7e20b92 100644 --- a/deps/hiredict/examples/example-libhv.c +++ b/deps/hiredict/examples/example-libhv.c @@ -9,9 +9,9 @@ #include #include -#include -#include -#include +#include +#include +#include void getCallback(redictAsyncContext *c, void *r, void *privdata) { redictReply *reply = r; diff --git a/deps/hiredict/examples/example-libsdevent.c b/deps/hiredict/examples/example-libsdevent.c index 6e544fc34..0bdb9f6e8 100644 --- a/deps/hiredict/examples/example-libsdevent.c +++ b/deps/hiredict/examples/example-libsdevent.c @@ -9,9 +9,9 @@ #include #include -#include -#include -#include +#include +#include +#include void debugCallback(redictAsyncContext *c, void *r, void *privdata) { (void)privdata; diff --git a/deps/hiredict/examples/example-libuv.c b/deps/hiredict/examples/example-libuv.c index c8992bc9f..81f3a4b9e 100644 --- a/deps/hiredict/examples/example-libuv.c +++ b/deps/hiredict/examples/example-libuv.c @@ -9,9 +9,9 @@ #include #include -#include -#include -#include +#include +#include +#include void debugCallback(redictAsyncContext *c, void *r, void *privdata) { (void)privdata; //unused diff --git a/deps/hiredict/examples/example-macosx.c b/deps/hiredict/examples/example-macosx.c index 265afe477..1d17c1fee 100644 --- a/deps/hiredict/examples/example-macosx.c +++ b/deps/hiredict/examples/example-macosx.c @@ -8,9 +8,9 @@ #include -#include -#include -#include +#include +#include +#include void getCallback(redictAsyncContext *c, void *r, void *privdata) { redictReply *reply = r; diff --git a/deps/hiredict/examples/example-poll.c b/deps/hiredict/examples/example-poll.c index 75d4fd54e..e9a35f559 100644 --- a/deps/hiredict/examples/example-poll.c +++ b/deps/hiredict/examples/example-poll.c @@ -10,8 +10,8 @@ #include #include -#include -#include +#include +#include /* Put in the global scope, so that loop can be explicitly stopped */ static int exit_loop = 0; diff --git a/deps/hiredict/examples/example-push.c b/deps/hiredict/examples/example-push.c index 1d6d0b54e..e587fc2c8 100644 --- a/deps/hiredict/examples/example-push.c +++ b/deps/hiredict/examples/example-push.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #define KEY_COUNT 5 diff --git a/deps/hiredict/examples/example-qt.h b/deps/hiredict/examples/example-qt.h index f48df1712..a1646a192 100644 --- a/deps/hiredict/examples/example-qt.h +++ b/deps/hiredict/examples/example-qt.h @@ -7,7 +7,7 @@ #ifndef __HIREDICT_EXAMPLE_QT_H #define __HIREDICT_EXAMPLE_QT_H -#include +#include class ExampleQt : public QObject { diff --git a/deps/hiredict/examples/example-redictmoduleapi.c b/deps/hiredict/examples/example-redictmoduleapi.c index 84dea0dfd..5b7b5297f 100644 --- a/deps/hiredict/examples/example-redictmoduleapi.c +++ b/deps/hiredict/examples/example-redictmoduleapi.c @@ -9,9 +9,9 @@ #include #include -#include -#include -#include +#include +#include +#include void debugCallback(redictAsyncContext *c, void *r, void *privdata) { (void)privdata; //unused diff --git a/deps/hiredict/examples/example-ssl.c b/deps/hiredict/examples/example-ssl.c index c9b8818b6..8fd660eea 100644 --- a/deps/hiredict/examples/example-ssl.c +++ b/deps/hiredict/examples/example-ssl.c @@ -8,8 +8,8 @@ #include #include -#include -#include +#include +#include #ifdef _MSC_VER #include /* For struct timeval */ diff --git a/deps/hiredict/examples/example.c b/deps/hiredict/examples/example.c index 28e77e44b..5d3d01e48 100644 --- a/deps/hiredict/examples/example.c +++ b/deps/hiredict/examples/example.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #ifdef _MSC_VER #include /* For struct timeval */ diff --git a/deps/hiredict/fuzzing/format_command_fuzzer.c b/deps/hiredict/fuzzing/format_command_fuzzer.c index cbca8b0ef..0250414f7 100644 --- a/deps/hiredict/fuzzing/format_command_fuzzer.c +++ b/deps/hiredict/fuzzing/format_command_fuzzer.c @@ -17,7 +17,7 @@ #include #include -#include "hiredict.h" +#include int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { char *new_str, *cmd; diff --git a/deps/hiredict/async_private.h b/deps/hiredict/include/async_private.h similarity index 100% rename from deps/hiredict/async_private.h rename to deps/hiredict/include/async_private.h diff --git a/deps/hiredict/dict.h b/deps/hiredict/include/dict.h similarity index 100% rename from deps/hiredict/dict.h rename to deps/hiredict/include/dict.h diff --git a/deps/hiredict/fmacros.h b/deps/hiredict/include/fmacros.h similarity index 100% rename from deps/hiredict/fmacros.h rename to deps/hiredict/include/fmacros.h diff --git a/deps/hiredict/adapters/ae.h b/deps/hiredict/include/hiredict/adapters/ae.h similarity index 98% rename from deps/hiredict/adapters/ae.h rename to deps/hiredict/include/hiredict/adapters/ae.h index 1edcd0e9c..22a1cedd1 100644 --- a/deps/hiredict/adapters/ae.h +++ b/deps/hiredict/include/hiredict/adapters/ae.h @@ -13,8 +13,8 @@ #define __HIREDICT_AE_H__ #include #include -#include "../hiredict.h" -#include "../async.h" +#include +#include typedef struct redictAeEvents { redictAsyncContext *context; diff --git a/deps/hiredict/adapters/glib.h b/deps/hiredict/include/hiredict/adapters/glib.h similarity index 98% rename from deps/hiredict/adapters/glib.h rename to deps/hiredict/include/hiredict/adapters/glib.h index 84490c8a3..76568208d 100644 --- a/deps/hiredict/adapters/glib.h +++ b/deps/hiredict/include/hiredict/adapters/glib.h @@ -14,8 +14,8 @@ #include -#include "../hiredict.h" -#include "../async.h" +#include +#include typedef struct { diff --git a/deps/hiredict/adapters/ivykis.h b/deps/hiredict/include/hiredict/adapters/ivykis.h similarity index 97% rename from deps/hiredict/adapters/ivykis.h rename to deps/hiredict/include/hiredict/adapters/ivykis.h index a8468d87d..805c8aa6b 100644 --- a/deps/hiredict/adapters/ivykis.h +++ b/deps/hiredict/include/hiredict/adapters/ivykis.h @@ -12,8 +12,8 @@ #ifndef __HIREDICT_IVYKIS_H__ #define __HIREDICT_IVYKIS_H__ #include -#include "../hiredict.h" -#include "../async.h" +#include +#include typedef struct redictIvykisEvents { redictAsyncContext *context; diff --git a/deps/hiredict/adapters/libev.h b/deps/hiredict/include/hiredict/adapters/libev.h similarity index 98% rename from deps/hiredict/adapters/libev.h rename to deps/hiredict/include/hiredict/adapters/libev.h index 9aa841e15..0734bc333 100644 --- a/deps/hiredict/adapters/libev.h +++ b/deps/hiredict/include/hiredict/adapters/libev.h @@ -16,8 +16,8 @@ #include #include #include -#include "../hiredict.h" -#include "../async.h" +#include +#include typedef struct redictLibevEvents { redictAsyncContext *context; diff --git a/deps/hiredict/adapters/libevent.h b/deps/hiredict/include/hiredict/adapters/libevent.h similarity index 98% rename from deps/hiredict/adapters/libevent.h rename to deps/hiredict/include/hiredict/adapters/libevent.h index 66ce6b631..c4e97b493 100644 --- a/deps/hiredict/adapters/libevent.h +++ b/deps/hiredict/include/hiredict/adapters/libevent.h @@ -12,8 +12,8 @@ #ifndef __HIREDICT_LIBEVENT_H__ #define __HIREDICT_LIBEVENT_H__ #include -#include "../hiredict.h" -#include "../async.h" +#include +#include #define REDICT_LIBEVENT_DELETED 0x01 #define REDICT_LIBEVENT_ENTERED 0x02 diff --git a/deps/hiredict/adapters/libhv.h b/deps/hiredict/include/hiredict/adapters/libhv.h similarity index 98% rename from deps/hiredict/adapters/libhv.h rename to deps/hiredict/include/hiredict/adapters/libhv.h index 2d6fd772d..ddccacadc 100644 --- a/deps/hiredict/adapters/libhv.h +++ b/deps/hiredict/include/hiredict/adapters/libhv.h @@ -13,8 +13,8 @@ #define __HIREDICT_LIBHV_H__ #include -#include "../hiredict.h" -#include "../async.h" +#include +#include typedef struct redictLibhvEvents { hio_t *io; diff --git a/deps/hiredict/adapters/libsdevent.h b/deps/hiredict/include/hiredict/adapters/libsdevent.h similarity index 98% rename from deps/hiredict/adapters/libsdevent.h rename to deps/hiredict/include/hiredict/adapters/libsdevent.h index 103d69ee1..3086646df 100644 --- a/deps/hiredict/adapters/libsdevent.h +++ b/deps/hiredict/include/hiredict/adapters/libsdevent.h @@ -12,8 +12,8 @@ #ifndef HIREDICT_LIBSDEVENT_H #define HIREDICT_LIBSDEVENT_H #include -#include "../hiredict.h" -#include "../async.h" +#include +#include #define REDICT_LIBSDEVENT_DELETED 0x01 #define REDICT_LIBSDEVENT_ENTERED 0x02 diff --git a/deps/hiredict/adapters/libuv.h b/deps/hiredict/include/hiredict/adapters/libuv.h similarity index 98% rename from deps/hiredict/adapters/libuv.h rename to deps/hiredict/include/hiredict/adapters/libuv.h index e91b8722b..b7da4f676 100644 --- a/deps/hiredict/adapters/libuv.h +++ b/deps/hiredict/include/hiredict/adapters/libuv.h @@ -13,8 +13,8 @@ #define __HIREDICT_LIBUV_H__ #include #include -#include "../hiredict.h" -#include "../async.h" +#include +#include #include typedef struct redictLibuvEvents { diff --git a/deps/hiredict/adapters/macosx.h b/deps/hiredict/include/hiredict/adapters/macosx.h similarity index 98% rename from deps/hiredict/adapters/macosx.h rename to deps/hiredict/include/hiredict/adapters/macosx.h index 670ca62e6..cb4b4e4ef 100644 --- a/deps/hiredict/adapters/macosx.h +++ b/deps/hiredict/include/hiredict/adapters/macosx.h @@ -14,8 +14,8 @@ #include -#include "../hiredict.h" -#include "../async.h" +#include +#include typedef struct { redictAsyncContext *context; diff --git a/deps/hiredict/adapters/poll.h b/deps/hiredict/include/hiredict/adapters/poll.h similarity index 98% rename from deps/hiredict/adapters/poll.h rename to deps/hiredict/include/hiredict/adapters/poll.h index adc0aabe9..62a2b56f5 100644 --- a/deps/hiredict/adapters/poll.h +++ b/deps/hiredict/include/hiredict/adapters/poll.h @@ -12,8 +12,8 @@ #ifndef HIREDICT_POLL_H #define HIREDICT_POLL_H -#include "../async.h" -#include "../sockcompat.h" +#include +#include #include // for memset #include diff --git a/deps/hiredict/adapters/qt.h b/deps/hiredict/include/hiredict/adapters/qt.h similarity index 99% rename from deps/hiredict/adapters/qt.h rename to deps/hiredict/include/hiredict/adapters/qt.h index de8d191bf..dce0d3b8f 100644 --- a/deps/hiredict/adapters/qt.h +++ b/deps/hiredict/include/hiredict/adapters/qt.h @@ -12,7 +12,7 @@ #ifndef __HIREDICT_QT_H__ #define __HIREDICT_QT_H__ #include -#include "../async.h" +#include static void RedictQtAddRead(void *); static void RedictQtDelRead(void *); diff --git a/deps/hiredict/adapters/redictmoduleapi.h b/deps/hiredict/include/hiredict/adapters/redictmoduleapi.h similarity index 98% rename from deps/hiredict/adapters/redictmoduleapi.h rename to deps/hiredict/include/hiredict/adapters/redictmoduleapi.h index 0238ba103..7d41208c6 100644 --- a/deps/hiredict/adapters/redictmoduleapi.h +++ b/deps/hiredict/include/hiredict/adapters/redictmoduleapi.h @@ -14,8 +14,8 @@ #include "redictmodule.h" -#include "../async.h" -#include "../hiredict.h" +#include +#include #include diff --git a/deps/hiredict/alloc.h b/deps/hiredict/include/hiredict/alloc.h similarity index 100% rename from deps/hiredict/alloc.h rename to deps/hiredict/include/hiredict/alloc.h diff --git a/deps/hiredict/async.h b/deps/hiredict/include/hiredict/async.h similarity index 99% rename from deps/hiredict/async.h rename to deps/hiredict/include/hiredict/async.h index 527efa6e2..0e95f3c64 100644 --- a/deps/hiredict/async.h +++ b/deps/hiredict/include/hiredict/async.h @@ -13,7 +13,7 @@ #ifndef __HIREDICT_ASYNC_H #define __HIREDICT_ASYNC_H -#include "hiredict.h" +#include #ifdef __cplusplus extern "C" { diff --git a/deps/hiredict/hiredict.h b/deps/hiredict/include/hiredict/hiredict.h similarity index 98% rename from deps/hiredict/hiredict.h rename to deps/hiredict/include/hiredict/hiredict.h index c186bb7be..6ef4ac335 100644 --- a/deps/hiredict/hiredict.h +++ b/deps/hiredict/include/hiredict/hiredict.h @@ -17,7 +17,7 @@ #ifndef __HIREDICT_H #define __HIREDICT_H -#include "read.h" +#include #include /* for va_list */ #ifndef _MSC_VER #include /* for struct timeval */ @@ -26,13 +26,13 @@ struct timeval; /* forward declaration */ typedef long long ssize_t; #endif #include /* uintXX_t, etc */ -#include "sds.h" /* for sds */ -#include "alloc.h" /* for allocation wrappers */ +#include /* for sds */ +#include /* for allocation wrappers */ #define HIREDICT_MAJOR 1 -#define HIREDICT_MINOR 2 -#define HIREDICT_PATCH 0 -#define HIREDICT_SONAME 1.2.1-dev +#define HIREDICT_MINOR 3 +#define HIREDICT_PATCH 1 +#define HIREDICT_SONAME 1.3.1 /* Connection type can be blocking or non-blocking and is set in the * least significant bit of the flags field in redictContext. */ diff --git a/deps/hiredict/hiredict_ssl.h b/deps/hiredict/include/hiredict/hiredict_ssl.h similarity index 100% rename from deps/hiredict/hiredict_ssl.h rename to deps/hiredict/include/hiredict/hiredict_ssl.h diff --git a/deps/hiredict/read.h b/deps/hiredict/include/hiredict/read.h similarity index 100% rename from deps/hiredict/read.h rename to deps/hiredict/include/hiredict/read.h diff --git a/deps/hiredict/sds.h b/deps/hiredict/include/hiredict/sds.h similarity index 100% rename from deps/hiredict/sds.h rename to deps/hiredict/include/hiredict/sds.h diff --git a/deps/hiredict/sockcompat.h b/deps/hiredict/include/hiredict/sockcompat.h similarity index 100% rename from deps/hiredict/sockcompat.h rename to deps/hiredict/include/hiredict/sockcompat.h diff --git a/deps/hiredict/net.h b/deps/hiredict/include/net.h similarity index 98% rename from deps/hiredict/net.h rename to deps/hiredict/include/net.h index be66e19dc..e2767b827 100644 --- a/deps/hiredict/net.h +++ b/deps/hiredict/include/net.h @@ -19,7 +19,7 @@ #ifndef __NET_H #define __NET_H -#include "hiredict.h" +#include void redictNetClose(redictContext *c); ssize_t redictNetRead(redictContext *c, char *buf, size_t bufcap); diff --git a/deps/hiredict/sdsalloc.h b/deps/hiredict/include/sdsalloc.h similarity index 96% rename from deps/hiredict/sdsalloc.h rename to deps/hiredict/include/sdsalloc.h index 37e213049..f594a2c6e 100644 --- a/deps/hiredict/sdsalloc.h +++ b/deps/hiredict/include/sdsalloc.h @@ -21,7 +21,7 @@ * the include of your alternate allocator if needed (not needed in order * to use the default libc allocator). */ -#include "alloc.h" +#include #define s_malloc hi_malloc #define s_realloc hi_realloc diff --git a/deps/hiredict/win32.h b/deps/hiredict/include/win32.h similarity index 100% rename from deps/hiredict/win32.h rename to deps/hiredict/include/win32.h diff --git a/deps/hiredict/alloc.c b/deps/hiredict/src/alloc.c similarity index 98% rename from deps/hiredict/alloc.c rename to deps/hiredict/src/alloc.c index 342192bf5..755a2070f 100644 --- a/deps/hiredict/alloc.c +++ b/deps/hiredict/src/alloc.c @@ -10,7 +10,7 @@ */ #include "fmacros.h" -#include "alloc.h" +#include #include #include diff --git a/deps/hiredict/async.c b/deps/hiredict/src/async.c similarity index 99% rename from deps/hiredict/async.c rename to deps/hiredict/src/async.c index 2363092c0..ffea870e0 100644 --- a/deps/hiredict/async.c +++ b/deps/hiredict/src/async.c @@ -10,9 +10,8 @@ * SPDX-License-Identifier: LGPL-3.0-or-later * */ - #include "fmacros.h" -#include "alloc.h" + #include #include #ifndef _MSC_VER @@ -21,12 +20,13 @@ #include #include #include -#include "async.h" + +#include +#include +#include #include "net.h" #include "dict.c" -#include "sds.h" #include "win32.h" - #include "async_private.h" #ifdef NDEBUG diff --git a/deps/hiredict/dict.c b/deps/hiredict/src/dict.c similarity index 99% rename from deps/hiredict/dict.c rename to deps/hiredict/src/dict.c index 322b35e33..948534499 100644 --- a/deps/hiredict/dict.c +++ b/deps/hiredict/src/dict.c @@ -16,7 +16,7 @@ */ #include "fmacros.h" -#include "alloc.h" +#include #include #include #include diff --git a/deps/hiredict/hiredict.c b/deps/hiredict/src/hiredict.c similarity index 99% rename from deps/hiredict/hiredict.c rename to deps/hiredict/src/hiredict.c index 080e38d41..612052e52 100644 --- a/deps/hiredict/hiredict.c +++ b/deps/hiredict/src/hiredict.c @@ -14,18 +14,18 @@ * SPDX-License-Identifier: LGPL-3.0-or-later * */ - #include "fmacros.h" + #include #include #include #include #include -#include "hiredict.h" +#include +#include +#include #include "net.h" -#include "sds.h" -#include "async.h" #include "win32.h" extern int redictContextUpdateConnectTimeout(redictContext *c, const struct timeval *timeout); diff --git a/deps/hiredict/net.c b/deps/hiredict/src/net.c similarity index 99% rename from deps/hiredict/net.c rename to deps/hiredict/src/net.c index 96cfa0e51..09daab70c 100644 --- a/deps/hiredict/net.c +++ b/deps/hiredict/src/net.c @@ -15,8 +15,8 @@ * SPDX-License-Identifier: LGPL-3.0-or-later * */ - #include "fmacros.h" + #include #include #include @@ -26,10 +26,11 @@ #include #include #include +#include +#include +#include #include "net.h" -#include "sds.h" -#include "sockcompat.h" #include "win32.h" /* Defined in hiredict.c */ diff --git a/deps/hiredict/read.c b/deps/hiredict/src/read.c similarity index 99% rename from deps/hiredict/read.c rename to deps/hiredict/src/read.c index 7b50ff2d0..f1530daf9 100644 --- a/deps/hiredict/read.c +++ b/deps/hiredict/src/read.c @@ -24,9 +24,9 @@ #include #include -#include "alloc.h" -#include "read.h" -#include "sds.h" +#include +#include +#include #include "win32.h" /* Initial size of our nested reply stack and how much we grow it when needd */ diff --git a/deps/hiredict/sds.c b/deps/hiredict/src/sds.c similarity index 99% rename from deps/hiredict/sds.c rename to deps/hiredict/src/sds.c index 0dbd9fb46..26694fa36 100644 --- a/deps/hiredict/sds.c +++ b/deps/hiredict/src/sds.c @@ -13,15 +13,16 @@ * SPDX-License-Identifier: LGPL-3.0-or-later * */ - #include "fmacros.h" + #include #include #include #include #include #include -#include "sds.h" + +#include #include "sdsalloc.h" static inline int sdsHdrSize(char type) { diff --git a/deps/hiredict/sockcompat.c b/deps/hiredict/src/sockcompat.c similarity index 99% rename from deps/hiredict/sockcompat.c rename to deps/hiredict/src/sockcompat.c index 6c82cceea..af75aacf5 100644 --- a/deps/hiredict/sockcompat.c +++ b/deps/hiredict/src/sockcompat.c @@ -10,7 +10,7 @@ */ #define REDICT_SOCKCOMPAT_IMPLEMENTATION -#include "sockcompat.h" +#include #ifdef _WIN32 static int _wsaErrorToErrno(int err) { diff --git a/deps/hiredict/ssl.c b/deps/hiredict/src/ssl.c similarity index 99% rename from deps/hiredict/ssl.c rename to deps/hiredict/src/ssl.c index 19c49a2bd..ad4964fcd 100644 --- a/deps/hiredict/ssl.c +++ b/deps/hiredict/src/ssl.c @@ -13,10 +13,6 @@ * */ -#include "hiredict.h" -#include "async.h" -#include "net.h" - #include #include #include @@ -38,9 +34,13 @@ #include #include -#include "win32.h" +#include +#include +#include +#include "net.h" #include "async_private.h" -#include "hiredict_ssl.h" +#include "win32.h" + #define OPENSSL_1_1_0 0x10100000L diff --git a/deps/hiredict/test.c b/deps/hiredict/src/test.c similarity index 99% rename from deps/hiredict/test.c rename to deps/hiredict/src/test.c index 48d53e91c..b9aeb004b 100644 --- a/deps/hiredict/test.c +++ b/deps/hiredict/src/test.c @@ -8,9 +8,8 @@ * SPDX-License-Identifier: LGPL-3.0-or-later * */ - #include "fmacros.h" -#include "sockcompat.h" + #include #include #include @@ -24,14 +23,15 @@ #include #include -#include "hiredict.h" -#include "async.h" -#include "adapters/poll.h" +#include +#include +#include +#include #ifdef HIREDICT_TEST_SSL -#include "hiredict_ssl.h" +#include #endif #ifdef HIREDICT_TEST_ASYNC -#include "adapters/libevent.h" +#include #include #endif #include "net.h" diff --git a/deps/hiredict/hiredict-config.cmake.in b/deps/hiredict/util/hiredict-config.cmake.in similarity index 100% rename from deps/hiredict/hiredict-config.cmake.in rename to deps/hiredict/util/hiredict-config.cmake.in diff --git a/deps/hiredict/hiredict.pc.in b/deps/hiredict/util/hiredict.pc.in similarity index 71% rename from deps/hiredict/hiredict.pc.in rename to deps/hiredict/util/hiredict.pc.in index e24d643b1..50bb3d1a8 100644 --- a/deps/hiredict/hiredict.pc.in +++ b/deps/hiredict/util/hiredict.pc.in @@ -3,10 +3,9 @@ install_libdir=@LIBDIR@ exec_prefix=${prefix} libdir=${exec_prefix}/${install_libdir} includedir=${prefix}/include -pkgincludedir=${includedir}/hiredict Name: hiredict Description: Minimalistic C client library for Redict. Version: @PROJECT_VERSION@ Libs: -L${libdir} -lhiredict -Cflags: -I${pkgincludedir} -I${includedir} -D_FILE_OFFSET_BITS=64 +Cflags: -I${includedir} -D_FILE_OFFSET_BITS=64 diff --git a/deps/hiredict/hiredict.targets b/deps/hiredict/util/hiredict.targets similarity index 100% rename from deps/hiredict/hiredict.targets rename to deps/hiredict/util/hiredict.targets diff --git a/deps/hiredict/hiredict_ssl-config.cmake.in b/deps/hiredict/util/hiredict_ssl-config.cmake.in similarity index 100% rename from deps/hiredict/hiredict_ssl-config.cmake.in rename to deps/hiredict/util/hiredict_ssl-config.cmake.in diff --git a/deps/hiredict/hiredict_ssl.pc.in b/deps/hiredict/util/hiredict_ssl.pc.in similarity index 88% rename from deps/hiredict/hiredict_ssl.pc.in rename to deps/hiredict/util/hiredict_ssl.pc.in index 111e2f6a4..99af3686c 100644 --- a/deps/hiredict/hiredict_ssl.pc.in +++ b/deps/hiredict/util/hiredict_ssl.pc.in @@ -3,7 +3,6 @@ install_libdir=@LIBDIR@ exec_prefix=${prefix} libdir=${exec_prefix}/${install_libdir} includedir=${prefix}/include -pkgincludedir=${includedir}/hiredict Name: hiredict_ssl Description: SSL Support for hiredict. diff --git a/deps/hiredict/shim/hiredis.pc.in b/deps/hiredict/util/hiredis.pc.in similarity index 100% rename from deps/hiredict/shim/hiredis.pc.in rename to deps/hiredict/util/hiredis.pc.in diff --git a/deps/hiredict/shim/hiredis_ssl.pc.in b/deps/hiredict/util/hiredis_ssl.pc.in similarity index 100% rename from deps/hiredict/shim/hiredis_ssl.pc.in rename to deps/hiredict/util/hiredis_ssl.pc.in diff --git a/deps/hiredict/util/lint.sh b/deps/hiredict/util/lint.sh new file mode 100755 index 000000000..7882de4a9 --- /dev/null +++ b/deps/hiredict/util/lint.sh @@ -0,0 +1,35 @@ +#!/bin/sh -e +# SPDX-FileCopyrightText: 2024 Hiredict Contributors +# SPDX-License-Identifier: LGPL-3.0-or-later + +signoff() { + if ! git log --format='%b' HEAD^.. | grep 'Signed-off-by' >/dev/null + then + echo "Missing sign-off!" >&2 + echo "Run 'git commit --amend -s' to fix" >&2 + echo "See CONTRIBUTING.md" >&2 + return 1 + fi +} + +licenses() { + if ! chronic sh -c "reuse lint 2>/dev/null" + then + return 1 + fi +} + +exitcode=0 +for step in signoff licenses +do + if ! $step + then + exitcode=1 + fi +done + +if [ $exitcode -eq 0 ] +then + echo "Everything looks good!" +fi +exit $exitcode diff --git a/deps/hiredict/test.sh b/deps/hiredict/util/test.sh similarity index 100% rename from deps/hiredict/test.sh rename to deps/hiredict/util/test.sh diff --git a/src/Makefile b/src/Makefile index 3289911ee..b68de15e5 100644 --- a/src/Makefile +++ b/src/Makefile @@ -283,7 +283,7 @@ ifeq ($(USE_SYSTEM_HIREDICT),yes) else DEPENDENCY_TARGETS += hiredict FINAL_LIBS+= ../deps/hiredict/libhiredict.a - FINAL_CFLAGS+= -I../deps/hiredict + FINAL_CFLAGS+= -I../deps/hiredict/include endif # LIBSSL & LIBCRYPTO diff --git a/src/cli_common.c b/src/cli_common.c index c8cf6030b..81ed4ea3e 100644 --- a/src/cli_common.c +++ b/src/cli_common.c @@ -13,15 +13,15 @@ #include #include #include -#include -#include +#include +#include #include #include #include #ifdef USE_OPENSSL #include #include -#include +#include #endif #define UNUSED(V) ((void) V) diff --git a/src/cli_common.h b/src/cli_common.h index 4a45f50c0..66ce4983c 100644 --- a/src/cli_common.h +++ b/src/cli_common.h @@ -7,8 +7,8 @@ #ifndef __CLICOMMON_H #define __CLICOMMON_H -#include -#include +#include +#include typedef struct cliSSLconfig { /* Requested SNI, or NULL */ diff --git a/src/redict-benchmark.c b/src/redict-benchmark.c index 9b4bafeca..16ee5b45b 100644 --- a/src/redict-benchmark.c +++ b/src/redict-benchmark.c @@ -19,13 +19,13 @@ #include #include -#include #include "ae.h" -#include +#include +#include #ifdef USE_OPENSSL #include #include -#include +#include #endif #include "adlist.h" #include "dict.h" diff --git a/src/redict-cli.c b/src/redict-cli.c index ee82e820b..6c01a4c04 100644 --- a/src/redict-cli.c +++ b/src/redict-cli.c @@ -23,13 +23,13 @@ #include #include -#include +#include #ifdef USE_OPENSSL #include #include -#include +#include #endif -#include +#include #include "dict.h" #include "adlist.h" #include "zmalloc.h" diff --git a/src/sentinel.c b/src/sentinel.c index 995fe0c3e..6f2888626 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -6,12 +6,12 @@ // SPDX-License-Identifier: LGPL-3.0-only #include "server.h" -#include "hiredict.h" +#include +#include #if USE_OPENSSL == 1 /* BUILD_YES */ -#include "openssl/ssl.h" -#include "hiredict_ssl.h" +#include +#include #endif -#include "async.h" #include #include