work around an issue in Flex 2.6.4
The fallback definition of SIZE_MAX supplied by flex was not preprocessor friendly and prevented robin_hood.hh from doing "#if SIZE_MAX == UINT64_MAX", as observed by Marc Espie on OpenBSD. * spot/parseaut/scanaut.ll, spot/parsetl/scantl.ll: Define __STDC_VERSION__ just so that the code generated by Flex include <inttypes.h>. * NEWS: Mention the bug. * THANKS: Add Marc.
This commit is contained in:
parent
3f9f6029e7
commit
cdc89dad16
4 changed files with 22 additions and 2 deletions
3
NEWS
3
NEWS
|
|
@ -62,6 +62,9 @@ New in spot 2.10.4.dev (net yet released)
|
||||||
- reduce_parity() produced incorrect results when applied to
|
- reduce_parity() produced incorrect results when applied to
|
||||||
automata with deleted edges.
|
automata with deleted edges.
|
||||||
|
|
||||||
|
- work around a portability issue in Flex 2.6.4 preventing
|
||||||
|
compilation on OpenBSD.
|
||||||
|
|
||||||
New in spot 2.10.4 (2022-02-01)
|
New in spot 2.10.4 (2022-02-01)
|
||||||
|
|
||||||
Bug fixed:
|
Bug fixed:
|
||||||
|
|
|
||||||
1
THANKS
1
THANKS
|
|
@ -31,6 +31,7 @@ Joachim Klein
|
||||||
Juan Tzintzun
|
Juan Tzintzun
|
||||||
Juraj Major
|
Juraj Major
|
||||||
Kristin Y. Rozier
|
Kristin Y. Rozier
|
||||||
|
Marc Espie
|
||||||
Martin Dieguez Lodeiro
|
Martin Dieguez Lodeiro
|
||||||
Matthias Heizmann
|
Matthias Heizmann
|
||||||
Maxime Bouton
|
Maxime Bouton
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,14 @@
|
||||||
/* %option debug */
|
/* %option debug */
|
||||||
%top{
|
%top{
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
/* Flex 2.6.4's test for <inttypes.h> relies on __STDC_VERSION__
|
||||||
|
which is undefined in C++. So without that, it will define
|
||||||
|
its own integer types, including a broken SIZE_MAX definition.
|
||||||
|
So let's define __STDC_VERSION__ to make sure <inttypes.h> gets
|
||||||
|
included. */
|
||||||
|
#if HAVE_INTTYPES_H && !(defined __STDC_VERSION__)
|
||||||
|
# define __STDC_VERSION__ 199901L
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
%{
|
%{
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*- coding: utf-8 -*-
|
/* -*- coding: utf-8 -*-
|
||||||
** Copyright (C) 2010-2015, 2017-2019, 2021, Laboratoire de Recherche
|
** Copyright (C) 2010-2015, 2017-2019, 2021-2022, Laboratoire de
|
||||||
** et Développement de l'Epita (LRDE).
|
** Recherche et Développement de l'Epita (LRDE).
|
||||||
** Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6
|
** Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6
|
||||||
** (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
|
** (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
|
||||||
** Pierre et Marie Curie.
|
** Pierre et Marie Curie.
|
||||||
|
|
@ -28,6 +28,14 @@
|
||||||
|
|
||||||
%top{
|
%top{
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
/* Flex 2.6.4's test for <inttypes.h> relies on __STDC_VERSION__
|
||||||
|
which is undefined in C++. So without that, it will define
|
||||||
|
its own integer types, including a broken SIZE_MAX definition.
|
||||||
|
So let's define __STDC_VERSION__ to make sure <inttypes.h> gets
|
||||||
|
included. */
|
||||||
|
#if HAVE_INTTYPES_H && !(defined __STDC_VERSION__)
|
||||||
|
# define __STDC_VERSION__ 199901L
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
%{
|
%{
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue