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-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,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 964F61F45A for ; Mon, 24 Oct 2022 02:04:38 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=clisp.org header.i=@clisp.org header.b="hHS5CvE0"; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ommij-00059D-Ff for normalperson@yhbt.net; Sun, 23 Oct 2022 21:57:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omcFy-0002kv-IO for bug-gnulib@gnu.org; Sun, 23 Oct 2022 10:47:23 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.52]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omcFw-0004As-6x for bug-gnulib@gnu.org; Sun, 23 Oct 2022 10:47:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1666536432; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=rQ/rrbI3cOIB0WQxxW8bud5qE1gTT7ym/tnLKWVjsXE=; b=hHS5CvE0EnyxE5Ob8iEROC1cIFn5qRb5ng5ZjT/ml7IM1xE3jm1sf3vf8HZQi5zCof QtPCqAKdk8kRO5SuVwgdRoGSBb4AeVoMGPouOGUtoHIY4FeS2KYhzGhT1t9x5XKZrG3S HpsnPPM6jwutReLrqgk7cdp1zuJxBLvD+uJ8RTozonSaUpsdOalkhH7wQ3rb6xSY0Kj6 E49n6RUwuRwGzGXR5W44/N8iTMR7YUEOuvs2lc+A2wAx1rLyvtJr+zURlDmwCFUiEvYb bBaN2/fQgwsKpNDQSRGTzHVMHg31kTxtIQ1hAsimxYv/tQCzHVvWOPOh96unuuUbyd0C PBNA== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpPH2qFfOFD5cfDRgIUXREU3RjutJQ==" X-RZG-CLASS-ID: mo00 Received: from nimes.localnet by smtp.strato.de (RZmta 48.2.0 AUTH) with ESMTPSA id kad0d1y9NElCAk3 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 23 Oct 2022 16:47:12 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: assert-h: Make static_assert work on Solaris 11.4 Date: Sun, 23 Oct 2022 16:47:12 +0200 Message-ID: <34013532.ATrlOLLGV9@nimes> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.52; envelope-from=bruno@clisp.org; helo=mo4-p01-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" The GNU sed prerelease testing [1] and the GNU texinfo prerelease testing [2] have revealed compilation errors on Solaris 11.4, due to the use of 'static_assert'. The of Solaris 11.4 defines it in such a way that it can only be invoked with 2 arguments. However, since 2022-09-13, many Gnulib source files use 'static_assert' with 1 argument only. [1] https://lists.gnu.org/archive/html/sed-devel/2022-10/msg00004.html [2] https://lists.gnu.org/archive/html/bug-texinfo/2022-10/msg00188.html This patch fixes it. 2022-10-23 Bruno Haible assert-h: Make static_assert work on Solaris 11.4. * m4/assert_h.m4 (gl_ASSERT_H): After including , on Solaris, redefine static_assert. diff --git a/m4/assert_h.m4 b/m4/assert_h.m4 index c1306daef4..e892ea2f01 100644 --- a/m4/assert_h.m4 +++ b/m4/assert_h.m4 @@ -57,5 +57,11 @@ AC_DEFUN([gl_ASSERT_H], && __GNUG__ < 6 && __clang_major__ < 6))) #include #undef/**/assert + /* Solaris 11.4 defines static_assert as a macro with 2 arguments. + We need it also to be invocable with a single argument. */ + #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus + #undef static_assert + #define static_assert _Static_assert + #endif #endif]) ])