From 3b809c0a1471d68d4c42500c6362653ad88efafb Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 17 May 2022 09:27:30 +0200 Subject: [PATCH] Fix compilation on MacOS X Patch by Shachar Itzhaky. * spot/parseaut/scanaut.ll, spot/parsetl/scantl.ll: Include libc-config.h instead of config.h. * NEWS: Mention the fix. * THANKS: Add Shachar. --- NEWS | 4 ++++ THANKS | 5 +++-- spot/parseaut/scanaut.ll | 11 +++++++---- spot/parsetl/scantl.ll | 11 +++++++---- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 5bc21f22d..a9804623f 100644 --- a/NEWS +++ b/NEWS @@ -87,6 +87,10 @@ New in spot 2.10.5.dev (not yet released) print_hoa() will now use state numbers matching those of the kripke_graph (issue #505). + Bug fixed: + + - Fix compilation error on MacOS X. + New in spot 2.10.5 (2022-05-03) Bugs fixed: diff --git a/THANKS b/THANKS index 4a7259d46..8a9c1b630 100644 --- a/THANKS +++ b/THANKS @@ -47,10 +47,11 @@ Paul Guénézan Reuben Rowe Roei Nahum Rüdiger Ehlers -Silien Hong -Simon Jantsch +Shachar Itzhaky Shengping Shaw Shufang Zhu +Silien Hong +Simon Jantsch Sonali Dutta Tereza Šťastná Tobias Meggendorfer. diff --git a/spot/parseaut/scanaut.ll b/spot/parseaut/scanaut.ll index 8cccaec0e..711c74c64 100644 --- a/spot/parseaut/scanaut.ll +++ b/spot/parseaut/scanaut.ll @@ -25,12 +25,15 @@ /* %option debug */ %top{ -#include "config.h" +#include "libc-config.h" /* Flex 2.6.4's test for 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 gets - included. */ + its own integer types, including a broken SIZE_MAX definition that + breaks compilation on OpenBSD. So let's define __STDC_VERSION__ to + make sure gets included. Redefining __STDC_VERSION__ + this way can break all sort of macros defined in , so + we include "libc-config.h" instead of "config.h" above to define + those macros first. */ #if HAVE_INTTYPES_H && !(defined __STDC_VERSION__) # define __STDC_VERSION__ 199901L #endif diff --git a/spot/parsetl/scantl.ll b/spot/parsetl/scantl.ll index 871f1300d..33667a849 100644 --- a/spot/parsetl/scantl.ll +++ b/spot/parsetl/scantl.ll @@ -27,12 +27,15 @@ %option never-interactive %top{ -#include "config.h" +#include "libc-config.h" /* Flex 2.6.4's test for 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 gets - included. */ + its own integer types, including a broken SIZE_MAX definition that + breaks compilation on OpenBSD. So let's define __STDC_VERSION__ to + make sure gets included. Redefining __STDC_VERSION__ + this way can break all sort of macros defined in , so + we include "libc-config.h" instead of "config.h" above to define + those macros first. */ #if HAVE_INTTYPES_H && !(defined __STDC_VERSION__) # define __STDC_VERSION__ 199901L #endif