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=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,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 B287D1F9FC for ; Fri, 19 Mar 2021 02:51:17 +0000 (UTC) Received: from localhost ([::1]:39820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lN5EK-0003jI-Kp for normalperson@yhbt.net; Thu, 18 Mar 2021 22:51:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lN5EH-0003ix-DO for bug-gnulib@gnu.org; Thu, 18 Mar 2021 22:51:13 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.21]:28125) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lN5EF-0003Bo-7o for bug-gnulib@gnu.org; Thu, 18 Mar 2021 22:51:13 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1616122266; cv=none; d=strato.com; s=strato-dkim-0002; b=bjCRbxB9JVAVJ1DEAIb/fmS6gdpTH0sD/+7Q28NDHVT64bVAZBj6uFN6UkOhowDfoi Tpj26mwbGpcoHBsnki4PhGEmFPfw0vuL9+ZMxkgjYBJUJQMUfBQwUUhz03BbKdUSrbUU mhQzObnUmA0PwgyCRNt2aEJbzGSW4WeEjt9PBapg2reF1mvHeGCxhfCkQD97FT2P9+fa 9ATIVgcezCoj53V6sjr0ix0sW75l0qcRZIld2bit+NdqllYpm55B2Q2W9Ati+e7r3Rpa NLltjXZlJKsvFxPdGDgYlrXTu3TMFmL2kcuWZDj/XBF4xZy4B6bh+GlaP8H2YFDio3UZ uguA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1616122266; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=0hem1Xne1gEMi8HxkJHqSW2YKkv4RjaKgiAAeojsqOM=; b=kOtaY33CfV6BpssNFvRnBsURpIIF1758VwWAoohjfwcxTjUKcfJ8jNsv7vKonicPL9 rz12dMNrEgasb12e7MU+0c1JUOLC2Z11ye5QYbtaeKiVpFVefkXX4G+jzpfHwqHtVtaD 4YBFEHANoln0rYJe4MrVPXxdrmaNVVlvMX0JPC5LYYmlcvkfp6a2RNPW1Cg/aFbX/DBG hlXxYSaMe7oCY2d+sruioVXApYtdAva15+tL4z7Ns4kjwr022hrshKomkbtayGZDPRsn RWC0aDELf/ZtfbkK2x+XJQcpFq/9ZU6Ft/rD5JU17+9zcv8PWiq+RrXFQLthAK2iUFQ+ JZlA== ARC-Authentication-Results: i=1; strato.com; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1616122266; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=0hem1Xne1gEMi8HxkJHqSW2YKkv4RjaKgiAAeojsqOM=; b=S5E2rmeda+cTZajZ14IhKINL+RwoveHJZm6x2lsoMEnepWAQGiGj0JLRt2LcUwH8s+ K+icQuJNYaWuoFsf0O//tiTcUh82YqIGw8x/EqyQE9PSJ0bM8PA3kJYo//ys3u4AccxS O9Qb8uUgwxq+mHUOzK36l2D7t/XhmQj+A9l7m02lha8hB5dJn6Gbz+fioNaDpeiWP9PS ekqj+fIzFmT792FSmHhojbeIMZHTeHXLC2HNbh6fUhzr/eJywzquqrlhvmBNuU8seO61 hb20tuQsThK1+OZCGmtV74q+EFHpzhfS9I4tJaCR5m6biOJjrQ4AESp3R5y4VyLS/McA E3yQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqf0y5JW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.21.0 DYNA|AUTH) with ESMTPSA id t05ec5x2J2p57Oh (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); Fri, 19 Mar 2021 03:51:05 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org Subject: Re: test-simple-atomic.c compilation error on Solaris Date: Fri, 19 Mar 2021 03:51:05 +0100 Message-ID: <1905210.KEeumH3cFL@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-203-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <7ccb90d4-400f-10e8-bb06-1b002fcc836e@jupiterrise.com> References: <7ccb90d4-400f-10e8-bb06-1b002fcc836e@jupiterrise.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.21; envelope-from=bruno@clisp.org; helo=mo4-p00-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, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-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: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi Tom, > The test-simple-atomic test is failing to build on Solaris (tested 10 > and older). > > Here's the error from Solaris 10: > > make[3]: Entering directory > `/export/home/tgc/tmp/daily_build/gnulib/000-gnulib-simple-363497c93/gltests' > depbase=`echo test-simple-atomic.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ > /usr/tgcware/gcc9/bin/gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I.. > -DGNULIB_STRICT_CHECKING=1 -DIN_GNULIB_TESTS=1 -I. -I. -I.. -I./.. > -I../gllib -I./../gllib -I/usr/tgcware/include -D_REENTRANT -g -O2 -MT > test-simple-atomic.o -MD -MP -MF $depbase.Tpo -c -o test-simple-atomic.o > test-simple-atomic.c &&\ > mv -f $depbase.Tpo $depbase.Po > In file included from ../gllib/unistd.h:40, > from ../gllib/stdlib.h:100, > from ../gllib/glthread/thread.h:74, > from test-simple-atomic.c:43: > /usr/include/unistd.h:542:23: error: macro "yield" passed 1 arguments, > but takes just 0 > 542 | extern void yield(void); > | ^ > test-simple-atomic.c:38: note: macro "yield" defined here > 38 | # define yield() gl_thread_yield () > | > make[3]: *** [test-simple-atomic.o] Error 1 > make[3]: Target `check-am' not remade because of errors. I can reproduce it with a testdir of all of gnulib. This patch fixes it. 2021-03-18 Bruno Haible simple-atomic tests: Fix compilation error on Solaris 10. Reported by Tom G. Christensen in . * tests/test-simple-atomic.c (yield): Define only after all #includes. diff --git a/tests/test-simple-atomic.c b/tests/test-simple-atomic.c index 04baf05..e30506a 100644 --- a/tests/test-simple-atomic.c +++ b/tests/test-simple-atomic.c @@ -34,17 +34,17 @@ implementation. */ #define REPEAT_COUNT 1000 +#include "glthread/thread.h" +#include "glthread/yield.h" + +#include "macros.h" + #if EXPLICIT_YIELD # define yield() gl_thread_yield () #else # define yield() #endif -#include "glthread/thread.h" -#include "glthread/yield.h" - -#include "macros.h" - /* Counters for each thread. */ static unsigned int counter[THREAD_COUNT][5];