From 27c68a6d8f20090310450862c2c299bb7ba3c160 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 7 Jun 2023 09:11:44 +0200 Subject: [PATCH] gh-89886: Use Autoconf quadrigraphs where appropriate (#105226) --- configure.ac | 88 ++++++++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/configure.ac b/configure.ac index 3d03fa6f611..ce4e4d4b061 100644 --- a/configure.ac +++ b/configure.ac @@ -2616,7 +2616,7 @@ yes) AC_MSG_RESULT([$MACOSX_DEPLOYMENT_TARGET]) AC_MSG_CHECKING([if specified universal architectures work]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[printf("%d", 42);]])], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[printf("%d", 42);]])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AC_MSG_ERROR([check config.log and use the '--with-universal-archs' option]) @@ -3057,7 +3057,7 @@ fi AC_CACHE_CHECK([for pthread_t], [ac_cv_have_pthread_t], [ AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[#include ]], [[pthread_t x; x = *(pthread_t*)0;]]) + AC_LANG_PROGRAM([[@%:@include ]], [[pthread_t x; x = *(pthread_t*)0;]]) ], [ac_cv_have_pthread_t=yes], [ac_cv_have_pthread_t=no]) ]) AS_VAR_IF([ac_cv_have_pthread_t], [yes], [ @@ -3070,11 +3070,11 @@ AS_VAR_IF([ac_cv_have_pthread_t], [yes], [ # Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int. # This checking will be unnecessary after removing deprecated TLS API. -AC_CHECK_SIZEOF([pthread_key_t], [], [[#include ]]) +AC_CHECK_SIZEOF([pthread_key_t], [], [[@%:@include ]]) AC_CACHE_CHECK([whether pthread_key_t is compatible with int], [ac_cv_pthread_key_t_is_arithmetic_type], [ if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include ]], [[pthread_key_t k; k * 1;]])], + [AC_LANG_PROGRAM([[@%:@include ]], [[pthread_key_t k; k * 1;]])], [ac_cv_pthread_key_t_is_arithmetic_type=yes], [ac_cv_pthread_key_t_is_arithmetic_type=no] ) @@ -3615,7 +3615,7 @@ AC_CHECK_LIB([intl], [textdomain], case "$ac_sys_system" in AIX*) AC_MSG_CHECKING([for genuine AIX C++ extensions support]) AC_LINK_IFELSE([ - AC_LANG_PROGRAM([[#include ]], + AC_LANG_PROGRAM([[@%:@include ]], [[loadAndInit("", 0, "")]]) ],[ AC_DEFINE([AIX_GENUINE_CPLUSPLUS], [1], @@ -3833,9 +3833,9 @@ AS_VAR_IF([have_libffi], [yes], [ CFLAGS="$LIBFFI_CFLAGS $CFLAGS" LDFLAGS="$LIBFFI_LIBS $LDFLAGS" - PY_CHECK_FUNC([ffi_prep_cif_var], [#include ]) - PY_CHECK_FUNC([ffi_prep_closure_loc], [#include ]) - PY_CHECK_FUNC([ffi_closure_alloc], [#include ]) + PY_CHECK_FUNC([ffi_prep_cif_var], [@%:@include ]) + PY_CHECK_FUNC([ffi_prep_closure_loc], [@%:@include ]) + PY_CHECK_FUNC([ffi_closure_alloc], [@%:@include ]) ]) ]) @@ -4445,7 +4445,7 @@ AC_ARG_ENABLE([ipv6], dnl the check does not work on cross compilation case... AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ /* AF_INET6 available check */ #include -#include ]], +@%:@include ]], [[int domain = AF_INET6;]])],[ ipv6=yes ],[ @@ -4462,7 +4462,7 @@ if test "$ipv6" = "yes"; then AC_MSG_CHECKING([if RFC2553 API is available]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[#include -#include ]], +@%:@include ]], [[struct sockaddr_in6 x; x.sin6_scope_id;]]) ],[ @@ -4494,7 +4494,7 @@ if test "$ipv6" = "yes"; then #include #ifdef IPV6_INRIA_VERSION yes -#endif], +@%:@endif], [ipv6type=$i]) ;; kame) @@ -4503,7 +4503,7 @@ yes #include #ifdef __KAME__ yes -#endif], +@%:@endif], [ipv6type=$i; ipv6lib=inet6 ipv6libdir=/usr/local/v6/lib @@ -4515,7 +4515,7 @@ yes #include #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) yes -#endif], +@%:@endif], [ipv6type=$i; ipv6trylibc=yes]) ;; @@ -4541,7 +4541,7 @@ yes #include #ifdef _TOSHIBA_INET6 yes -#endif], +@%:@endif], [ipv6type=$i; ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib]) @@ -4551,7 +4551,7 @@ yes #include #ifdef __V6D__ yes -#endif], +@%:@endif], [ipv6type=$i; ipv6lib=v6; ipv6libdir=/usr/local/v6/lib; @@ -4562,7 +4562,7 @@ yes #include #ifdef _ZETA_MINAMI_INET6 yes -#endif], +@%:@endif], [ipv6type=$i; ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib]) @@ -4595,7 +4595,7 @@ fi AC_CACHE_CHECK([CAN_RAW_FD_FRAMES], [ac_cv_can_raw_fd_frames], [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ /* CAN_RAW_FD_FRAMES available check */ -#include ]], +@%:@include ]], [[int can_raw_fd_frames = CAN_RAW_FD_FRAMES;]])], [ac_cv_can_raw_fd_frames=yes], [ac_cv_can_raw_fd_frames=no]) @@ -4607,7 +4607,7 @@ AS_VAR_IF([ac_cv_can_raw_fd_frames], [yes], [ AC_CACHE_CHECK([for CAN_RAW_JOIN_FILTERS], [ac_cv_can_raw_join_filters], [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include ]], +@%:@include ]], [[int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;]])], [ac_cv_can_raw_join_filters=yes], [ac_cv_can_raw_join_filters=no]) @@ -4854,14 +4854,14 @@ AC_CHECK_DECL([dirfd], # For some functions, having a definition is not sufficient, since # we want to take their address. -PY_CHECK_FUNC([chroot], [#include ]) -PY_CHECK_FUNC([link], [#include ]) -PY_CHECK_FUNC([symlink], [#include ]) -PY_CHECK_FUNC([fchdir], [#include ]) -PY_CHECK_FUNC([fsync], [#include ]) -PY_CHECK_FUNC([fdatasync], [#include ]) -PY_CHECK_FUNC([epoll_create], [#include ], [HAVE_EPOLL]) -PY_CHECK_FUNC([epoll_create1], [#include ]) +PY_CHECK_FUNC([chroot], [@%:@include ]) +PY_CHECK_FUNC([link], [@%:@include ]) +PY_CHECK_FUNC([symlink], [@%:@include ]) +PY_CHECK_FUNC([fchdir], [@%:@include ]) +PY_CHECK_FUNC([fsync], [@%:@include ]) +PY_CHECK_FUNC([fdatasync], [@%:@include ]) +PY_CHECK_FUNC([epoll_create], [@%:@include ], [HAVE_EPOLL]) +PY_CHECK_FUNC([epoll_create1], [@%:@include ]) PY_CHECK_FUNC([kqueue],[ #include #include @@ -4871,7 +4871,7 @@ PY_CHECK_FUNC([prlimit], [ #include ]) -PY_CHECK_FUNC([_dyld_shared_cache_contains_path], [#include ], [HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH]) +PY_CHECK_FUNC([_dyld_shared_cache_contains_path], [@%:@include ], [HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH]) PY_CHECK_FUNC([memfd_create], [ #ifdef HAVE_SYS_MMAN_H @@ -4894,12 +4894,12 @@ PY_CHECK_FUNC([eventfd], [ # address to avoid compiler warnings and potential miscompilations # because of the missing prototypes. -PY_CHECK_FUNC([ctermid_r], [#include ]) +PY_CHECK_FUNC([ctermid_r], [@%:@include ]) AC_CACHE_CHECK([for flock declaration], [ac_cv_flock_decl], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( - [#include ], + [@%:@include ], [void* p = flock] )], [ac_cv_flock_decl=yes], @@ -4911,12 +4911,12 @@ AS_VAR_IF([ac_cv_flock_decl], [yes], [AC_CHECK_FUNCS([flock], [], [AC_CHECK_LIB([bsd], [flock], [FCNTL_LIBS="-lbsd"])])]) -PY_CHECK_FUNC([getpagesize], [#include ]) +PY_CHECK_FUNC([getpagesize], [@%:@include ]) AC_CACHE_CHECK([for broken unsetenv], [ac_cv_broken_unsetenv], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( - [#include ], + [@%:@include ], [int res = unsetenv("DUMMY")])], [ac_cv_broken_unsetenv=no], [ac_cv_broken_unsetenv=yes] @@ -5044,7 +5044,7 @@ PKG_CHECK_MODULES([LIBLZMA], [liblzma], [have_liblzma=yes], [ ]) dnl PY_CHECK_NETDB_FUNC(FUNCTION) -AC_DEFUN([PY_CHECK_NETDB_FUNC], [PY_CHECK_FUNC([$1], [#include ])]) +AC_DEFUN([PY_CHECK_NETDB_FUNC], [PY_CHECK_FUNC([$1], [@%:@include ])]) PY_CHECK_NETDB_FUNC([hstrerror]) dnl not available in WASI yet @@ -5325,10 +5325,10 @@ AC_CHECK_MEMBERS([struct passwd.pw_gecos, struct passwd.pw_passwd], [], [], [[ #include ]]) # Issue #21085: In Cygwin, siginfo_t does not have si_band field. -AC_CHECK_MEMBERS([siginfo_t.si_band], [], [], [[#include ]]) +AC_CHECK_MEMBERS([siginfo_t.si_band], [], [], [[@%:@include ]]) AC_CACHE_CHECK([for time.h that defines altzone], [ac_cv_header_time_altzone], [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[return altzone;]])], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[return altzone;]])], [ac_cv_header_time_altzone=yes], [ac_cv_header_time_altzone=no]) ]) @@ -5338,7 +5338,7 @@ if test $ac_cv_header_time_altzone = yes; then fi AC_CACHE_CHECK([for addrinfo], [ac_cv_struct_addrinfo], -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct addrinfo a]])], +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[struct addrinfo a]])], [ac_cv_struct_addrinfo=yes], [ac_cv_struct_addrinfo=no])) if test $ac_cv_struct_addrinfo = yes; then @@ -5348,7 +5348,7 @@ fi AC_CACHE_CHECK([for sockaddr_storage], [ac_cv_struct_sockaddr_storage], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ # include -# include ]], [[struct sockaddr_storage s]])], +@%:@ include ]], [[struct sockaddr_storage s]])], [ac_cv_struct_sockaddr_storage=yes], [ac_cv_struct_sockaddr_storage=no])) if test $ac_cv_struct_sockaddr_storage = yes; then @@ -5360,7 +5360,7 @@ AC_CACHE_CHECK([for sockaddr_alg], [ac_cv_struct_sockaddr_alg], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ # include # include -# include ]], [[struct sockaddr_alg s]])], +@%:@ include ]], [[struct sockaddr_alg s]])], [ac_cv_struct_sockaddr_alg=yes], [ac_cv_struct_sockaddr_alg=no])) if test $ac_cv_struct_sockaddr_alg = yes; then @@ -5399,7 +5399,7 @@ PY_CHECK_FUNC([socketpair], [ # check if sockaddr has sa_len member AC_CACHE_CHECK([if sockaddr has sa_len member], [ac_cv_struct_sockaddr_sa_len], [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include -#include ]], [[struct sockaddr x; +@%:@include ]], [[struct sockaddr x; x.sa_len = 0;]])], [ac_cv_struct_sockaddr_sa_len=yes], [ac_cv_struct_sockaddr_sa_len=no]) ]) @@ -5733,7 +5733,7 @@ AS_VAR_IF([ac_cv_broken_sem_getvalue], [yes], [ ) ]) -AC_CHECK_DECLS([RTLD_LAZY, RTLD_NOW, RTLD_GLOBAL, RTLD_LOCAL, RTLD_NODELETE, RTLD_NOLOAD, RTLD_DEEPBIND, RTLD_MEMBER], [], [], [[#include ]]) +AC_CHECK_DECLS([RTLD_LAZY, RTLD_NOW, RTLD_GLOBAL, RTLD_LOCAL, RTLD_NODELETE, RTLD_NOLOAD, RTLD_DEEPBIND, RTLD_MEMBER], [], [], [[@%:@include ]]) # determine what size digit to use for Python's longs AC_MSG_CHECKING([digit size for Python's longs]) @@ -5950,7 +5950,7 @@ fi # check for getc_unlocked and related locking functions AC_CACHE_CHECK([for getc_unlocked() and friends], [ac_cv_have_getc_unlocked], [ -AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ +AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[ FILE *f = fopen("/dev/null", "r"); flockfile(f); getc_unlocked(f); @@ -6256,7 +6256,7 @@ fi # Look for subsecond timestamps in struct stat AC_CACHE_CHECK([for tv_nsec in struct stat], [ac_cv_stat_tv_nsec], -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[ struct stat st; st.st_mtim.tv_nsec = 1; ]])], @@ -6270,7 +6270,7 @@ fi # Look for BSD style subsecond timestamps in struct stat AC_CACHE_CHECK([for tv_nsec2 in struct stat], [ac_cv_stat_tv_nsec2], -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[ struct stat st; st.st_mtimespec.tv_nsec = 1; ]])], @@ -6413,7 +6413,7 @@ AC_CHECK_HEADERS([term.h], [], [], [ # On HP/UX 11.0, mvwdelch is a block with a return statement AC_CACHE_CHECK([whether mvwdelch is an expression], [ac_cv_mvwdelch_is_expression], -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[ int rtn; rtn = mvwdelch(0,0,0); ]])], @@ -6457,7 +6457,7 @@ AC_DEFUN([PY_CHECK_CURSES_FUNC], [py_var], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( - [#include ], [ + [@%:@include ], [ #ifndef $1 void *x=$1 #endif