bump base requirement to Windows Vista, use builtin inet_ntop/pton
This commit is contained in:
parent
b7397ab184
commit
3fb9e63b90
2
.gitignore
vendored
2
.gitignore
vendored
@ -124,7 +124,6 @@ include/openssl/*.h
|
|||||||
/apps/ocspcheck/*.h
|
/apps/ocspcheck/*.h
|
||||||
/apps/ocspcheck/*.c
|
/apps/ocspcheck/*.c
|
||||||
/apps/ocspcheck/ocspcheck*
|
/apps/ocspcheck/ocspcheck*
|
||||||
/apps/ocspcheck/compat/inet_ntop.c
|
|
||||||
/apps/ocspcheck/compat/memmem.c
|
/apps/ocspcheck/compat/memmem.c
|
||||||
|
|
||||||
/apps/nc/*.h
|
/apps/nc/*.h
|
||||||
@ -150,7 +149,6 @@ include/openssl/*.h
|
|||||||
!/crypto/compat/getpagesize.c
|
!/crypto/compat/getpagesize.c
|
||||||
!/crypto/compat/posix_win.c
|
!/crypto/compat/posix_win.c
|
||||||
!/crypto/compat/bsd_asprintf.c
|
!/crypto/compat/bsd_asprintf.c
|
||||||
!/crypto/compat/inet_pton.c
|
|
||||||
!/crypto/compat/timegm.c
|
!/crypto/compat/timegm.c
|
||||||
!/crypto/compat/ui_openssl_win.c
|
!/crypto/compat/ui_openssl_win.c
|
||||||
!/crypto/CMakeLists.txt
|
!/crypto/CMakeLists.txt
|
||||||
|
@ -98,7 +98,7 @@ if(WIN32)
|
|||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS)
|
add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS)
|
||||||
add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS)
|
add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS)
|
||||||
add_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0501)
|
add_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600)
|
||||||
add_definitions(-DCPPFLAGS -DOPENSSL_NO_SPEED -DNO_SYSLOG -DNO_CRYPT)
|
add_definitions(-DCPPFLAGS -DOPENSSL_NO_SPEED -DNO_SYSLOG -DNO_CRYPT)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -154,11 +154,6 @@ if(HAVE_ASPRINTF)
|
|||||||
add_definitions(-DHAVE_ASPRINTF)
|
add_definitions(-DHAVE_ASPRINTF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
check_function_exists(inet_pton HAVE_INET_PTON)
|
|
||||||
if(HAVE_INET_PTON)
|
|
||||||
add_definitions(-DHAVE_INET_PTON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
check_function_exists(reallocarray HAVE_REALLOCARRAY)
|
check_function_exists(reallocarray HAVE_REALLOCARRAY)
|
||||||
if(HAVE_REALLOCARRAY)
|
if(HAVE_REALLOCARRAY)
|
||||||
add_definitions(-DHAVE_REALLOCARRAY)
|
add_definitions(-DHAVE_REALLOCARRAY)
|
||||||
|
@ -13,13 +13,6 @@ set(
|
|||||||
ocspcheck.c
|
ocspcheck.c
|
||||||
)
|
)
|
||||||
|
|
||||||
check_function_exists(inet_ntop HAVE_INET_NTOP)
|
|
||||||
if(HAVE_INET_NTOP)
|
|
||||||
add_definitions(-DHAVE_INET_NTOP)
|
|
||||||
else()
|
|
||||||
set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/inet_ntop.c)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
check_function_exists(memmem HAVE_MEMMEM)
|
check_function_exists(memmem HAVE_MEMMEM)
|
||||||
if(HAVE_MEMMEM)
|
if(HAVE_MEMMEM)
|
||||||
add_definitions(-DHAVE_MEMMEM)
|
add_definitions(-DHAVE_MEMMEM)
|
||||||
|
@ -14,10 +14,6 @@ ocspcheck_SOURCES = http.c
|
|||||||
ocspcheck_SOURCES += ocspcheck.c
|
ocspcheck_SOURCES += ocspcheck.c
|
||||||
noinst_HEADERS = http.h
|
noinst_HEADERS = http.h
|
||||||
|
|
||||||
if !HAVE_INET_NTOP
|
|
||||||
ocspcheck_SOURCES += compat/inet_ntop.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !HAVE_MEMMEM
|
if !HAVE_MEMMEM
|
||||||
ocspcheck_SOURCES += compat/memmem.c
|
ocspcheck_SOURCES += compat/memmem.c
|
||||||
endif
|
endif
|
||||||
|
@ -687,11 +687,6 @@ if(NOT HAVE_GETPAGESIZE)
|
|||||||
set(CRYPTO_SRC ${CRYPTO_SRC} compat/getpagesize.c)
|
set(CRYPTO_SRC ${CRYPTO_SRC} compat/getpagesize.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT HAVE_INET_PTON)
|
|
||||||
set(CRYPTO_SRC ${CRYPTO_SRC} compat/inet_pton.c)
|
|
||||||
set(EXTRA_EXPORT ${EXTRA_EXPORT} inet_pton)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT HAVE_REALLOCARRAY)
|
if(NOT HAVE_REALLOCARRAY)
|
||||||
set(CRYPTO_SRC ${CRYPTO_SRC} compat/reallocarray.c)
|
set(CRYPTO_SRC ${CRYPTO_SRC} compat/reallocarray.c)
|
||||||
set(EXTRA_EXPORT ${EXTRA_EXPORT} reallocarray)
|
set(EXTRA_EXPORT ${EXTRA_EXPORT} reallocarray)
|
||||||
|
@ -40,9 +40,6 @@ endif
|
|||||||
if !HAVE_FREEZERO
|
if !HAVE_FREEZERO
|
||||||
-echo freezero >> crypto_portable.sym
|
-echo freezero >> crypto_portable.sym
|
||||||
endif
|
endif
|
||||||
if !HAVE_INET_PTON
|
|
||||||
-echo inet_pton >> crypto_portable.sym
|
|
||||||
endif
|
|
||||||
if !HAVE_REALLOCARRAY
|
if !HAVE_REALLOCARRAY
|
||||||
-echo reallocarray >> crypto_portable.sym
|
-echo reallocarray >> crypto_portable.sym
|
||||||
endif
|
endif
|
||||||
@ -166,10 +163,6 @@ if !HAVE_GETPAGESIZE
|
|||||||
libcompat_la_SOURCES += compat/getpagesize.c
|
libcompat_la_SOURCES += compat/getpagesize.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !HAVE_INET_PTON
|
|
||||||
libcompat_la_SOURCES += compat/inet_pton.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !HAVE_TIMEGM
|
if !HAVE_TIMEGM
|
||||||
libcompat_la_SOURCES += compat/timegm.c
|
libcompat_la_SOURCES += compat/timegm.c
|
||||||
endif
|
endif
|
||||||
|
@ -21,7 +21,6 @@ noinst_HEADERS += compat/time.h
|
|||||||
noinst_HEADERS += compat/unistd.h
|
noinst_HEADERS += compat/unistd.h
|
||||||
noinst_HEADERS += compat/win32netcompat.h
|
noinst_HEADERS += compat/win32netcompat.h
|
||||||
|
|
||||||
noinst_HEADERS += compat/arpa/inet.h
|
|
||||||
noinst_HEADERS += compat/arpa/nameser.h
|
noinst_HEADERS += compat/arpa/nameser.h
|
||||||
|
|
||||||
noinst_HEADERS += compat/machine/endian.h
|
noinst_HEADERS += compat/machine/endian.h
|
||||||
|
@ -13,11 +13,3 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_INET_NTOP
|
|
||||||
const char * inet_ntop(int af, const void *src, char *dst, socklen_t size);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_INET_PTON
|
|
||||||
int inet_pton(int af, const char * src, void * dst);
|
|
||||||
#endif
|
|
||||||
|
@ -2,7 +2,7 @@ AC_DEFUN([CHECK_LIBC_COMPAT], [
|
|||||||
# Check for libc headers
|
# Check for libc headers
|
||||||
AC_CHECK_HEADERS([err.h readpassphrase.h])
|
AC_CHECK_HEADERS([err.h readpassphrase.h])
|
||||||
# Check for general libc functions
|
# Check for general libc functions
|
||||||
AC_CHECK_FUNCS([asprintf freezero inet_ntop inet_pton memmem])
|
AC_CHECK_FUNCS([asprintf freezero memmem])
|
||||||
AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray])
|
AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray])
|
||||||
AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum])
|
AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum])
|
||||||
AC_CHECK_FUNCS([timegm _mkgmtime])
|
AC_CHECK_FUNCS([timegm _mkgmtime])
|
||||||
@ -22,8 +22,6 @@ AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [
|
|||||||
AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes])
|
AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes])
|
||||||
AM_CONDITIONAL([HAVE_FREEZERO], [test "x$ac_cv_func_freezero" = xyes])
|
AM_CONDITIONAL([HAVE_FREEZERO], [test "x$ac_cv_func_freezero" = xyes])
|
||||||
AM_CONDITIONAL([HAVE_GETPAGESIZE], [test "x$ac_cv_func_getpagesize" = xyes])
|
AM_CONDITIONAL([HAVE_GETPAGESIZE], [test "x$ac_cv_func_getpagesize" = xyes])
|
||||||
AM_CONDITIONAL([HAVE_INET_NTOP], [test "x$ac_cv_func_inet_ntop" = xyes])
|
|
||||||
AM_CONDITIONAL([HAVE_INET_PTON], [test "x$ac_cv_func_inet_pton" = xyes])
|
|
||||||
AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes])
|
AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes])
|
||||||
AM_CONDITIONAL([HAVE_READPASSPHRASE], [test "x$ac_cv_func_readpassphrase" = xyes])
|
AM_CONDITIONAL([HAVE_READPASSPHRASE], [test "x$ac_cv_func_readpassphrase" = xyes])
|
||||||
AM_CONDITIONAL([HAVE_REALLOCARRAY], [test "x$ac_cv_func_reallocarray" = xyes])
|
AM_CONDITIONAL([HAVE_REALLOCARRAY], [test "x$ac_cv_func_reallocarray" = xyes])
|
||||||
|
@ -106,7 +106,7 @@ char buf[1]; getentropy(buf, 1);
|
|||||||
BUILD_NC=no
|
BUILD_NC=no
|
||||||
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_POSIX -D_POSIX_SOURCE -D__USE_MINGW_ANSI_STDIO"
|
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_POSIX -D_POSIX_SOURCE -D__USE_MINGW_ANSI_STDIO"
|
||||||
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS"
|
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS"
|
||||||
CPPFLAGS="$CPPFLAGS -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0501"
|
CPPFLAGS="$CPPFLAGS -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600"
|
||||||
CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_SPEED"
|
CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_SPEED"
|
||||||
AC_SUBST([PLATFORM_LDADD], ['-lws2_32'])
|
AC_SUBST([PLATFORM_LDADD], ['-lws2_32'])
|
||||||
;;
|
;;
|
||||||
|
@ -82,7 +82,6 @@ for i in crypto/compat libtls-standalone/compat; do
|
|||||||
for j in $libc_src/crypt/arc4random.c \
|
for j in $libc_src/crypt/arc4random.c \
|
||||||
$libc_src/crypt/arc4random_uniform.c \
|
$libc_src/crypt/arc4random_uniform.c \
|
||||||
$libc_src/crypt/chacha_private.h \
|
$libc_src/crypt/chacha_private.h \
|
||||||
$libc_src/net/inet_pton.c \
|
|
||||||
$libc_src/stdlib/reallocarray.c \
|
$libc_src/stdlib/reallocarray.c \
|
||||||
$libc_src/stdlib/recallocarray.c \
|
$libc_src/stdlib/recallocarray.c \
|
||||||
$libc_src/string/explicit_bzero.c \
|
$libc_src/string/explicit_bzero.c \
|
||||||
@ -237,7 +236,6 @@ done
|
|||||||
echo "copying ocspcheck(1) source"
|
echo "copying ocspcheck(1) source"
|
||||||
$CP $sbin_src/ocspcheck/ocspcheck.8 apps/ocspcheck
|
$CP $sbin_src/ocspcheck/ocspcheck.8 apps/ocspcheck
|
||||||
rm -f apps/ocspcheck/*.c apps/ocspcheck/*.h
|
rm -f apps/ocspcheck/*.c apps/ocspcheck/*.h
|
||||||
$CP_LIBC $libc_src/net/inet_ntop.c apps/ocspcheck/compat
|
|
||||||
$CP_LIBC $libc_src/string/memmem.c apps/ocspcheck/compat
|
$CP_LIBC $libc_src/string/memmem.c apps/ocspcheck/compat
|
||||||
for i in `awk '/SOURCES|HEADERS|MANS/ { print $3 }' apps/ocspcheck/Makefile.am` ; do
|
for i in `awk '/SOURCES|HEADERS|MANS/ { print $3 }' apps/ocspcheck/Makefile.am` ; do
|
||||||
if [ -e $sbin_src/ocspcheck/$i ]; then
|
if [ -e $sbin_src/ocspcheck/$i ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user