mirror of
https://github.com/postgres/postgres.git
synced 2025-08-06 18:42:54 +03:00
Support use of strnlen() in pre-v11 branches.
Back-patch a minimal subset of commitsfffd651e8
and46912d9b1
, to support strnlen() on all platforms without adding any callers. This will be needed by a following bug fix.
This commit is contained in:
23
configure
vendored
23
configure
vendored
@@ -13513,6 +13513,16 @@ fi
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_STRLCPY $ac_have_decl
|
||||
_ACEOF
|
||||
ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
|
||||
if test "x$ac_cv_have_decl_strnlen" = xyes; then :
|
||||
ac_have_decl=1
|
||||
else
|
||||
ac_have_decl=0
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_STRNLEN $ac_have_decl
|
||||
_ACEOF
|
||||
|
||||
# This is probably only present on macOS, but may as well check always
|
||||
ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
|
||||
@@ -13880,6 +13890,19 @@ esac
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
|
||||
if test "x$ac_cv_func_strnlen" = xyes; then :
|
||||
$as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
|
||||
|
||||
else
|
||||
case " $LIBOBJS " in
|
||||
*" strnlen.$ac_objext "* ) ;;
|
||||
*) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
case $host_os in
|
||||
|
Reference in New Issue
Block a user