Skip to content

Commit 6fb3e6d

Browse files
committed
Merge branch 'REL9_5_STABLE' into PGPRO9_5
Conflicts: configure
2 parents ac92c4a + 7c177dd commit 6fb3e6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+798
-556
lines changed

configure

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8763,9 +8763,9 @@ else
87638763
as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
87648764
fi
87658765

8766-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
8767-
$as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8768-
if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
8766+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
8767+
$as_echo_n "checking for SSL_new in -lssl... " >&6; }
8768+
if ${ac_cv_lib_ssl_SSL_new+:} false; then :
87698769
$as_echo_n "(cached) " >&6
87708770
else
87718771
ac_check_lib_save_LIBS=$LIBS
@@ -8779,27 +8779,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
87798779
#ifdef __cplusplus
87808780
extern "C"
87818781
#endif
8782-
char SSL_library_init ();
8782+
char SSL_new ();
87838783
int
87848784
main ()
87858785
{
8786-
return SSL_library_init ();
8786+
return SSL_new ();
87878787
;
87888788
return 0;
87898789
}
87908790
_ACEOF
87918791
if ac_fn_c_try_link "$LINENO"; then :
8792-
ac_cv_lib_ssl_SSL_library_init=yes
8792+
ac_cv_lib_ssl_SSL_new=yes
87938793
else
8794-
ac_cv_lib_ssl_SSL_library_init=no
8794+
ac_cv_lib_ssl_SSL_new=no
87958795
fi
87968796
rm -f core conftest.err conftest.$ac_objext \
87978797
conftest$ac_exeext conftest.$ac_ext
87988798
LIBS=$ac_check_lib_save_LIBS
87998799
fi
8800-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8801-
$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8802-
if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
8800+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
8801+
$as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
8802+
if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
88038803
cat >>confdefs.h <<_ACEOF
88048804
#define HAVE_LIBSSL 1
88058805
_ACEOF
@@ -8869,9 +8869,9 @@ else
88698869
as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
88708870
fi
88718871

8872-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
8873-
$as_echo_n "checking for library containing SSL_library_init... " >&6; }
8874-
if ${ac_cv_search_SSL_library_init+:} false; then :
8872+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
8873+
$as_echo_n "checking for library containing SSL_new... " >&6; }
8874+
if ${ac_cv_search_SSL_new+:} false; then :
88758875
$as_echo_n "(cached) " >&6
88768876
else
88778877
ac_func_search_save_LIBS=$LIBS
@@ -8884,11 +8884,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88848884
#ifdef __cplusplus
88858885
extern "C"
88868886
#endif
8887-
char SSL_library_init ();
8887+
char SSL_new ();
88888888
int
88898889
main ()
88908890
{
8891-
return SSL_library_init ();
8891+
return SSL_new ();
88928892
;
88938893
return 0;
88948894
}
@@ -8901,25 +8901,25 @@ for ac_lib in '' ssleay32 ssl; do
89018901
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
89028902
fi
89038903
if ac_fn_c_try_link "$LINENO"; then :
8904-
ac_cv_search_SSL_library_init=$ac_res
8904+
ac_cv_search_SSL_new=$ac_res
89058905
fi
89068906
rm -f core conftest.err conftest.$ac_objext \
89078907
conftest$ac_exeext
8908-
if ${ac_cv_search_SSL_library_init+:} false; then :
8908+
if ${ac_cv_search_SSL_new+:} false; then :
89098909
break
89108910
fi
89118911
done
8912-
if ${ac_cv_search_SSL_library_init+:} false; then :
8912+
if ${ac_cv_search_SSL_new+:} false; then :
89138913

89148914
else
8915-
ac_cv_search_SSL_library_init=no
8915+
ac_cv_search_SSL_new=no
89168916
fi
89178917
rm conftest.$ac_ext
89188918
LIBS=$ac_func_search_save_LIBS
89198919
fi
8920-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
8921-
$as_echo "$ac_cv_search_SSL_library_init" >&6; }
8922-
ac_res=$ac_cv_search_SSL_library_init
8920+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
8921+
$as_echo "$ac_cv_search_SSL_new" >&6; }
8922+
ac_res=$ac_cv_search_SSL_new
89238923
if test "$ac_res" != no; then :
89248924
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
89258925

