mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Reject use of ucol_strcollUTF8() before ICU 53
Various bugs can cause crashes, so don't use that function before ICU 53. It will fall back to the code path used for other encodings. Since we now tie the function availability to an ICU version, we don't need the configure test anymore. That also resolves the issue that the test result was previously hardcoded for Windows. researched by Daniel Verite <daniel@manitou-mail.org>, Peter Geoghegan <pg@bowt.ie>, Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/f1438ec6-22aa-4029-9a3b-26f79d330e72%40manitou-mail.org
This commit is contained in:
38
configure
vendored
38
configure
vendored
@ -13923,44 +13923,6 @@ fi
|
||||
|
||||
|
||||
|
||||
# ucol_strcollUTF8() appeared in ICU 50, so check if we have it.
|
||||
# ICU functions are macros, so we need to do this the long way.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ucol_strcollUTF8" >&5
|
||||
$as_echo_n "checking for ucol_strcollUTF8... " >&6; }
|
||||
if ${pgac_cv_func_ucol_strcollUTF8+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_save_LIBS=$LIBS
|
||||
LIBS="$ICU_LIBS $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <unicode/ucol.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
ucol_strcollUTF8(NULL, NULL, 0, NULL, 0, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
pgac_cv_func_ucol_strcollUTF8=yes
|
||||
else
|
||||
pgac_cv_func_ucol_strcollUTF8=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_ucol_strcollUTF8" >&5
|
||||
$as_echo "$pgac_cv_func_ucol_strcollUTF8" >&6; }
|
||||
if test "$pgac_cv_func_ucol_strcollUTF8" = yes ; then
|
||||
|
||||
$as_echo "#define HAVE_UCOL_STRCOLLUTF8 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
CPPFLAGS=$ac_save_CPPFLAGS
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user