diff options
| author | Brent Cook <busterb@gmail.com> | 2018-03-14 07:29:04 -0500 |
|---|---|---|
| committer | Brent Cook <busterb@gmail.com> | 2018-03-14 07:29:04 -0500 |
| commit | 3fb9e63b907186c70fb79e818d899ccb67b4b421 (patch) | |
| tree | 6d1bd111880dff4838796915a68076339c37cbc3 | |
| parent | b7397ab184d303b7cd6a41eaf121e47834c5b707 (diff) | |
| download | portable-3fb9e63b907186c70fb79e818d899ccb67b4b421.tar.gz portable-3fb9e63b907186c70fb79e818d899ccb67b4b421.tar.bz2 portable-3fb9e63b907186c70fb79e818d899ccb67b4b421.zip | |
bump base requirement to Windows Vista, use builtin inet_ntop/pton
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | CMakeLists.txt | 7 | ||||
| -rw-r--r-- | apps/ocspcheck/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | apps/ocspcheck/Makefile.am | 4 | ||||
| -rw-r--r-- | crypto/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | crypto/Makefile.am | 7 | ||||
| -rw-r--r-- | include/Makefile.am | 1 | ||||
| -rw-r--r-- | include/compat/arpa/inet.h | 8 | ||||
| -rw-r--r-- | m4/check-libc.m4 | 4 | ||||
| -rw-r--r-- | m4/check-os-options.m4 | 2 | ||||
| -rwxr-xr-x | update.sh | 2 |
11 files changed, 3 insertions, 46 deletions
| @@ -124,7 +124,6 @@ include/openssl/*.h | |||
| 124 | /apps/ocspcheck/*.h | 124 | /apps/ocspcheck/*.h |
| 125 | /apps/ocspcheck/*.c | 125 | /apps/ocspcheck/*.c |
| 126 | /apps/ocspcheck/ocspcheck* | 126 | /apps/ocspcheck/ocspcheck* |
| 127 | /apps/ocspcheck/compat/inet_ntop.c | ||
| 128 | /apps/ocspcheck/compat/memmem.c | 127 | /apps/ocspcheck/compat/memmem.c |
| 129 | 128 | ||
| 130 | /apps/nc/*.h | 129 | /apps/nc/*.h |
| @@ -150,7 +149,6 @@ include/openssl/*.h | |||
| 150 | !/crypto/compat/getpagesize.c | 149 | !/crypto/compat/getpagesize.c |
| 151 | !/crypto/compat/posix_win.c | 150 | !/crypto/compat/posix_win.c |
| 152 | !/crypto/compat/bsd_asprintf.c | 151 | !/crypto/compat/bsd_asprintf.c |
| 153 | !/crypto/compat/inet_pton.c | ||
| 154 | !/crypto/compat/timegm.c | 152 | !/crypto/compat/timegm.c |
| 155 | !/crypto/compat/ui_openssl_win.c | 153 | !/crypto/compat/ui_openssl_win.c |
| 156 | !/crypto/CMakeLists.txt | 154 | !/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) | |||
| 98 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) | 98 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) |
| 99 | add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS) | 99 | add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS) |
| 100 | add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS) | 100 | add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS) |
| 101 | add_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0501) | 101 | add_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600) |
| 102 | add_definitions(-DCPPFLAGS -DOPENSSL_NO_SPEED -DNO_SYSLOG -DNO_CRYPT) | 102 | add_definitions(-DCPPFLAGS -DOPENSSL_NO_SPEED -DNO_SYSLOG -DNO_CRYPT) |
| 103 | endif() | 103 | endif() |
| 104 | 104 | ||
| @@ -154,11 +154,6 @@ if(HAVE_ASPRINTF) | |||
| 154 | add_definitions(-DHAVE_ASPRINTF) | 154 | add_definitions(-DHAVE_ASPRINTF) |
| 155 | endif() | 155 | endif() |
| 156 | 156 | ||
| 157 | check_function_exists(inet_pton HAVE_INET_PTON) | ||
| 158 | if(HAVE_INET_PTON) | ||
| 159 | add_definitions(-DHAVE_INET_PTON) | ||
| 160 | endif() | ||
| 161 | |||
| 162 | check_function_exists(reallocarray HAVE_REALLOCARRAY) | 157 | check_function_exists(reallocarray HAVE_REALLOCARRAY) |
| 163 | if(HAVE_REALLOCARRAY) | 158 | if(HAVE_REALLOCARRAY) |
| 164 | add_definitions(-DHAVE_REALLOCARRAY) | 159 | 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( | |||
| 13 | ocspcheck.c | 13 | ocspcheck.c |
| 14 | ) | 14 | ) |
| 15 | 15 | ||
| 16 | check_function_exists(inet_ntop HAVE_INET_NTOP) | ||
| 17 | if(HAVE_INET_NTOP) | ||
| 18 | add_definitions(-DHAVE_INET_NTOP) | ||
| 19 | else() | ||
| 20 | set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/inet_ntop.c) | ||
| 21 | endif() | ||
| 22 | |||
| 23 | check_function_exists(memmem HAVE_MEMMEM) | 16 | check_function_exists(memmem HAVE_MEMMEM) |
| 24 | if(HAVE_MEMMEM) | 17 | if(HAVE_MEMMEM) |
| 25 | add_definitions(-DHAVE_MEMMEM) | 18 | 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 | |||
| 14 | ocspcheck_SOURCES += ocspcheck.c | 14 | ocspcheck_SOURCES += ocspcheck.c |
| 15 | noinst_HEADERS = http.h | 15 | noinst_HEADERS = http.h |
| 16 | 16 | ||
| 17 | if !HAVE_INET_NTOP | ||
| 18 | ocspcheck_SOURCES += compat/inet_ntop.c | ||
| 19 | endif | ||
| 20 | |||
| 21 | if !HAVE_MEMMEM | 17 | if !HAVE_MEMMEM |
| 22 | ocspcheck_SOURCES += compat/memmem.c | 18 | ocspcheck_SOURCES += compat/memmem.c |
| 23 | endif | 19 | 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) | |||
| 687 | set(CRYPTO_SRC ${CRYPTO_SRC} compat/getpagesize.c) | 687 | set(CRYPTO_SRC ${CRYPTO_SRC} compat/getpagesize.c) |
| 688 | endif() | 688 | endif() |
| 689 | 689 | ||
| 690 | if(NOT HAVE_INET_PTON) | ||
| 691 | set(CRYPTO_SRC ${CRYPTO_SRC} compat/inet_pton.c) | ||
| 692 | set(EXTRA_EXPORT ${EXTRA_EXPORT} inet_pton) | ||
| 693 | endif() | ||
| 694 | |||
| 695 | if(NOT HAVE_REALLOCARRAY) | 690 | if(NOT HAVE_REALLOCARRAY) |
| 696 | set(CRYPTO_SRC ${CRYPTO_SRC} compat/reallocarray.c) | 691 | set(CRYPTO_SRC ${CRYPTO_SRC} compat/reallocarray.c) |
| 697 | set(EXTRA_EXPORT ${EXTRA_EXPORT} reallocarray) | 692 | 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 | |||
| 40 | if !HAVE_FREEZERO | 40 | if !HAVE_FREEZERO |
| 41 | -echo freezero >> crypto_portable.sym | 41 | -echo freezero >> crypto_portable.sym |
| 42 | endif | 42 | endif |
| 43 | if !HAVE_INET_PTON | ||
| 44 | -echo inet_pton >> crypto_portable.sym | ||
| 45 | endif | ||
| 46 | if !HAVE_REALLOCARRAY | 43 | if !HAVE_REALLOCARRAY |
| 47 | -echo reallocarray >> crypto_portable.sym | 44 | -echo reallocarray >> crypto_portable.sym |
| 48 | endif | 45 | endif |
| @@ -166,10 +163,6 @@ if !HAVE_GETPAGESIZE | |||
| 166 | libcompat_la_SOURCES += compat/getpagesize.c | 163 | libcompat_la_SOURCES += compat/getpagesize.c |
| 167 | endif | 164 | endif |
| 168 | 165 | ||
| 169 | if !HAVE_INET_PTON | ||
| 170 | libcompat_la_SOURCES += compat/inet_pton.c | ||
| 171 | endif | ||
| 172 | |||
| 173 | if !HAVE_TIMEGM | 166 | if !HAVE_TIMEGM |
| 174 | libcompat_la_SOURCES += compat/timegm.c | 167 | libcompat_la_SOURCES += compat/timegm.c |
| 175 | endif | 168 | 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 | |||
| 21 | noinst_HEADERS += compat/unistd.h | 21 | noinst_HEADERS += compat/unistd.h |
| 22 | noinst_HEADERS += compat/win32netcompat.h | 22 | noinst_HEADERS += compat/win32netcompat.h |
| 23 | 23 | ||
| 24 | noinst_HEADERS += compat/arpa/inet.h | ||
| 25 | noinst_HEADERS += compat/arpa/nameser.h | 24 | noinst_HEADERS += compat/arpa/nameser.h |
| 26 | 25 | ||
| 27 | noinst_HEADERS += compat/machine/endian.h | 26 | 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 @@ | |||
| 13 | #endif | 13 | #endif |
| 14 | 14 | ||
| 15 | #endif | 15 | #endif |
| 16 | |||
| 17 | #ifndef HAVE_INET_NTOP | ||
| 18 | const char * inet_ntop(int af, const void *src, char *dst, socklen_t size); | ||
| 19 | #endif | ||
| 20 | |||
| 21 | #ifndef HAVE_INET_PTON | ||
| 22 | int inet_pton(int af, const char * src, void * dst); | ||
| 23 | #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], [ | |||
| 2 | # Check for libc headers | 2 | # Check for libc headers |
| 3 | AC_CHECK_HEADERS([err.h readpassphrase.h]) | 3 | AC_CHECK_HEADERS([err.h readpassphrase.h]) |
| 4 | # Check for general libc functions | 4 | # Check for general libc functions |
| 5 | AC_CHECK_FUNCS([asprintf freezero inet_ntop inet_pton memmem]) | 5 | AC_CHECK_FUNCS([asprintf freezero memmem]) |
| 6 | AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray]) | 6 | AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray]) |
| 7 | AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum]) | 7 | AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum]) |
| 8 | AC_CHECK_FUNCS([timegm _mkgmtime]) | 8 | AC_CHECK_FUNCS([timegm _mkgmtime]) |
| @@ -22,8 +22,6 @@ AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [ | |||
| 22 | AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes]) | 22 | AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes]) |
| 23 | AM_CONDITIONAL([HAVE_FREEZERO], [test "x$ac_cv_func_freezero" = xyes]) | 23 | AM_CONDITIONAL([HAVE_FREEZERO], [test "x$ac_cv_func_freezero" = xyes]) |
| 24 | AM_CONDITIONAL([HAVE_GETPAGESIZE], [test "x$ac_cv_func_getpagesize" = xyes]) | 24 | AM_CONDITIONAL([HAVE_GETPAGESIZE], [test "x$ac_cv_func_getpagesize" = xyes]) |
| 25 | AM_CONDITIONAL([HAVE_INET_NTOP], [test "x$ac_cv_func_inet_ntop" = xyes]) | ||
| 26 | AM_CONDITIONAL([HAVE_INET_PTON], [test "x$ac_cv_func_inet_pton" = xyes]) | ||
| 27 | AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes]) | 25 | AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes]) |
| 28 | AM_CONDITIONAL([HAVE_READPASSPHRASE], [test "x$ac_cv_func_readpassphrase" = xyes]) | 26 | AM_CONDITIONAL([HAVE_READPASSPHRASE], [test "x$ac_cv_func_readpassphrase" = xyes]) |
| 29 | AM_CONDITIONAL([HAVE_REALLOCARRAY], [test "x$ac_cv_func_reallocarray" = xyes]) | 27 | 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); | |||
| 106 | BUILD_NC=no | 106 | BUILD_NC=no |
| 107 | CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_POSIX -D_POSIX_SOURCE -D__USE_MINGW_ANSI_STDIO" | 107 | CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_POSIX -D_POSIX_SOURCE -D__USE_MINGW_ANSI_STDIO" |
| 108 | CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS" | 108 | CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS" |
| 109 | CPPFLAGS="$CPPFLAGS -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0501" | 109 | CPPFLAGS="$CPPFLAGS -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600" |
| 110 | CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_SPEED" | 110 | CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_SPEED" |
| 111 | AC_SUBST([PLATFORM_LDADD], ['-lws2_32']) | 111 | AC_SUBST([PLATFORM_LDADD], ['-lws2_32']) |
| 112 | ;; | 112 | ;; |
| @@ -82,7 +82,6 @@ for i in crypto/compat libtls-standalone/compat; do | |||
| 82 | for j in $libc_src/crypt/arc4random.c \ | 82 | for j in $libc_src/crypt/arc4random.c \ |
| 83 | $libc_src/crypt/arc4random_uniform.c \ | 83 | $libc_src/crypt/arc4random_uniform.c \ |
| 84 | $libc_src/crypt/chacha_private.h \ | 84 | $libc_src/crypt/chacha_private.h \ |
| 85 | $libc_src/net/inet_pton.c \ | ||
| 86 | $libc_src/stdlib/reallocarray.c \ | 85 | $libc_src/stdlib/reallocarray.c \ |
| 87 | $libc_src/stdlib/recallocarray.c \ | 86 | $libc_src/stdlib/recallocarray.c \ |
| 88 | $libc_src/string/explicit_bzero.c \ | 87 | $libc_src/string/explicit_bzero.c \ |
| @@ -237,7 +236,6 @@ done | |||
| 237 | echo "copying ocspcheck(1) source" | 236 | echo "copying ocspcheck(1) source" |
| 238 | $CP $sbin_src/ocspcheck/ocspcheck.8 apps/ocspcheck | 237 | $CP $sbin_src/ocspcheck/ocspcheck.8 apps/ocspcheck |
| 239 | rm -f apps/ocspcheck/*.c apps/ocspcheck/*.h | 238 | rm -f apps/ocspcheck/*.c apps/ocspcheck/*.h |
| 240 | $CP_LIBC $libc_src/net/inet_ntop.c apps/ocspcheck/compat | ||
| 241 | $CP_LIBC $libc_src/string/memmem.c apps/ocspcheck/compat | 239 | $CP_LIBC $libc_src/string/memmem.c apps/ocspcheck/compat |
| 242 | for i in `awk '/SOURCES|HEADERS|MANS/ { print $3 }' apps/ocspcheck/Makefile.am` ; do | 240 | for i in `awk '/SOURCES|HEADERS|MANS/ { print $3 }' apps/ocspcheck/Makefile.am` ; do |
| 243 | if [ -e $sbin_src/ocspcheck/$i ]; then | 241 | if [ -e $sbin_src/ocspcheck/$i ]; then |
