176 lines
5.4 KiB
Text
176 lines
5.4 KiB
Text
$NetBSD: patch-af,v 1.13 2016/02/29 17:13:06 jperkin Exp $
|
|
|
|
Fix HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS test, from upstream.
|
|
|
|
--- configure.orig 2015-02-22 14:16:23.000000000 +0000
|
|
+++ configure
|
|
@@ -15277,20 +15277,24 @@ else
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
/* end confdefs.h. */
|
|
|
|
-#include <stdio.h>
|
|
-int
|
|
-main ()
|
|
-{
|
|
-
|
|
- if (0) {
|
|
- this_function_does_not_exist();
|
|
- } else {
|
|
- return 1;
|
|
- }
|
|
-
|
|
+#include <sys/types.h>
|
|
+size_t __unsafe_string_function_usage_here_size_t__(void);
|
|
+#define CHECK_STRING_SIZE(d, len) (sizeof(d) != (len) && sizeof(d) != sizeof(char *))
|
|
+static size_t push_string_check_fn(void *dest, const char *src, size_t dest_len) {
|
|
+ return 0;
|
|
+}
|
|
|
|
- ;
|
|
- return 0;
|
|
+#define push_string_check(dest, src, dest_len) \
|
|
+ (CHECK_STRING_SIZE(dest, dest_len) \
|
|
+ ? __unsafe_string_function_usage_here_size_t__() \
|
|
+ : push_string_check_fn(dest, src, dest_len))
|
|
+
|
|
+int main(int argc, char **argv) {
|
|
+ char outbuf[1024];
|
|
+ char *p = outbuf;
|
|
+ const char *foo = "bar";
|
|
+ p += 31 + push_string_check(p + 31, foo, sizeof(outbuf) - (p + 31 - outbuf));
|
|
+ return 0;
|
|
}
|
|
_ACEOF
|
|
if ac_fn_c_try_link "$LINENO"; then :
|
|
@@ -19513,6 +19517,7 @@ $as_echo "#define DARWINOS 1" >>confdefs
|
|
|
|
BLDSHARED="true"
|
|
LDSHFLAGS="-dynamiclib -flat_namespace -undefined suppress"
|
|
+ SONAMEFLAG="-install_name \$(LIBDIR)/"
|
|
CFLAGS="$CFLAGS -fno-common"
|
|
SHLD="\${CC}"
|
|
SHLIBEXT="dylib"
|
|
@@ -19562,7 +19567,7 @@ fi
|
|
|
|
if test "x$enable_as_needed" != xno; then
|
|
saved_before_as_needed_ldflags="$LDFLAGS"
|
|
- for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do
|
|
+ for flags in "-Wl,-z,ignore" "-z ignore" ; do
|
|
saved_ldflags="$LDFLAGS"
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $flags works" >&5
|
|
$as_echo_n "checking if $flags works... " >&6; }
|
|
@@ -26638,9 +26643,9 @@ LIBS="-lcrypto $KRB5_LIBS $LIBS"
|
|
|
|
|
|
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_set_key in -lcrypto" >&5
|
|
-$as_echo_n "checking for des_set_key in -lcrypto... " >&6; }
|
|
-if ${ac_cv_lib_ext_crypto_des_set_key+:} false; then :
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_des_cbc in -lcrypto" >&5
|
|
+$as_echo_n "checking for EVP_des_cbc in -lcrypto... " >&6; }
|
|
+if ${ac_cv_lib_ext_crypto_EVP_des_cbc+:} false; then :
|
|
$as_echo_n "(cached) " >&6
|
|
else
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
@@ -26652,31 +26657,31 @@ else
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
#endif
|
|
-char des_set_key ();
|
|
+char EVP_des_cbc ();
|
|
int
|
|
main ()
|
|
{
|
|
-return des_set_key ();
|
|
+return EVP_des_cbc ();
|
|
;
|
|
return 0;
|
|
}
|
|
_ACEOF
|
|
if ac_fn_c_try_link "$LINENO"; then :
|
|
- ac_cv_lib_ext_crypto_des_set_key=yes;
|
|
+ ac_cv_lib_ext_crypto_EVP_des_cbc=yes;
|
|
ac_cv_lib_ext_crypto=yes
|
|
else
|
|
- ac_cv_lib_ext_crypto_des_set_key=no;
|
|
+ ac_cv_lib_ext_crypto_EVP_des_cbc=no;
|
|
ac_cv_lib_ext_crypto=no
|
|
fi
|
|
rm -f core conftest.err conftest.$ac_objext \
|
|
conftest$ac_exeext conftest.$ac_ext
|
|
|
|
fi
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_crypto_des_set_key" >&5
|
|
-$as_echo "$ac_cv_lib_ext_crypto_des_set_key" >&6; }
|
|
- if test $ac_cv_lib_ext_crypto_des_set_key = yes; then :
|
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_crypto_EVP_des_cbc" >&5
|
|
+$as_echo "$ac_cv_lib_ext_crypto_EVP_des_cbc" >&6; }
|
|
+ if test $ac_cv_lib_ext_crypto_EVP_des_cbc = yes; then :
|
|
cat >>confdefs.h <<_ACEOF
|
|
-#define HAVE_DES_SET_KEY 1
|
|
+#define HAVE_EVP_DES_CBC 1
|
|
_ACEOF
|
|
|
|
fi
|
|
@@ -36049,31 +36054,39 @@ case "$host_os" in
|
|
NSSSONAMEVERSIONSUFFIX=".2"
|
|
WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_linux.o"
|
|
;;
|
|
- *freebsd[5-9]*)
|
|
- # FreeBSD winbind client is implemented as a wrapper around
|
|
- # the Linux version.
|
|
- NSSSONAMEVERSIONSUFFIX=".1"
|
|
- WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_freebsd.o \
|
|
- ../nsswitch/winbind_nss_linux.o"
|
|
- WINBIND_NSS="../nsswitch/nss_winbind.$SHLIBEXT"
|
|
- WINBIND_WINS_NSS="../nsswitch/nss_wins.$SHLIBEXT"
|
|
- ;;
|
|
-
|
|
- *netbsd*[3-9]*)
|
|
- # NetBSD winbind client is implemented as a wrapper
|
|
- # around the Linux version. It needs getpwent_r() to
|
|
- # indicate libc's use of the correct nsdispatch API.
|
|
- #
|
|
- if test x"$ac_cv_func_getpwent_r" = x"yes"; then
|
|
- WINBIND_NSS_EXTRA_OBJS="\
|
|
- ../nsswitch/winbind_nss_netbsd.o \
|
|
+ *freebsd*)
|
|
+ case "$UNAME_R" in
|
|
+ [5-9]*)
|
|
+ # FreeBSD winbind client is implemented as a wrapper
|
|
+ # around the Linux version.
|
|
+ NSSSONAMEVERSIONSUFFIX=".1"
|
|
+ WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_freebsd.o \
|
|
../nsswitch/winbind_nss_linux.o"
|
|
WINBIND_NSS="../nsswitch/nss_winbind.$SHLIBEXT"
|
|
WINBIND_WINS_NSS="../nsswitch/nss_wins.$SHLIBEXT"
|
|
- else
|
|
- HAVE_WINBIND=no
|
|
- winbind_no_reason=", getpwent_r is missing on $host_os so winbind is unsupported"
|
|
- fi
|
|
+ ;;
|
|
+ esac
|
|
+ ;;
|
|
+
|
|
+ *netbsd*)
|
|
+ case "$UNAME_R" in
|
|
+ [3-9]*)
|
|
+ # NetBSD winbind client is implemented as a wrapper
|
|
+ # around the Linux version. It needs getpwent_r() to
|
|
+ # indicate libc's use of the correct nsdispatch API.
|
|
+ #
|
|
+ if test x"$ac_cv_func_getpwent_r" = x"yes"; then
|
|
+ WINBIND_NSS_EXTRA_OBJS="\
|
|
+ ../nsswitch/winbind_nss_netbsd.o \
|
|
+ ../nsswitch/winbind_nss_linux.o"
|
|
+ WINBIND_NSS="../nsswitch/nss_winbind.$SHLIBEXT"
|
|
+ WINBIND_WINS_NSS="../nsswitch/nss_wins.$SHLIBEXT"
|
|
+ else
|
|
+ HAVE_WINBIND=no
|
|
+ winbind_no_reason=", getpwent_r is missing on $host_os so winbind is unsupported"
|
|
+ fi
|
|
+ ;;
|
|
+ esac
|
|
;;
|
|
*irix*)
|
|
# IRIX has differently named shared libraries
|