From: Theophile Ranquet Date: Thu, 6 Dec 2012 12:21:36 +0000 (+0100) Subject: cpp: improve the Flex version checking macro X-Git-Tag: v2.6.90~4 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/c49e2f153521a86f22b2631ca8a1fb6389c3a70e cpp: improve the Flex version checking macro * src/flex-scanner.h (FLEX_VERSION): Here. --- diff --git a/src/flex-scanner.h b/src/flex-scanner.h index 028082ec..dbb01dbd 100644 --- a/src/flex-scanner.h +++ b/src/flex-scanner.h @@ -21,18 +21,18 @@ # error "FLEX_PREFIX not defined" #endif -/* Whether this version of Flex is (strictly) greater than - Major.Minor.Subminor. */ +/* Flex full version as a number. */ #ifdef YY_FLEX_SUBMINOR_VERSION -# define FLEX_VERSION \ - (YY_FLEX_MAJOR_VERSION) * 1000000 \ -+ (YY_FLEX_MINOR_VERSION) * 1000 \ -+ (YY_FLEX_SUBMINOR_VERSION) +# define FLEX_VERSION \ + ((YY_FLEX_MAJOR_VERSION) * 1000000 \ + + (YY_FLEX_MINOR_VERSION) * 1000 \ + + (YY_FLEX_SUBMINOR_VERSION)) #else -# define FLEX_VERSION \ - (YY_FLEX_MAJOR_VERSION) * 1000000 \ -+ (YY_FLEX_MINOR_VERSION) * 1000 +# define FLEX_VERSION \ + ((YY_FLEX_MAJOR_VERSION) * 1000000 \ + + (YY_FLEX_MINOR_VERSION) * 1000) #endif + /* Pacify "gcc -Wmissing-prototypes" when flex 2.5.31 is used. */ # if FLEX_VERSION <= 2005031 int FLEX_PREFIX (get_lineno) (void);