From: Bruno Haible Date: Sun, 16 Aug 2020 10:47:55 +0000 (+0200) Subject: Don't use Autoconf quadrigraphs. X-Git-Tag: v1.0~3750 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=46f8e0a8b32e85f18bdac0dcdd22df7a62fcf30a;p=gnulib.git Don't use Autoconf quadrigraphs. * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA): Use '#' instead of the corresponding Autoconf quadrigraph. * m4/free.m4 (gl_FUNC_FREE): Likewise. * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Likewise. * m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES, _AC_SYS_LARGEFILE_MACRO_VALUE): Likewise. * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise. * m4/math_h.m4 (gl_MATH_H): Likewise. * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise. --- diff --git a/ChangeLog b/ChangeLog index afad9b2b12..4f07248d72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2020-08-16 Bruno Haible + + Don't use Autoconf quadrigraphs. + * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA): Use '#' instead of the corresponding + Autoconf quadrigraph. + * m4/free.m4 (gl_FUNC_FREE): Likewise. + * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Likewise. + * m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES, + _AC_SYS_LARGEFILE_MACRO_VALUE): Likewise. + * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise. + * m4/math_h.m4 (gl_MATH_H): Likewise. + * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise. + 2020-08-16 Bruno Haible Fix quoting of AC_LANG_PROGRAM arguments. diff --git a/m4/alloca.m4 b/m4/alloca.m4 index b777f8450c..d841489630 100644 --- a/m4/alloca.m4 +++ b/m4/alloca.m4 @@ -1,4 +1,4 @@ -# alloca.m4 serial 17 +# alloca.m4 serial 18 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2020 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -102,7 +102,7 @@ AH_VERBATIM([STACK_DIRECTION], STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ -@%:@undef STACK_DIRECTION])dnl +#undef STACK_DIRECTION])dnl AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) ]) ]) diff --git a/m4/free.m4 b/m4/free.m4 index 02a8782e7d..a62214cd12 100644 --- a/m4/free.m4 +++ b/m4/free.m4 @@ -24,12 +24,12 @@ AC_DEFUN([gl_FUNC_FREE], *) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( - [[@%:@include ]], - [[@%:@if _POSIX_VERSION < 199009L && \ + [[#include ]], + [[#if _POSIX_VERSION < 199009L && \ (defined unix || defined _unix || defined _unix_ \ || defined __unix || defined __unix__) - @%:@error "'free (NULL)' is not known to work" - @%:@endif]])], + #error "'free (NULL)' is not known to work" + #endif]])], [gl_cv_func_free=yes], [gl_cv_func_free=no]) esac diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index 8e96965d82..9fe328efc0 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 @@ -7,7 +7,7 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 9 +#serial 10 # Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent. # New applications should use gl_GETLOADAVG instead. @@ -147,7 +147,7 @@ fi AC_CHECK_HEADERS([nlist.h], [AC_CHECK_MEMBERS([struct nlist.n_un.n_name], [], [], - [@%:@include ]) + [#include ]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct nlist x; #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME diff --git a/m4/largefile.m4 b/m4/largefile.m4 index f7140dd0a3..f4c5d3a5ce 100644 --- a/m4/largefile.m4 +++ b/m4/largefile.m4 @@ -30,12 +30,12 @@ m4_version_prereq([2.70], [] ,[ # _AC_SYS_LARGEFILE_TEST_INCLUDES # ------------------------------- m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], -[@%:@include +[#include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -@%:@define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) +#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]];[]dnl @@ -54,7 +54,7 @@ m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE], [AC_LANG_PROGRAM([$5], [$6])], [$3=no; break]) m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( - [AC_LANG_PROGRAM([@%:@define $1 $2 + [AC_LANG_PROGRAM([#define $1 $2 $5], [$6])], [$3=$2; break]) $3=unknown diff --git a/m4/longlong.m4 b/m4/longlong.m4 index e878488ad5..c0ab70a6a7 100644 --- a/m4/longlong.m4 +++ b/m4/longlong.m4 @@ -1,4 +1,4 @@ -# longlong.m4 serial 18 +# longlong.m4 serial 19 dnl Copyright (C) 1999-2007, 2009-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -28,12 +28,12 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT], dnl nobody cross compiles for this platform as far as we know. AC_RUN_IFELSE( [AC_LANG_PROGRAM( - [[@%:@include - @%:@ifndef LLONG_MAX - @%:@ define HALF \ + [[#include + #ifndef LLONG_MAX + # define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - @%:@ define LLONG_MAX (HALF - 1 + HALF) - @%:@endif]], + # define LLONG_MAX (HALF - 1 + HALF) + #endif]], [[long long int n = 1; int i; for (i = 0; ; i++) diff --git a/m4/math_h.m4 b/m4/math_h.m4 index 44c810c279..f259079a57 100644 --- a/m4/math_h.m4 +++ b/m4/math_h.m4 @@ -1,4 +1,4 @@ -# math_h.m4 serial 120 +# math_h.m4 serial 121 dnl Copyright (C) 2007-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -10,7 +10,7 @@ AC_DEFUN([gl_MATH_H], gl_CHECK_NEXT_HEADERS([math.h]) AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[/* Solaris 10 has a broken definition of NAN. Other platforms fail to provide NAN, or provide it only in C99 mode; this test only needs to fail when NAN is provided but wrong. */ @@ -25,7 +25,7 @@ AC_DEFUN([gl_MATH_H], REPLACE_NAN=1 fi AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[/* Solaris 10 has a broken definition of HUGE_VAL. */ double d = HUGE_VAL; return d == 0;]])], diff --git a/m4/warn-on-use.m4 b/m4/warn-on-use.m4 index 3a692c710b..1d2bcdfec9 100644 --- a/m4/warn-on-use.m4 +++ b/m4/warn-on-use.m4 @@ -1,4 +1,4 @@ -# warn-on-use.m4 serial 8 +# warn-on-use.m4 serial 9 dnl Copyright (C) 2010-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE], AC_CACHE_CHECK([whether $gl_func is declared without a macro], [gl_Symbol], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], -[[@%:@undef $gl_func +[[#undef $gl_func (void) $gl_func;]])], [AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])]) AS_VAR_IF([gl_Symbol], [yes],