[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2
From: |
Akim Demaille |
Subject: |
Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2 |
Date: |
Sun, 24 Oct 2021 09:15:57 +0200 |
Hi Dennis,
> Le 21 oct. 2021 à 03:58, Dennis Clarke <dclarke@blastwave.org> a écrit :
>
>>> #define _XOPEN_SOURCE 600
>>
>> Would that be the difference? If you define this early enough in
>> the original test case, does it work properly?
>>
>> I have attached "without-my-strdup.y", that must be installed as
>> mfcalc.y, for convenience.
> PASS: examples/c/mfcalc/mfcalc.test
> PASS: examples/c/rpcalc/rpcalc.test
> SKIP: examples/c/bistromathic/bistromathic.test
> PASS: examples/c/calc/calc.test
> FAIL: examples/c/glr/c++-types.test
> PASS: examples/c/lexcalc/lexcalc.test
> PASS: examples/c/pushcalc/calc.test
> SKIP: examples/c/reccalc/reccalc.test
Good. I have installed the following patch. Amusingly enough strdup is the
example chosen to explain _XOPEN_SOURCE on this answer on SO:
https://stackoverflow.com/a/5724485.
Could you please try this tarball?
https://www.lrde.epita.fr/~akim/private/bison/bison-3.8.2.6-59bb.tar.gz
https://www.lrde.epita.fr/~akim/private/bison/bison-3.8.2.6-59bb.tar.lz
https://www.lrde.epita.fr/~akim/private/bison/bison-3.8.2.6-59bb.tar.xz
Thanks!
commit ff9771d26e5e387cde51393d97d4f8d42837a25a
Author: Akim Demaille <akim.demaille@gmail.com>
Date: Sat Oct 23 06:01:44 2021 +0200
examples: address portability issues about strdup
Reported by Dennis Clarke
<https://lists.gnu.org/r/bug-bison/2021-10/msg00005.html>.
In particular
<https://lists.gnu.org/r/bug-bison/2021-10/msg00023.html>.
* doc/bison.texi, examples/c/glr/c++-types.y (_XOPEN_SOURCE): Define
to 600, to get a strdup that works on Solaris.
diff --git a/doc/bison.texi b/doc/bison.texi
index a559649c..77357813 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -2644,6 +2644,13 @@ @node Mfcalc Declarations
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+%code top {
+ /* Portability issues for strdup. */
+#ifndef _XOPEN_SOURCE
+# define _XOPEN_SOURCE 600
+#endif
+}
@end example
@end ignore
@@ -2875,7 +2882,7 @@ @node Mfcalc Symbol Table
not make these assumptions. */
#include <assert.h>
#include <stdlib.h> /* malloc, realloc. */
-#include <string.h> /* strlen. */
+#include <string.h> /* strdup, strlen. */
@end group
@group
diff --git a/examples/c/glr/c++-types.y b/examples/c/glr/c++-types.y
index 3a14d9bf..232d0112 100644
--- a/examples/c/glr/c++-types.y
+++ b/examples/c/glr/c++-types.y
@@ -53,6 +53,10 @@
%code
{
+ /* Portability issues for strdup. */
+#ifndef _XOPEN_SOURCE
+# define _XOPEN_SOURCE 600
+#endif
#include <assert.h>
#include <ctype.h>
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, (continued)
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, Akim Demaille, 2021/10/09
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, Dennis Clarke, 2021/10/12
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, Akim Demaille, 2021/10/13
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, Dennis Clarke, 2021/10/13
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, Akim Demaille, 2021/10/13
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, Dennis Clarke, 2021/10/13
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, Akim Demaille, 2021/10/14
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, Dennis Clarke, 2021/10/14
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, Akim Demaille, 2021/10/19
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, Dennis Clarke, 2021/10/20
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2,
Akim Demaille <=
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, Akim Demaille, 2021/10/25
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, Paul Eggert, 2021/10/13
- Re: Testsuite summary for GNU Bison 3.8.2 : FAIL 2, Akim Demaille, 2021/10/13