From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 7AF311F4B4 for ; Wed, 23 Dec 2020 20:14:02 +0000 (UTC) Received: from localhost ([::1]:56742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksAWH-0000uH-85 for normalperson@yhbt.net; Wed, 23 Dec 2020 15:14:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksAW8-0000rj-13; Wed, 23 Dec 2020 15:13:53 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.54]:19082) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksAW4-0002vP-Pb; Wed, 23 Dec 2020 15:13:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1608754425; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:From: Subject:Sender; bh=lxrvXe7Ft1NJaLT1EAFcxu6JQvTcyqkoEtj7npXmzLU=; b=ClUWNWGV+ezus4wwUb8qC6lLg5Ks9+2vREmdxrNZ6vLLZPeqHga5O/Drm1caz9pwuw cBCpw1XfnayKJAcDBO8TFhC3BUej5eYfwnwfkFs1TpEqKFioZ3owHDHl24edGwxqhzS/ W2lN84s/WI6SVYq9T3MqudYXi8YY2cr62U+paF+Eh8PxGGXDlSCyclRpZ4fL6Oaa87s0 uzsNhHOgFwSmx5DQ0mUC3CuvYjk1YoKL2CaVWq7R6jm9lcgAlsfWJGyTVcuQ9m0S2Quy EREuDHaPhrPhCRkciY5K6g9QCCGyFyxmYSKFSPL0pG6jIGbYdpYyRgyWuP2kua8+MU07 eTeQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqfzyPs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.10.7 DYNA|AUTH) with ESMTPSA id e012d5wBNKDh2LI (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Wed, 23 Dec 2020 21:13:43 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org Subject: Re: gnulib / autoconf sync Date: Wed, 23 Dec 2020 21:13:41 +0100 Message-ID: <3651672.U1Lx4NDzno@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <2928710.Y4y4159soz@omega> References: <2928710.Y4y4159soz@omega> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart4791662.DCV9Ri1Ezf" Content-Transfer-Encoding: 7Bit Received-SPF: none client-ip=85.215.255.54; envelope-from=bruno@clisp.org; helo=mo4-p01-ob.smtp.rzone.de X-Spam_score_int: -45 X-Spam_score: -4.6 X-Spam_bar: ---- X-Spam_report: (-4.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-2.521, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Autoconf , Zack Weinberg Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" This is a multi-part message in MIME format. --nextPart4791662.DCV9Ri1Ezf Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi Zack, Here are patches to sync autoconf with gnulib: AC_FUNC_CHOWN chown.m4 -> functions.m4 AC_FUNC_GETGROUPS getgroups.m4 -> functions.m4 AC_FUNC_MBRTOWC mbrtowc.m4 -> functions.m4 AC_TYPE_MBSTATE_T mbstate_t.m4 -> types.m4 AC_FUNC_GETMNTENT mountlist.m4 -> functions.m4 AC_FUNC_OBSTACK obstack.m4 -> functions.m4 The changes are mostly minor; the main purpose is 1) to be able to do this sync more easily in the future, 2) to wrap some of these definitions in m4_version_prereq([2.70.1], [], [ in Gnulib. There are still some remaining differences: Gnulib offers a configure option --enable-cross-guesses={conservative|risky} that determines how cross-compilation guesses work in case of unknown platforms. --enable-cross-guesses=conservative is the default. However, when an operating system developer (on a platform which is not yet known to gnulib) builds packages for their platform, they want to expose, not hide, possible platform bugs; in this case, --enable-cross-guesses=risky is the appropriate choice. Autoconf does not have such an option. Bruno --nextPart4791662.DCV9Ri1Ezf Content-Disposition: attachment; filename="0001-Port-AC_FUNC_CHOWN-fixes-from-Gnulib.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0001-Port-AC_FUNC_CHOWN-fixes-from-Gnulib.patch" >From f6f709a5d37fa5b8309bfd7d88f2b7f3daeeac1c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 21 Dec 2020 11:13:17 +0100 Subject: [PATCH 1/6] Port AC_FUNC_CHOWN fixes from Gnulib. * lib/autoconf/functions.m4 (AC_FUNC_CHOWN): Support compiling without -loldnames on native Windows. Improve cross-compilation guesses. When cross-compiling, say "guessing ...". --- lib/autoconf/functions.m4 | 82 ++++++++++++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 33 deletions(-) diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 12f60b9..a86048f 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -470,39 +470,55 @@ AU_ALIAS([AC_ALLOCA], [AC_FUNC_ALLOCA]) # Determine whether chown accepts arguments of -1 for uid and gid. AN_FUNCTION([chown], [AC_FUNC_CHOWN]) AC_DEFUN([AC_FUNC_CHOWN], -[AC_REQUIRE([AC_TYPE_UID_T])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles -AC_CACHE_CHECK([for working chown], ac_cv_func_chown_works, -[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT -#include -], -[[ char *f = "conftest.chown"; - struct stat before, after; - - if (creat (f, 0600) < 0) - return 1; - if (stat (f, &before) < 0) - return 1; - if (chown (f, (uid_t) -1, (gid_t) -1) == -1) - return 1; - if (stat (f, &after) < 0) - return 1; - return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); -]])], - [ac_cv_func_chown_works=yes], - [ac_cv_func_chown_works=no], - [case "$host_os" in # (( - # Guess yes on glibc systems. - *-gnu*) ac_cv_func_chown_works=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_chown_works=no ;; - esac]) -rm -f conftest.chown -]) -if test $ac_cv_func_chown_works = yes; then - AC_DEFINE(HAVE_CHOWN, 1, - [Define to 1 if your system has a working `chown' function.]) -fi +[ + AC_REQUIRE([AC_TYPE_UID_T])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles + AC_CACHE_CHECK([for working chown], + [ac_cv_func_chown_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT + [#include + #if defined _WIN32 && !defined __CYGWIN__ + #define creat _creat + #endif + ]], + [[ + char *f = "conftest.chown"; + struct stat before, after; + + if (creat (f, 0600) < 0) + return 1; + if (stat (f, &before) < 0) + return 1; + if (chown (f, (uid_t) -1, (gid_t) -1) == -1) + return 1; + if (stat (f, &after) < 0) + return 1; + return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); + ]]) + ], + [ac_cv_func_chown_works=yes], + [ac_cv_func_chown_works=no], + [case "$host_os" in # (( + # Guess yes on Linux systems. + linux-* | linux) ac_cv_func_chown_works="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) ac_cv_func_chown_works="guessing yes" ;; + # Guess no on native Windows. + mingw*) ac_cv_func_chown_works="guessing no" ;; + # If we don't know, assume the worst. + *) ac_cv_func_chown_works="guessing no" ;; + esac + ]) + rm -f conftest.chown + ]) + case "$ac_cv_func_chown_works" in + *yes) + AC_DEFINE([HAVE_CHOWN], [1], + [Define to 1 if your system has a working `chown' function.]) + ;; + esac ])# AC_FUNC_CHOWN -- 2.7.4 --nextPart4791662.DCV9Ri1Ezf Content-Disposition: attachment; filename="0002-Port-AC_FUNC_GETGROUPS-fixes-from-Gnulib.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0002-Port-AC_FUNC_GETGROUPS-fixes-from-Gnulib.patch" >From 9e34baba2a6ed10b31de343c25bb28e7ac8f290d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 21 Dec 2020 11:19:05 +0100 Subject: [PATCH 2/6] Port AC_FUNC_GETGROUPS fixes from Gnulib. * lib/autoconf/functions.m4 (AC_FUNC_GETGROUPS): Improve cross-compilation guesses. --- lib/autoconf/functions.m4 | 79 ++++++++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index a86048f..003e9ce 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -689,44 +689,51 @@ fi # When cross-compiling, assume getgroups is broken. AN_FUNCTION([getgroups], [AC_FUNC_GETGROUPS]) AC_DEFUN([AC_FUNC_GETGROUPS], -[AC_REQUIRE([AC_TYPE_GETGROUPS])dnl -AC_REQUIRE([AC_TYPE_SIZE_T])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles -AC_CHECK_FUNC(getgroups) +[ + AC_REQUIRE([AC_TYPE_GETGROUPS])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles + AC_CHECK_FUNC([getgroups]) -# If we don't yet have getgroups, see if it's in -lbsd. -# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. -ac_save_LIBS=$LIBS -if test $ac_cv_func_getgroups = no; then - AC_CHECK_LIB(bsd, getgroups, [GETGROUPS_LIB=-lbsd]) -fi + # If we don't yet have getgroups, see if it's in -lbsd. + # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. + ac_save_LIBS=$LIBS + if test $ac_cv_func_getgroups = no; then + AC_CHECK_LIB(bsd, getgroups, [GETGROUPS_LIB=-lbsd]) + fi -# Run the program to test the functionality of the system-supplied -# getgroups function only if there is such a function. -if test $ac_cv_func_getgroups = yes; then - AC_CACHE_CHECK([for working getgroups], ac_cv_func_getgroups_works, - [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], - [[/* On Ultrix 4.3, getgroups (0, 0) always fails. */ - return getgroups (0, 0) == -1;]])], - [ac_cv_func_getgroups_works=yes], - [ac_cv_func_getgroups_works=no], - [case "$host_os" in # (( - # Guess yes on glibc systems. - *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;; - # If we don't know, assume the worst. - *) ac_cv_func_getgroups_works="guessing no" ;; - esac]) - ]) -else - ac_cv_func_getgroups_works=no -fi -case "$ac_cv_func_getgroups_works" in - *yes) - AC_DEFINE(HAVE_GETGROUPS, 1, - [Define to 1 if your system has a working `getgroups' function.]) - ;; -esac -LIBS=$ac_save_LIBS + # Run the program to test the functionality of the system-supplied + # getgroups function only if there is such a function. + if test $ac_cv_func_getgroups = yes; then + AC_CACHE_CHECK([for working getgroups], [ac_cv_func_getgroups_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT], + [[/* On NeXTstep 3.2, getgroups (0, 0) always fails. */ + return getgroups (0, 0) == -1;]]) + ], + [ac_cv_func_getgroups_works=yes], + [ac_cv_func_getgroups_works=no], + [case "$host_os" in # (( + # Guess yes on glibc systems. + *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) ac_cv_func_getgroups_works="guessing yes" ;; + # If we don't know, assume the worst. + *) ac_cv_func_getgroups_works="guessing no" ;; + esac + ]) + ]) + else + ac_cv_func_getgroups_works=no + fi + case "$ac_cv_func_getgroups_works" in + *yes) + AC_DEFINE([HAVE_GETGROUPS], [1], + [Define to 1 if your system has a working `getgroups' function.]) + ;; + esac + LIBS=$ac_save_LIBS ])# AC_FUNC_GETGROUPS -- 2.7.4 --nextPart4791662.DCV9Ri1Ezf Content-Disposition: attachment; filename="0003-Port-minor-AC_FUNC_MBRTOWC-fixes-from-Gnulib.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0003-Port-minor-AC_FUNC_MBRTOWC-fixes-from-Gnulib.patch" >From 15afcdea97a17a48fff9c8c1bf51b9a1264916b1 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 21 Dec 2020 11:24:29 +0100 Subject: [PATCH 3/6] Port minor AC_FUNC_MBRTOWC fixes from Gnulib. * lib/autoconf/functions.m4 (AC_FUNC_MBRTOWC): Quote systematically. Don't use quadrigraphs. --- lib/autoconf/functions.m4 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 003e9ce..a74c6c4 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -1016,19 +1016,19 @@ AN_FUNCTION([mbrtowc], [AC_FUNC_MBRTOWC]) AC_DEFUN([AC_FUNC_MBRTOWC], [ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], - ac_cv_func_mbrtowc, + [ac_cv_func_mbrtowc], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( - [[@%:@include ]], + [[#include ]], [[wchar_t wc; char const s[] = ""; size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], - ac_cv_func_mbrtowc=yes, - ac_cv_func_mbrtowc=no)]) + [ac_cv_func_mbrtowc=yes], + [ac_cv_func_mbrtowc=no])]) if test $ac_cv_func_mbrtowc = yes; then - AC_DEFINE([HAVE_MBRTOWC], 1, + AC_DEFINE([HAVE_MBRTOWC], [1], [Define to 1 if mbrtowc and mbstate_t are properly declared.]) fi ]) -- 2.7.4 --nextPart4791662.DCV9Ri1Ezf Content-Disposition: attachment; filename="0004-Provide-minor-AC_FUNC_GETMNTENT-improvements-from-Gn.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0004-Provide-minor-AC_FUNC_GETMNTENT-improvements-from-Gn.patch" >From 2191713f6d145ef1c7f889fe01f08ed2b55edec8 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 21 Dec 2020 11:31:37 +0100 Subject: [PATCH 4/6] Provide minor AC_FUNC_GETMNTENT improvements from Gnulib. * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): Drop support for IRIX 4 and Dynix/ptx. --- lib/autoconf/functions.m4 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index a74c6c4..001a165 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -891,13 +891,11 @@ AU_ALIAS([AC_GETLOADAVG], [AC_FUNC_GETLOADAVG]) # ----------------- AN_FUNCTION([getmntent], [AC_FUNC_GETMNTENT]) AC_DEFUN([AC_FUNC_GETMNTENT], -[# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, -# -lseq on Dynix/PTX, -lgen on Unixware. -AC_SEARCH_LIBS(getmntent, [sun seq gen], - [ac_cv_func_getmntent=yes - AC_DEFINE([HAVE_GETMNTENT], 1, - [Define to 1 if you have the `getmntent' function.])], - [ac_cv_func_getmntent=no]) +[ + # getmntent is in the standard C library on most systems, but in -lgen on + # Unixware. + AC_SEARCH_LIBS([getmntent], [gen]) + AC_CHECK_FUNCS([getmntent]) ]) -- 2.7.4 --nextPart4791662.DCV9Ri1Ezf Content-Disposition: attachment; filename="0005-Port-AC_FUNC_OBSTACK-fixes-from-Gnulib.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0005-Port-AC_FUNC_OBSTACK-fixes-from-Gnulib.patch" >From eea496940c993b84ef5139846d891276ef0f3117 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 21 Dec 2020 11:37:04 +0100 Subject: [PATCH 5/6] Port AC_FUNC_OBSTACK fixes from Gnulib. * lib/autoconf/functions.m4 (AC_FUNC_OBSTACK): Do not assume system-supplied obstack is size_t safe. --- lib/autoconf/functions.m4 | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 001a165..c56a71a 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -1444,23 +1444,30 @@ AU_ALIAS([AC_MMAP], [AC_FUNC_MMAP]) AN_FUNCTION([obstack_init], [AC_FUNC_OBSTACK]) AN_IDENTIFIER([obstack], [AC_FUNC_OBSTACK]) AC_DEFUN([AC_FUNC_OBSTACK], -[AC_LIBSOURCES([obstack.h, obstack.c])dnl -AC_CACHE_CHECK([for obstacks], ac_cv_func_obstack, -[AC_LINK_IFELSE( - [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT - [@%:@include "obstack.h"]], - [[struct obstack mem; - @%:@define obstack_chunk_alloc malloc - @%:@define obstack_chunk_free free - obstack_init (&mem); - obstack_free (&mem, 0);]])], - [ac_cv_func_obstack=yes], - [ac_cv_func_obstack=no])]) -if test $ac_cv_func_obstack = yes; then - AC_DEFINE(HAVE_OBSTACK, 1, [Define to 1 if libc includes obstacks.]) -else - AC_LIBOBJ(obstack) -fi +[ + AC_LIBSOURCES([obstack.h, obstack.c])dnl + AC_CACHE_CHECK([for obstacks that work with any size object], + [ac_cv_func_obstack], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include "obstack.h" + void *obstack_chunk_alloc (size_t n) { return 0; } + void obstack_chunk_free (void *p) { } + /* Check that an internal function returns size_t, not int. */ + size_t _obstack_memory_used (struct obstack *); + ]], + [[struct obstack mem; + obstack_init (&mem); + obstack_free (&mem, 0); + ]])], + [ac_cv_func_obstack=yes], + [ac_cv_func_obstack=no])]) + if test "$ac_cv_func_obstack" = yes; then + AC_DEFINE([HAVE_OBSTACK], [1], + [Define to 1 if the system has obstacks that work with any size object.]) + else + AC_LIBOBJ([obstack]) + fi ])# AC_FUNC_OBSTACK -- 2.7.4 --nextPart4791662.DCV9Ri1Ezf Content-Disposition: attachment; filename="0006-Port-AC_TYPE_MBSTATE_T-fixes-from-Gnulib.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0006-Port-AC_TYPE_MBSTATE_T-fixes-from-Gnulib.patch" >From 71692c4b05af76c55bdedd90fb046346a7c84884 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 21 Dec 2020 11:40:34 +0100 Subject: [PATCH 6/6] Port AC_TYPE_MBSTATE_T fixes from Gnulib. * lib/autoconf/types.m4 (AC_TYPE_MBSTATE_T): Add support for HP-UX 11.11. Quote systematically. --- lib/autoconf/types.m4 | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4 index fff850a..05ed1d5 100644 --- a/lib/autoconf/types.m4 +++ b/lib/autoconf/types.m4 @@ -570,21 +570,25 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], # AC_TYPE_MBSTATE_T # ----------------- AC_DEFUN([AC_TYPE_MBSTATE_T], - [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t, - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT -# include ], - [mbstate_t x; return sizeof x;])], - [ac_cv_type_mbstate_t=yes], - [ac_cv_type_mbstate_t=no])]) - if test $ac_cv_type_mbstate_t = yes; then - AC_DEFINE([HAVE_MBSTATE_T], 1, - [Define to 1 if declares mbstate_t.]) - else - AC_DEFINE([mbstate_t], int, - [Define to a type if does not define.]) - fi]) +[ + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl for HP-UX 11.11 + + AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT[ + #include ]], + [[mbstate_t x; return sizeof x;]])], + [ac_cv_type_mbstate_t=yes], + [ac_cv_type_mbstate_t=no])]) + if test $ac_cv_type_mbstate_t = yes; then + AC_DEFINE([HAVE_MBSTATE_T], [1], + [Define to 1 if declares mbstate_t.]) + else + AC_DEFINE([mbstate_t], [int], + [Define to a type if does not define.]) + fi +]) # AC_TYPE_UID_T -- 2.7.4 --nextPart4791662.DCV9Ri1Ezf--