From 3fb9e63b907186c70fb79e818d899ccb67b4b421 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 14 Mar 2018 07:29:04 -0500 Subject: bump base requirement to Windows Vista, use builtin inet_ntop/pton --- .gitignore | 2 -- CMakeLists.txt | 7 +------ apps/ocspcheck/CMakeLists.txt | 7 ------- apps/ocspcheck/Makefile.am | 4 ---- crypto/CMakeLists.txt | 5 ----- crypto/Makefile.am | 7 ------- include/Makefile.am | 1 - include/compat/arpa/inet.h | 8 -------- m4/check-libc.m4 | 4 +--- m4/check-os-options.m4 | 2 +- update.sh | 2 -- 11 files changed, 3 insertions(+), 46 deletions(-) diff --git a/.gitignore b/.gitignore index 78d286f..48a00e0 100644 --- a/.gitignore +++ b/.gitignore @@ -124,7 +124,6 @@ include/openssl/*.h /apps/ocspcheck/*.h /apps/ocspcheck/*.c /apps/ocspcheck/ocspcheck* -/apps/ocspcheck/compat/inet_ntop.c /apps/ocspcheck/compat/memmem.c /apps/nc/*.h @@ -150,7 +149,6 @@ include/openssl/*.h !/crypto/compat/getpagesize.c !/crypto/compat/posix_win.c !/crypto/compat/bsd_asprintf.c -!/crypto/compat/inet_pton.c !/crypto/compat/timegm.c !/crypto/compat/ui_openssl_win.c !/crypto/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index fd755ba..df92e6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,7 @@ if(WIN32) add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS) 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) endif() @@ -154,11 +154,6 @@ if(HAVE_ASPRINTF) add_definitions(-DHAVE_ASPRINTF) 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) if(HAVE_REALLOCARRAY) add_definitions(-DHAVE_REALLOCARRAY) diff --git a/apps/ocspcheck/CMakeLists.txt b/apps/ocspcheck/CMakeLists.txt index 4f89f4e..15af8a8 100644 --- a/apps/ocspcheck/CMakeLists.txt +++ b/apps/ocspcheck/CMakeLists.txt @@ -13,13 +13,6 @@ set( 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) if(HAVE_MEMMEM) add_definitions(-DHAVE_MEMMEM) diff --git a/apps/ocspcheck/Makefile.am b/apps/ocspcheck/Makefile.am index f7eb131..7482101 100644 --- a/apps/ocspcheck/Makefile.am +++ b/apps/ocspcheck/Makefile.am @@ -14,10 +14,6 @@ ocspcheck_SOURCES = http.c ocspcheck_SOURCES += ocspcheck.c noinst_HEADERS = http.h -if !HAVE_INET_NTOP -ocspcheck_SOURCES += compat/inet_ntop.c -endif - if !HAVE_MEMMEM ocspcheck_SOURCES += compat/memmem.c endif diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index c2ec985..0615110 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt @@ -687,11 +687,6 @@ if(NOT HAVE_GETPAGESIZE) set(CRYPTO_SRC ${CRYPTO_SRC} compat/getpagesize.c) 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) set(CRYPTO_SRC ${CRYPTO_SRC} compat/reallocarray.c) set(EXTRA_EXPORT ${EXTRA_EXPORT} reallocarray) diff --git a/crypto/Makefile.am b/crypto/Makefile.am index 9520a41..8bfb4a9 100644 --- a/crypto/Makefile.am +++ b/crypto/Makefile.am @@ -40,9 +40,6 @@ endif if !HAVE_FREEZERO -echo freezero >> crypto_portable.sym endif -if !HAVE_INET_PTON - -echo inet_pton >> crypto_portable.sym -endif if !HAVE_REALLOCARRAY -echo reallocarray >> crypto_portable.sym endif @@ -166,10 +163,6 @@ if !HAVE_GETPAGESIZE libcompat_la_SOURCES += compat/getpagesize.c endif -if !HAVE_INET_PTON -libcompat_la_SOURCES += compat/inet_pton.c -endif - if !HAVE_TIMEGM libcompat_la_SOURCES += compat/timegm.c endif diff --git a/include/Makefile.am b/include/Makefile.am index 728d921..976a9f9 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -21,7 +21,6 @@ noinst_HEADERS += compat/time.h noinst_HEADERS += compat/unistd.h noinst_HEADERS += compat/win32netcompat.h -noinst_HEADERS += compat/arpa/inet.h noinst_HEADERS += compat/arpa/nameser.h noinst_HEADERS += compat/machine/endian.h diff --git a/include/compat/arpa/inet.h b/include/compat/arpa/inet.h index f14ffde..4422f41 100644 --- a/include/compat/arpa/inet.h +++ b/include/compat/arpa/inet.h @@ -13,11 +13,3 @@ #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 diff --git a/m4/check-libc.m4 b/m4/check-libc.m4 index 5bb4287..cacdd17 100644 --- a/m4/check-libc.m4 +++ b/m4/check-libc.m4 @@ -2,7 +2,7 @@ AC_DEFUN([CHECK_LIBC_COMPAT], [ # Check for libc headers AC_CHECK_HEADERS([err.h readpassphrase.h]) # 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([strlcat strlcpy strndup strnlen strsep strtonum]) 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_FREEZERO], [test "x$ac_cv_func_freezero" = 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_READPASSPHRASE], [test "x$ac_cv_func_readpassphrase" = xyes]) AM_CONDITIONAL([HAVE_REALLOCARRAY], [test "x$ac_cv_func_reallocarray" = xyes]) diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4 index 3cf1956..414e63d 100644 --- a/m4/check-os-options.m4 +++ b/m4/check-os-options.m4 @@ -106,7 +106,7 @@ char buf[1]; getentropy(buf, 1); BUILD_NC=no 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 -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0501" + CPPFLAGS="$CPPFLAGS -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600" CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_SPEED" AC_SUBST([PLATFORM_LDADD], ['-lws2_32']) ;; diff --git a/update.sh b/update.sh index f11aa04..9e9ace6 100755 --- a/update.sh +++ b/update.sh @@ -82,7 +82,6 @@ for i in crypto/compat libtls-standalone/compat; do for j in $libc_src/crypt/arc4random.c \ $libc_src/crypt/arc4random_uniform.c \ $libc_src/crypt/chacha_private.h \ - $libc_src/net/inet_pton.c \ $libc_src/stdlib/reallocarray.c \ $libc_src/stdlib/recallocarray.c \ $libc_src/string/explicit_bzero.c \ @@ -237,7 +236,6 @@ done echo "copying ocspcheck(1) source" $CP $sbin_src/ocspcheck/ocspcheck.8 apps/ocspcheck 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 for i in `awk '/SOURCES|HEADERS|MANS/ { print $3 }' apps/ocspcheck/Makefile.am` ; do if [ -e $sbin_src/ocspcheck/$i ]; then -- cgit v1.2.3-55-g6feb