@@ -8936,6 +8936,37 @@ if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
89368936
#define HAVE_SSL_GET_CURRENT_COMPRESSION 1
89378937
_ACEOF
89388938

8939+
fi
8940+
done
8941+
8942+
# Functions introduced in OpenSSL 1.1.0. We used to check for
8943+
# OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
8944+
# defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
8945+
# doesn't have these OpenSSL 1.1.0 functions. So check for individual
8946+
# functions.
8947+
for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
8948+
do :
8949+
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8950+
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8951+
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8952+
cat >>confdefs.h <<_ACEOF
8953+
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8954+
_ACEOF
8955+
8956+
fi
8957+
done
8958+
8959+
# OpenSSL versions before 1.1.0 required setting callback functions, for
8960+
# thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
8961+
# function was removed.
8962+
for ac_func in CRYPTO_lock
8963+
do :
8964+
ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
8965+
if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
8966+
cat >>confdefs.h <<_ACEOF
8967+
#define HAVE_CRYPTO_LOCK 1
8968+
_ACEOF
8969+
89398970
fi
89408971
done
89418972

configure.in

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,12 +1046,22 @@ if test "$with_openssl" = yes ; then
10461046
dnl Order matters!
10471047
if test "$PORTNAME" != "win32"; then
10481048
AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])])
1049-
AC_CHECK_LIB(ssl, SSL_library_init, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])])
1049+
AC_CHECK_LIB(ssl, SSL_new, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])])
10501050
else
10511051
AC_SEARCH_LIBS(CRYPTO_new_ex_data, eay32 crypto, [], [AC_MSG_ERROR([library 'eay32' or 'crypto' is required for OpenSSL])])
1052-
AC_SEARCH_LIBS(SSL_library_init, ssleay32 ssl, [], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])])
1052+
AC_SEARCH_LIBS(SSL_new, ssleay32 ssl, [], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])])
10531053
fi
10541054
AC_CHECK_FUNCS([SSL_get_current_compression])
1055+
# Functions introduced in OpenSSL 1.1.0. We used to check for
1056+
# OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
1057+
# defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
1058+
# doesn't have these OpenSSL 1.1.0 functions. So check for individual
1059+
# functions.
1060+
AC_CHECK_FUNCS([OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL])
1061+
# OpenSSL versions before 1.1.0 required setting callback functions, for
1062+
# thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
1063+
# function was removed.
1064+
AC_CHECK_FUNCS([CRYPTO_lock])
10551065
fi
10561066

10571067
if test "$with_icu" = yes ; then

contrib/pg_buffercache/pg_buffercache_pages.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ pg_buffercache_pages(PG_FUNCTION_ARGS)
124124
fctx->tupdesc = BlessTupleDesc(tupledesc);
125125

126126
/* Allocate NBuffers worth of BufferCachePagesRec records. */
127-
fctx->record = (BufferCachePagesRec *) palloc(sizeof(BufferCachePagesRec) * NBuffers);
127+
fctx->record = (BufferCachePagesRec *)
128+
MemoryContextAllocHuge(CurrentMemoryContext,
129+
sizeof(BufferCachePagesRec) * NBuffers);
128130

129131
/* Set max calls and remember the user function context. */
130132
funcctx->max_calls = NBuffers;

contrib/pgcrypto/internal.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -620,15 +620,6 @@ px_find_cipher(const char *name, PX_Cipher **res)
620620
* Randomness provider
621621
*/
622622

623-
/*
624-
* Use always strong randomness.
625-
*/
626-
int
627-
px_get_pseudo_random_bytes(uint8 *dst, unsigned count)
628-
{
629-
return px_get_random_bytes(dst, count);
630-
}
631-
632623
static time_t seed_time = 0;
633624
static time_t check_time = 0;
634625

0 commit comments

Comments
 (0)