From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 05 09:41:11 2012 Received: (at submit) by debbugs.gnu.org; 5 Apr 2012 13:41:11 +0000 Received: from localhost ([127.0.0.1]:40997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SFmw2-0002Ax-Jv for submit@debbugs.gnu.org; Thu, 05 Apr 2012 09:41:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60200) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SFmvz-0002Aq-TV for submit@debbugs.gnu.org; Thu, 05 Apr 2012 09:41:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFmvM-0000ii-SP for submit@debbugs.gnu.org; Thu, 05 Apr 2012 09:40:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFmvM-0000ia-N1 for submit@debbugs.gnu.org; Thu, 05 Apr 2012 09:40:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFmvG-0000Y4-HQ for bug-automake@gnu.org; Thu, 05 Apr 2012 09:40:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFmv6-0000h7-Rj for bug-automake@gnu.org; Thu, 05 Apr 2012 09:40:21 -0400 Received: from mail-ee0-f41.google.com ([74.125.83.41]:44718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFmv6-0000fk-J6 for bug-automake@gnu.org; Thu, 05 Apr 2012 09:40:12 -0400 Received: by eeke53 with SMTP id e53so481348eek.0 for ; Thu, 05 Apr 2012 06:40:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=wdmm7uedj17TNTpPwxNlWXWuuS+f5IQYbZtCmvuyYJ8=; b=JQYfNUu8XMGNsvGyEc7IvZtL+r7sYz/7BkLBmFgNnLx0bJwx2uILd4mAbLWIdXHkj4 sW2LWuCyFHPaKcfmSQrUMLNmFo2ywDbwhH/GdzsVegD6XewnieXY+E9KF4T+tp7Fqtfr mm7vNyhibra3ZvlYrKI6GGGqJSnIRTtbJlrhhomTXgFRTaTTtdH/ZUcsNkVcBwdKSrXE ADZgX+PawyZZIbYAF5W+7PB4yBQlY2WhZcDDRY5QIs98qCPdayrYmAsP31uQJ7mHbB1b ybNYGVYHhtsAg6UB0PabRNrY1S0iEqXMnNq9j2Jsq0TArteDm4/NxpyLmKGcFdkqbvZE NH1A== Received: by 10.14.185.143 with SMTP id u15mr551682eem.94.1333633205726; Thu, 05 Apr 2012 06:40:05 -0700 (PDT) Received: from [87.21.62.195] (host195-62-dynamic.21-87-r.retail.telecomitalia.it. [87.21.62.195]) by mx.google.com with ESMTPS id y11sm13360663eem.3.2012.04.05.06.40.02 (version=SSLv3 cipher=OTHER); Thu, 05 Apr 2012 06:40:03 -0700 (PDT) Message-ID: <4F7DA0B0.1050307@gmail.com> Date: Thu, 05 Apr 2012 15:40:00 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: bug-automake@gnu.org Subject: flex %option "never-interactive" breaks few tests on Solaris Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit Cc: Peter Rosin X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) Severity: minor thanks Hello automakers, Peter. The commit v1.11-2058-g6f4b08d of 06-03-2012, "tests: explicitly state that our lexers do not require unistd.h", has been causing at least the tests 'lex-clean-cxx.test' and 'lex-depend-cxx.test' to break on Solaris, where lex is not flex, and does not understand the directive "%option never-interactive". Any opinion on how to better fix this? Is defining a dummy 'isatty' function in our C++ sources enough to avoid the failures on MSYS? Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 05 15:23:40 2012 Received: (at submit) by debbugs.gnu.org; 5 Apr 2012 19:23:40 +0000 Received: from localhost ([127.0.0.1]:41777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SFsHU-0001Xk-07 for submit@debbugs.gnu.org; Thu, 05 Apr 2012 15:23:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56671) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SFsHR-0001Xc-B9 for submit@debbugs.gnu.org; Thu, 05 Apr 2012 15:23:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFsGn-0002Lm-8r for submit@debbugs.gnu.org; Thu, 05 Apr 2012 15:23:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:54545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFsGn-0002La-5e for submit@debbugs.gnu.org; Thu, 05 Apr 2012 15:22:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFsGk-0006wV-V0 for bug-automake@gnu.org; Thu, 05 Apr 2012 15:22:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFsGj-0002Kx-3C for bug-automake@gnu.org; Thu, 05 Apr 2012 15:22:54 -0400 Received: from mail.lysator.liu.se ([130.236.254.3]:47714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFsGi-0002KW-SZ for bug-automake@gnu.org; Thu, 05 Apr 2012 15:22:53 -0400 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id E128740019; Thu, 5 Apr 2012 21:22:49 +0200 (CEST) Received: from [192.168.0.150] (h57n3fls301o1095.telia.com [81.230.178.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id A938340009; Thu, 5 Apr 2012 21:22:49 +0200 (CEST) Message-ID: <4F7DF10A.6090903@lysator.liu.se> Date: Thu, 05 Apr 2012 21:22:50 +0200 From: Peter Rosin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Stefano Lattarini Subject: Re: flex %option "never-interactive" breaks few tests on Solaris References: <4F7DA0B0.1050307@gmail.com> In-Reply-To: <4F7DA0B0.1050307@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit Cc: bug-automake@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) On 2012-04-05 15:40, Stefano Lattarini wrote: > Severity: minor > thanks > > Hello automakers, Peter. > > The commit v1.11-2058-g6f4b08d of 06-03-2012, "tests: explicitly state > that our lexers do not require unistd.h", has been causing at least > the tests 'lex-clean-cxx.test' and 'lex-depend-cxx.test' to break on > Solaris, where lex is not flex, and does not understand the directive > "%option never-interactive". > > Any opinion on how to better fix this? Is defining a dummy 'isatty' > function in our C++ sources enough to avoid the failures on MSYS? Yes, the test still passes with MSVC and the below patch. I have little time at the moment, so if this works elsewhere and if someone else can wrap it all up with a decent commit message etc, that would probably be fastest approach. It does not work to add the isatty function down by yywrap, it probably works if you add a forward declaration where I put the function, but the function is so small that I thought that was pretty pointless. However, I am *not* fluent in lex, so what do I know? Cheers, Peter diff --git a/tests/lex-clean-cxx.test b/tests/lex-clean-cxx.test index 9ff2dbc..32ab327 100755 --- a/tests/lex-clean-cxx.test +++ b/tests/lex-clean-cxx.test @@ -55,8 +55,11 @@ END cat > parsefoo.lxx << 'END' %{ #define YY_NO_UNISTD_H 1 +int isatty (int fd) +{ + return 0; +} %} -%option never-interactive %% "GOOD" return EOF; . From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 06 17:35:16 2012 Received: (at 11185) by debbugs.gnu.org; 6 Apr 2012 21:35:17 +0000 Received: from localhost ([127.0.0.1]:42894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SGGoO-0005o0-BY for submit@debbugs.gnu.org; Fri, 06 Apr 2012 17:35:16 -0400 Received: from rila.superhosting.bg ([91.196.124.212]:45688) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SGGoL-0005np-9c for 11185@debbugs.gnu.org; Fri, 06 Apr 2012 17:35:14 -0400 Received: from [78.128.48.21] (helo=[192.168.0.10]) by rila.superhosting.bg with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1SGGne-0023OO-Kw; Sat, 07 Apr 2012 00:34:30 +0300 Message-ID: <4F7F6164.20006@roumenpetrov.info> Date: Sat, 07 Apr 2012 00:34:28 +0300 From: Roumen Petrov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120314 Firefox/11.0 SeaMonkey/2.8 MIME-Version: 1.0 To: Stefano Lattarini Subject: Re: bug#11185: flex %option "never-interactive" breaks few tests on Solaris References: <4F7DA0B0.1050307@gmail.com> In-Reply-To: <4F7DA0B0.1050307@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - rila.superhosting.bg X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roumenpetrov.info X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11185 Cc: Peter Rosin , 11185@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Hi Stefano, Stefano Lattarini wrote: > Severity: minor > thanks > > Hello automakers, Peter. > > The commit v1.11-2058-g6f4b08d of 06-03-2012, "tests: explicitly state > that our lexers do not require unistd.h", has been causing at least > the tests 'lex-clean-cxx.test' and 'lex-depend-cxx.test' to break on > Solaris, where lex is not flex, and does not understand the directive > "%option never-interactive". > > Any opinion on how to better fix this? Is defining a dummy 'isatty' > function in our C++ sources enough to avoid the failures on MSYS? Function isatty is defined in . May be you could define a dummy function. > Regards, > Stefano Roumen From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 08 18:14:09 2012 Received: (at 11185) by debbugs.gnu.org; 8 Apr 2012 22:14:09 +0000 Received: from localhost ([127.0.0.1]:45086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SH0N7-0000Cp-AJ for submit@debbugs.gnu.org; Sun, 08 Apr 2012 18:14:09 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:60559) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SH0N4-0000Cg-5F for 11185@debbugs.gnu.org; Sun, 08 Apr 2012 18:14:07 -0400 Received: by wgbdq11 with SMTP id dq11so3378555wgb.15 for <11185@debbugs.gnu.org>; Sun, 08 Apr 2012 15:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=srzmL+2MAywY5sDdc+iJMHrb6+bKCRwXlFNpsNOPeic=; b=kDyrUfAdz2VPtW9j8rjgkyHTLTfWL4B/6PZ+0TLxTrzelKtgpGYREZ4tEUjQIGN/d/ 71+SwJ/VijnxYZlh4zAtqj301wrJ6U362ntAWZhdPblZewzQ8fiJg5E/CquLdnhiHMg4 iXAnicrcukwQyp6o8gfDarthrL0V9bTXc/3MfqlulRuNpWmhkFvjGCaVW1bhF2/88Jnf NUI0FD/pY/f9LPc0fgqkwtuEh4dMMuXLhoMB6TnY0Cyu5K3NCMI040ANPvzh3Rhi5ZYM Dh1EOZk/U6dfhWzXxH1eYRdgBLTIXg3TpbKVclpiWZOzqXNMurSylCJzpd0iZ8FdAmbm +RvA== Received: by 10.180.95.74 with SMTP id di10mr13213458wib.1.1333923192924; Sun, 08 Apr 2012 15:13:12 -0700 (PDT) Received: from [87.2.95.200] (host200-95-dynamic.2-87-r.retail.telecomitalia.it. [87.2.95.200]) by mx.google.com with ESMTPS id n8sm41160078wix.10.2012.04.08.15.13.10 (version=SSLv3 cipher=OTHER); Sun, 08 Apr 2012 15:13:11 -0700 (PDT) Message-ID: <4F820D67.6050602@gmail.com> Date: Mon, 09 Apr 2012 00:12:55 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Roumen Petrov Subject: Re: bug#11185: flex %option "never-interactive" breaks few tests on Solaris References: <4F7DA0B0.1050307@gmail.com> <4F7F6164.20006@roumenpetrov.info> In-Reply-To: <4F7F6164.20006@roumenpetrov.info> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11185 Cc: Peter Rosin , 11185@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 04/06/2012 11:34 PM, Roumen Petrov wrote: > Hi Stefano, > Hi Roumen, sorry for the delay. > Stefano Lattarini wrote: >> Severity: minor >> thanks >> >> Hello automakers, Peter. >> >> The commit v1.11-2058-g6f4b08d of 06-03-2012, "tests: explicitly state >> that our lexers do not require unistd.h", has been causing at least >> the tests 'lex-clean-cxx.test' and 'lex-depend-cxx.test' to break on >> Solaris, where lex is not flex, and does not understand the directive >> "%option never-interactive". >> >> Any opinion on how to better fix this? Is defining a dummy 'isatty' >> function in our C++ sources enough to avoid the failures on MSYS? > Function isatty is defined in . > Which doesn't exist on most POSIX systems AFAIK, so trying to include it would be problematic. > May be you could define a dummy function. > I think this is the best solution, yes. See my answer to Peter's message. Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 08 18:24:52 2012 Received: (at 11185) by debbugs.gnu.org; 8 Apr 2012 22:24:52 +0000 Received: from localhost ([127.0.0.1]:45094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SH0XT-0000Rg-K0 for submit@debbugs.gnu.org; Sun, 08 Apr 2012 18:24:51 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:40681) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SH0XR-0000RW-Ar; Sun, 08 Apr 2012 18:24:50 -0400 Received: by wgbds11 with SMTP id ds11so1729880wgb.3 for ; Sun, 08 Apr 2012 15:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; bh=lapFxklIs2X/QCzBNLp/KvBgVwO+hCFTX3PsuiA490g=; b=0Hf8GS2H5fHxNxFSV6hAwgp8cmRlAo1To9AP/a/hLuBanRTU590zOlfaM+5IFwEjvq mwBMS+e3yWax/c4FmdLSIntxPJqwyaJLiWM504ZPY9Ze6a6iRsXCxJEIv9rDux4RHNl9 A6iNnGctiqA54a5JUAIZf0tgvrMOYLhuMjNCC039fXJ5567MRvz7pD+/qq2m2qFIw4C+ PfPqlUlPnJ6tV/3pGTO/pOHiKI8xE/H1PZZM50hLgT3ZQiPEnLaS46tCqouYAY4Qhfn2 3/QHkFskSt3FcZm+mKUY6hc9/+heK5yWz5QaUDre0bAdStqKyVz01K4wDiFvpfNDm4z+ CKBg== Received: by 10.216.132.169 with SMTP id o41mr2883339wei.121.1333923836313; Sun, 08 Apr 2012 15:23:56 -0700 (PDT) Received: from [87.2.95.200] (host200-95-dynamic.2-87-r.retail.telecomitalia.it. [87.2.95.200]) by mx.google.com with ESMTPS id n8sm41252177wix.10.2012.04.08.15.23.54 (version=SSLv3 cipher=OTHER); Sun, 08 Apr 2012 15:23:55 -0700 (PDT) Message-ID: <4F820FF8.8010307@gmail.com> Date: Mon, 09 Apr 2012 00:23:52 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Peter Rosin Subject: Re: bug#11185: flex %option "never-interactive" breaks few tests on Solaris References: <4F7DA0B0.1050307@gmail.com> <4F7DF10A.6090903@lysator.liu.se> In-Reply-To: <4F7DF10A.6090903@lysator.liu.se> Content-Type: multipart/mixed; boundary="------------040908030403020101030404" X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11185 Cc: 11185@debbugs.gnu.org, "automake-patches@gnu.org" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) This is a multi-part message in MIME format. --------------040908030403020101030404 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit tags 11185 + patch close 11185 thanks On 04/05/2012 09:22 PM, Peter Rosin wrote: > On 2012-04-05 15:40, Stefano Lattarini wrote: >> Severity: minor >> thanks >> >> Hello automakers, Peter. >> >> The commit v1.11-2058-g6f4b08d of 06-03-2012, "tests: explicitly state >> that our lexers do not require unistd.h", has been causing at least >> the tests 'lex-clean-cxx.test' and 'lex-depend-cxx.test' to break on >> Solaris, where lex is not flex, and does not understand the directive >> "%option never-interactive". >> >> Any opinion on how to better fix this? Is defining a dummy 'isatty' >> function in our C++ sources enough to avoid the failures on MSYS? > > Yes, the test still passes with MSVC and the below patch. > > [SNIP] > Thanks. I've pushed the attached patch to master, which should fix the problem. I'm thus closing this bug report. Regards, Stefano --------------040908030403020101030404 Content-Type: text/x-diff; name="0001-tests-avoid-spurious-failures-with-non-flex-lex-prog.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-tests-avoid-spurious-failures-with-non-flex-lex-prog.pa"; filename*1="tch" >From 7f2bc63991aeed6ddec5f28dc2162a281ff8ee3d Mon Sep 17 00:00:00 2001 Message-Id: <7f2bc63991aeed6ddec5f28dc2162a281ff8ee3d.1333923797.git.stefano.lattarini@gmail.com> From: Stefano Lattarini Date: Mon, 9 Apr 2012 00:17:48 +0200 Subject: [PATCH] tests: avoid spurious failures with non-flex 'lex' programs and C++ This change fixes automake bug#11185. The commit v1.11-2058-g6f4b08d of 06-03-2012, "tests: explicitly state that our lexers do not require unistd.h" has broken the tests 'lex-clean-cxx.test' and 'lex-depend-cxx.test' on Solaris, where lex is not flex and does not understand the "%option never-interactive" directive. Remove the use of this directive, resorting to defining a dummy 'isatty()' function instead to keep the flex-generated tests able to compile also on MinGW/MSYS. * tests/lex-clean-cxx.test (parsefoo.lxx): Define a dummy 'isatty()' function. * tests/lex-depend-cxx.test (joe.ll): Likewise. * tests/README: Adjust. Fix an unrelated typo since we are at it. Co-authored-by: Peter Rosin Signed-off-by: Stefano Lattarini --- tests/README | 4 ++-- tests/lex-clean-cxx.test | 2 +- tests/lex-depend-cxx.test | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/README b/tests/README index 33a653c..b7009ca 100644 --- a/tests/README +++ b/tests/README @@ -268,9 +268,9 @@ Do %{ #define YY_NO_UNISTD_H 1 %} - to accomodate non-ANSI systems, since GNU flex generates code that + to accommodate non-ANSI systems, since GNU flex generates code that includes unistd.h otherwise. Also add: - %option never-interactive + static int isatty (int fd) { return 0; } to the definitions section if the generated code is to be compiled by a C++ compiler, for similar reasons (i.e., the isatty(3) function from that same unistd.h header would be required otherwise). diff --git a/tests/lex-clean-cxx.test b/tests/lex-clean-cxx.test index 9ff2dbc..4089f0e 100755 --- a/tests/lex-clean-cxx.test +++ b/tests/lex-clean-cxx.test @@ -55,8 +55,8 @@ END cat > parsefoo.lxx << 'END' %{ #define YY_NO_UNISTD_H 1 +static int isatty (int fd) { return 0; } %} -%option never-interactive %% "GOOD" return EOF; . diff --git a/tests/lex-depend-cxx.test b/tests/lex-depend-cxx.test index 5249102..8e7a239 100755 --- a/tests/lex-depend-cxx.test +++ b/tests/lex-depend-cxx.test @@ -48,8 +48,8 @@ END cat > joe.ll << 'END' %{ #define YY_NO_UNISTD_H 1 +static int isatty (int fd) { return 0; } %} -%option never-interactive %% "foo" return EOF; . -- 1.7.9 --------------040908030403020101030404-- From unknown Sat Sep 06 14:23:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 07 May 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator