Move strsep.c to crypto/compat/ and add ocspcheck build to CMake

This commit is contained in:
kinichiro 2017-01-25 19:37:29 +09:00
parent 93754dc5cf
commit 91a8bd7914
7 changed files with 14 additions and 11 deletions

View File

@ -1,2 +1,3 @@
add_subdirectory(ocspcheck)
add_subdirectory(openssl)
add_subdirectory(nc)

View File

@ -714,6 +714,11 @@ if(NOT HAVE_STRNDUP)
endif()
endif()
if(NOT HAVE_STRSEP)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/strsep.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} strsep)
endif()
if(NOT HAVE_TIMEGM)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/timegm.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} timegm)

View File

@ -73,6 +73,10 @@ libcompat_la_SOURCES += compat/strnlen.c
endif
endif
if !HAVE_STRSEP
libcompat_la_SOURCES += compat/strsep.c
endif
if !HAVE_ASPRINTF
libcompat_la_SOURCES += compat/bsd-asprintf.c
endif

View File

@ -188,6 +188,9 @@ fi
if test "x$ac_cv_func_strnlen" = "xno" ; then
echo strnlen >> $crypto_p_sym
fi
if test "x$ac_cv_func_strsep" = "xno" ; then
echo strsep >> $crypto_p_sym
fi
if test "x$ac_cv_func_timegm" = "xno" ; then
echo timegm >> $crypto_p_sym
fi

View File

@ -19,10 +19,6 @@ set(
)
if(NOT HAVE_STRSEP)
set(TLS_SRC ${TLS_SRC} strsep.c)
endif()
if(NOT "${OPENSSLDIR}" STREQUAL "")
add_definitions(-D_PATH_SSL_CA_FILE=\"${OPENSSLDIR}/cert.pem\")
else()

View File

@ -29,7 +29,3 @@ libtls_la_SOURCES += tls_peer.c
libtls_la_SOURCES += tls_util.c
libtls_la_SOURCES += tls_verify.c
noinst_HEADERS = tls_internal.h
if !HAVE_STRSEP
libtls_la_SOURCES += strsep.c
endif

View File

@ -83,6 +83,7 @@ for i in crypto/compat libtls-standalone/compat; do
$libc_src/string/strlcat.c \
$libc_src/string/strndup.c \
$libc_src/string/strnlen.c \
$libc_src/string/strsep.c \
$libc_src/string/timingsafe_bcmp.c \
$libc_src/string/timingsafe_memcmp.c \
$libcrypto_src/arc4random/getentropy_*.c \
@ -205,9 +206,6 @@ done
# add the libtls symbol export list
grep '^[[:alpha:]]' < $libtls_src/Symbols.list > tls/tls.sym
$CP_LIBC $libc_src/string/strsep.c tls
$CP_LIBC $libc_src/string/strsep.c libtls-standalone/compat
mkdir -p libtls-standalone/m4
$CP m4/check*.m4 \
m4/disable*.m4 \