mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-21 23:58:51 -05:00
deps/hiredict: update to restructured version
this allows for redict to use the same include paths for both system and vendored hiredict, allowing use of system hiredict without patches. Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
This commit is contained in:
parent
d2e5e96559
commit
52c3e46637
@ -111,18 +111,18 @@ Files: deps/hiredict/.gitignore deps/hiredict/.travis.yml deps/hiredict/appveyor
|
||||
Copyright: Salvatore Sanfilippo <antirez at gmail dot com>
|
||||
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 <antirez at gmail dot com>
|
||||
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 <antirez at gmail dot com>
|
||||
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 <antirez at gmail dot com>
|
||||
License: BSD-3-Clause
|
||||
|
||||
Files: deps/hiredict/hiredict.targets
|
||||
Files: deps/hiredict/util/hiredict.targets
|
||||
Copyright: Salvatore Sanfilippo <antirez at gmail dot com>
|
||||
License: BSD-3-Clause
|
||||
|
3
deps/hiredict/.gitignore
vendored
3
deps/hiredict/.gitignore
vendored
@ -1,6 +1,7 @@
|
||||
/hiredict-test
|
||||
/examples/hiredict-example*
|
||||
/*.o
|
||||
src/*.o
|
||||
src/*.d
|
||||
/*.so
|
||||
/*.dylib
|
||||
/*.a
|
||||
|
8
deps/hiredict/.reuse/dep5
vendored
8
deps/hiredict/.reuse/dep5
vendored
@ -7,18 +7,18 @@ Files: .gitignore .travis.yml appveyor.yml
|
||||
Copyright: Salvatore Sanfilippo <antirez at gmail dot com>
|
||||
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 <antirez at gmail dot com>
|
||||
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 <antirez at gmail dot com>
|
||||
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 <antirez at gmail dot com>
|
||||
License: BSD-3-Clause
|
||||
|
||||
Files: hiredict.targets
|
||||
Files: util/hiredict.targets
|
||||
Copyright: Salvatore Sanfilippo <antirez at gmail dot com>
|
||||
License: BSD-3-Clause
|
||||
|
49
deps/hiredict/CMakeLists.txt
vendored
49
deps/hiredict/CMakeLists.txt
vendored
@ -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 $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||||
|
||||
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
|
||||
|
77
deps/hiredict/Makefile
vendored
77
deps/hiredict/Makefile
vendored
@ -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)
|
||||
|
25
deps/hiredict/appveyor.yml
vendored
25
deps/hiredict/appveyor.yml
vendored
@ -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</dev/null; mkdir build && cd build && cmake .. -G \"Unix Makefiles\" && make VERBOSE=1"'
|
6
deps/hiredict/examples/example-ae.c
vendored
6
deps/hiredict/examples/example-ae.c
vendored
@ -9,9 +9,9 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <async.h>
|
||||
#include <adapters/ae.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/adapters/ae.h>
|
||||
|
||||
/* Put event loop in the global scope, so it can be explicitly stopped */
|
||||
static aeEventLoop *loop;
|
||||
|
6
deps/hiredict/examples/example-glib.c
vendored
6
deps/hiredict/examples/example-glib.c
vendored
@ -6,9 +6,9 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <async.h>
|
||||
#include <adapters/glib.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/adapters/glib.h>
|
||||
|
||||
static GMainLoop *mainloop;
|
||||
|
||||
|
6
deps/hiredict/examples/example-ivykis.c
vendored
6
deps/hiredict/examples/example-ivykis.c
vendored
@ -9,9 +9,9 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <async.h>
|
||||
#include <adapters/ivykis.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/adapters/ivykis.h>
|
||||
|
||||
void getCallback(redictAsyncContext *c, void *r, void *privdata) {
|
||||
redictReply *reply = r;
|
||||
|
6
deps/hiredict/examples/example-libev.c
vendored
6
deps/hiredict/examples/example-libev.c
vendored
@ -9,9 +9,9 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <async.h>
|
||||
#include <adapters/libev.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/adapters/libev.h>
|
||||
|
||||
void getCallback(redictAsyncContext *c, void *r, void *privdata) {
|
||||
redictReply *reply = r;
|
||||
|
@ -9,10 +9,10 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <hiredict_ssl.h>
|
||||
#include <async.h>
|
||||
#include <adapters/libevent.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/hiredict_ssl.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/adapters/libevent.h>
|
||||
|
||||
void getCallback(redictAsyncContext *c, void *r, void *privdata) {
|
||||
redictReply *reply = r;
|
||||
|
6
deps/hiredict/examples/example-libevent.c
vendored
6
deps/hiredict/examples/example-libevent.c
vendored
@ -9,9 +9,9 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <async.h>
|
||||
#include <adapters/libevent.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/adapters/libevent.h>
|
||||
|
||||
void getCallback(redictAsyncContext *c, void *r, void *privdata) {
|
||||
redictReply *reply = r;
|
||||
|
6
deps/hiredict/examples/example-libhv.c
vendored
6
deps/hiredict/examples/example-libhv.c
vendored
@ -9,9 +9,9 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <async.h>
|
||||
#include <adapters/libhv.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/adapters/libhv.h>
|
||||
|
||||
void getCallback(redictAsyncContext *c, void *r, void *privdata) {
|
||||
redictReply *reply = r;
|
||||
|
6
deps/hiredict/examples/example-libsdevent.c
vendored
6
deps/hiredict/examples/example-libsdevent.c
vendored
@ -9,9 +9,9 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <async.h>
|
||||
#include <adapters/libsdevent.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/adapters/libsdevent.h>
|
||||
|
||||
void debugCallback(redictAsyncContext *c, void *r, void *privdata) {
|
||||
(void)privdata;
|
||||
|
6
deps/hiredict/examples/example-libuv.c
vendored
6
deps/hiredict/examples/example-libuv.c
vendored
@ -9,9 +9,9 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <async.h>
|
||||
#include <adapters/libuv.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/adapters/libuv.h>
|
||||
|
||||
void debugCallback(redictAsyncContext *c, void *r, void *privdata) {
|
||||
(void)privdata; //unused
|
||||
|
6
deps/hiredict/examples/example-macosx.c
vendored
6
deps/hiredict/examples/example-macosx.c
vendored
@ -8,9 +8,9 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <async.h>
|
||||
#include <adapters/macosx.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/adapters/macosx.h>
|
||||
|
||||
void getCallback(redictAsyncContext *c, void *r, void *privdata) {
|
||||
redictReply *reply = r;
|
||||
|
4
deps/hiredict/examples/example-poll.c
vendored
4
deps/hiredict/examples/example-poll.c
vendored
@ -10,8 +10,8 @@
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <async.h>
|
||||
#include <adapters/poll.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/adapters/poll.h>
|
||||
|
||||
/* Put in the global scope, so that loop can be explicitly stopped */
|
||||
static int exit_loop = 0;
|
||||
|
2
deps/hiredict/examples/example-push.c
vendored
2
deps/hiredict/examples/example-push.c
vendored
@ -9,7 +9,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <hiredict.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
|
||||
#define KEY_COUNT 5
|
||||
|
||||
|
2
deps/hiredict/examples/example-qt.h
vendored
2
deps/hiredict/examples/example-qt.h
vendored
@ -7,7 +7,7 @@
|
||||
#ifndef __HIREDICT_EXAMPLE_QT_H
|
||||
#define __HIREDICT_EXAMPLE_QT_H
|
||||
|
||||
#include <adapters/qt.h>
|
||||
#include <hiredict/adapters/qt.h>
|
||||
|
||||
class ExampleQt : public QObject {
|
||||
|
||||
|
@ -9,9 +9,9 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <async.h>
|
||||
#include <adapters/redictmoduleapi.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/adapters/redictmoduleapi.h>
|
||||
|
||||
void debugCallback(redictAsyncContext *c, void *r, void *privdata) {
|
||||
(void)privdata; //unused
|
||||
|
4
deps/hiredict/examples/example-ssl.c
vendored
4
deps/hiredict/examples/example-ssl.c
vendored
@ -8,8 +8,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <hiredict_ssl.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/hiredict_ssl.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <winsock2.h> /* For struct timeval */
|
||||
|
2
deps/hiredict/examples/example.c
vendored
2
deps/hiredict/examples/example.c
vendored
@ -7,7 +7,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <hiredict.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <winsock2.h> /* For struct timeval */
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "hiredict.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
char *new_str, *cmd;
|
||||
|
@ -13,8 +13,8 @@
|
||||
#define __HIREDICT_AE_H__
|
||||
#include <sys/types.h>
|
||||
#include <ae.h>
|
||||
#include "../hiredict.h"
|
||||
#include "../async.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
|
||||
typedef struct redictAeEvents {
|
||||
redictAsyncContext *context;
|
@ -14,8 +14,8 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include "../hiredict.h"
|
||||
#include "../async.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
|
||||
typedef struct
|
||||
{
|
@ -12,8 +12,8 @@
|
||||
#ifndef __HIREDICT_IVYKIS_H__
|
||||
#define __HIREDICT_IVYKIS_H__
|
||||
#include <iv.h>
|
||||
#include "../hiredict.h"
|
||||
#include "../async.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
|
||||
typedef struct redictIvykisEvents {
|
||||
redictAsyncContext *context;
|
@ -16,8 +16,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <ev.h>
|
||||
#include "../hiredict.h"
|
||||
#include "../async.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
|
||||
typedef struct redictLibevEvents {
|
||||
redictAsyncContext *context;
|
@ -12,8 +12,8 @@
|
||||
#ifndef __HIREDICT_LIBEVENT_H__
|
||||
#define __HIREDICT_LIBEVENT_H__
|
||||
#include <event2/event.h>
|
||||
#include "../hiredict.h"
|
||||
#include "../async.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
|
||||
#define REDICT_LIBEVENT_DELETED 0x01
|
||||
#define REDICT_LIBEVENT_ENTERED 0x02
|
@ -13,8 +13,8 @@
|
||||
#define __HIREDICT_LIBHV_H__
|
||||
|
||||
#include <hv/hloop.h>
|
||||
#include "../hiredict.h"
|
||||
#include "../async.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
|
||||
typedef struct redictLibhvEvents {
|
||||
hio_t *io;
|
@ -12,8 +12,8 @@
|
||||
#ifndef HIREDICT_LIBSDEVENT_H
|
||||
#define HIREDICT_LIBSDEVENT_H
|
||||
#include <systemd/sd-event.h>
|
||||
#include "../hiredict.h"
|
||||
#include "../async.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
|
||||
#define REDICT_LIBSDEVENT_DELETED 0x01
|
||||
#define REDICT_LIBSDEVENT_ENTERED 0x02
|
@ -13,8 +13,8 @@
|
||||
#define __HIREDICT_LIBUV_H__
|
||||
#include <stdlib.h>
|
||||
#include <uv.h>
|
||||
#include "../hiredict.h"
|
||||
#include "../async.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef struct redictLibuvEvents {
|
@ -14,8 +14,8 @@
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
#include "../hiredict.h"
|
||||
#include "../async.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
|
||||
typedef struct {
|
||||
redictAsyncContext *context;
|
@ -12,8 +12,8 @@
|
||||
#ifndef HIREDICT_POLL_H
|
||||
#define HIREDICT_POLL_H
|
||||
|
||||
#include "../async.h"
|
||||
#include "../sockcompat.h"
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/sockcompat.h>
|
||||
#include <string.h> // for memset
|
||||
#include <errno.h>
|
||||
|
@ -12,7 +12,7 @@
|
||||
#ifndef __HIREDICT_QT_H__
|
||||
#define __HIREDICT_QT_H__
|
||||
#include <QSocketNotifier>
|
||||
#include "../async.h"
|
||||
#include <hiredict/async.h>
|
||||
|
||||
static void RedictQtAddRead(void *);
|
||||
static void RedictQtDelRead(void *);
|
@ -14,8 +14,8 @@
|
||||
|
||||
#include "redictmodule.h"
|
||||
|
||||
#include "../async.h"
|
||||
#include "../hiredict.h"
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#ifndef __HIREDICT_ASYNC_H
|
||||
#define __HIREDICT_ASYNC_H
|
||||
#include "hiredict.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
@ -17,7 +17,7 @@
|
||||
|
||||
#ifndef __HIREDICT_H
|
||||
#define __HIREDICT_H
|
||||
#include "read.h"
|
||||
#include <hiredict/read.h>
|
||||
#include <stdarg.h> /* for va_list */
|
||||
#ifndef _MSC_VER
|
||||
#include <sys/time.h> /* for struct timeval */
|
||||
@ -26,13 +26,13 @@ struct timeval; /* forward declaration */
|
||||
typedef long long ssize_t;
|
||||
#endif
|
||||
#include <stdint.h> /* uintXX_t, etc */
|
||||
#include "sds.h" /* for sds */
|
||||
#include "alloc.h" /* for allocation wrappers */
|
||||
#include <hiredict/sds.h> /* for sds */
|
||||
#include <hiredict/alloc.h> /* 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. */
|
@ -19,7 +19,7 @@
|
||||
#ifndef __NET_H
|
||||
#define __NET_H
|
||||
|
||||
#include "hiredict.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
|
||||
void redictNetClose(redictContext *c);
|
||||
ssize_t redictNetRead(redictContext *c, char *buf, size_t bufcap);
|
@ -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 <hiredict/alloc.h>
|
||||
|
||||
#define s_malloc hi_malloc
|
||||
#define s_realloc hi_realloc
|
@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
#include "fmacros.h"
|
||||
#include "alloc.h"
|
||||
#include <hiredict/alloc.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -10,9 +10,8 @@
|
||||
* SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
|
||||
#include "fmacros.h"
|
||||
#include "alloc.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef _MSC_VER
|
||||
@ -21,12 +20,13 @@
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include "async.h"
|
||||
|
||||
#include <hiredict/alloc.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/sds.h>
|
||||
#include "net.h"
|
||||
#include "dict.c"
|
||||
#include "sds.h"
|
||||
#include "win32.h"
|
||||
|
||||
#include "async_private.h"
|
||||
|
||||
#ifdef NDEBUG
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "fmacros.h"
|
||||
#include "alloc.h"
|
||||
#include <hiredict/alloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
@ -14,18 +14,18 @@
|
||||
* SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
|
||||
#include "fmacros.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "hiredict.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/sds.h>
|
||||
#include <hiredict/async.h>
|
||||
#include "net.h"
|
||||
#include "sds.h"
|
||||
#include "async.h"
|
||||
#include "win32.h"
|
||||
|
||||
extern int redictContextUpdateConnectTimeout(redictContext *c, const struct timeval *timeout);
|
@ -15,8 +15,8 @@
|
||||
* SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
|
||||
#include "fmacros.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
@ -26,10 +26,11 @@
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#include <hiredict/sds.h>
|
||||
#include <hiredict/sockcompat.h>
|
||||
#include "net.h"
|
||||
#include "sds.h"
|
||||
#include "sockcompat.h"
|
||||
#include "win32.h"
|
||||
|
||||
/* Defined in hiredict.c */
|
@ -24,9 +24,9 @@
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "alloc.h"
|
||||
#include "read.h"
|
||||
#include "sds.h"
|
||||
#include <hiredict/alloc.h>
|
||||
#include <hiredict/read.h>
|
||||
#include <hiredict/sds.h>
|
||||
#include "win32.h"
|
||||
|
||||
/* Initial size of our nested reply stack and how much we grow it when needd */
|
@ -13,15 +13,16 @@
|
||||
* SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
|
||||
#include "fmacros.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include "sds.h"
|
||||
|
||||
#include <hiredict/sds.h>
|
||||
#include "sdsalloc.h"
|
||||
|
||||
static inline int sdsHdrSize(char type) {
|
@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
#define REDICT_SOCKCOMPAT_IMPLEMENTATION
|
||||
#include "sockcompat.h"
|
||||
#include <hiredict/sockcompat.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
static int _wsaErrorToErrno(int err) {
|
12
deps/hiredict/ssl.c → deps/hiredict/src/ssl.c
vendored
12
deps/hiredict/ssl.c → deps/hiredict/src/ssl.c
vendored
@ -13,10 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hiredict.h"
|
||||
#include "async.h"
|
||||
#include "net.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
@ -38,9 +34,13 @@
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
#include "win32.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/hiredict_ssl.h>
|
||||
#include <hiredict/async.h>
|
||||
#include "net.h"
|
||||
#include "async_private.h"
|
||||
#include "hiredict_ssl.h"
|
||||
#include "win32.h"
|
||||
|
||||
|
||||
#define OPENSSL_1_1_0 0x10100000L
|
||||
|
14
deps/hiredict/test.c → deps/hiredict/src/test.c
vendored
14
deps/hiredict/test.c → deps/hiredict/src/test.c
vendored
@ -8,9 +8,8 @@
|
||||
* SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
|
||||
#include "fmacros.h"
|
||||
#include "sockcompat.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -24,14 +23,15 @@
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "hiredict.h"
|
||||
#include "async.h"
|
||||
#include "adapters/poll.h"
|
||||
#include <hiredict/sockcompat.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
#include <hiredict/adapters/poll.h>
|
||||
#ifdef HIREDICT_TEST_SSL
|
||||
#include "hiredict_ssl.h"
|
||||
#include <hiredict/hiredict_ssl.h>
|
||||
#endif
|
||||
#ifdef HIREDICT_TEST_ASYNC
|
||||
#include "adapters/libevent.h"
|
||||
#include <hiredict/adapters/libevent.h>
|
||||
#include <event2/event.h>
|
||||
#endif
|
||||
#include "net.h"
|
@ -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
|
@ -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.
|
35
deps/hiredict/util/lint.sh
vendored
Executable file
35
deps/hiredict/util/lint.sh
vendored
Executable file
@ -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
|
@ -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
|
||||
|
@ -13,15 +13,15 @@
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <hiredict.h>
|
||||
#include <sds.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/sds.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#ifdef USE_OPENSSL
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/err.h>
|
||||
#include <hiredict_ssl.h>
|
||||
#include <hiredict/hiredict_ssl.h>
|
||||
#endif
|
||||
|
||||
#define UNUSED(V) ((void) V)
|
||||
|
@ -7,8 +7,8 @@
|
||||
#ifndef __CLICOMMON_H
|
||||
#define __CLICOMMON_H
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <sds.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/sds.h>
|
||||
|
||||
typedef struct cliSSLconfig {
|
||||
/* Requested SNI, or NULL */
|
||||
|
@ -19,13 +19,13 @@
|
||||
#include <math.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include <sds.h>
|
||||
#include "ae.h"
|
||||
#include <hiredict.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/sds.h>
|
||||
#ifdef USE_OPENSSL
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/err.h>
|
||||
#include <hiredict_ssl.h>
|
||||
#include <hiredict/hiredict_ssl.h>
|
||||
#endif
|
||||
#include "adlist.h"
|
||||
#include "dict.h"
|
||||
|
@ -23,13 +23,13 @@
|
||||
#include <math.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include <hiredict.h>
|
||||
#include <hiredict/hiredict.h>
|
||||
#ifdef USE_OPENSSL
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/err.h>
|
||||
#include <hiredict_ssl.h>
|
||||
#include <hiredict/hiredict_ssl.h>
|
||||
#endif
|
||||
#include <sds.h>
|
||||
#include <hiredict/sds.h>
|
||||
#include "dict.h"
|
||||
#include "adlist.h"
|
||||
#include "zmalloc.h"
|
||||
|
@ -6,12 +6,12 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
|
||||
#include "server.h"
|
||||
#include "hiredict.h"
|
||||
#include <hiredict/hiredict.h>
|
||||
#include <hiredict/async.h>
|
||||
#if USE_OPENSSL == 1 /* BUILD_YES */
|
||||
#include "openssl/ssl.h"
|
||||
#include "hiredict_ssl.h"
|
||||
#include <openssl/ssl.h>
|
||||
#include <hiredict/hiredict_ssl.h>
|
||||
#endif
|
||||
#include "async.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <arpa/inet.h>
|
||||
|
Loading…
Reference in New Issue
Block a user