-
Notifications
You must be signed in to change notification settings - Fork 544
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scanner: Skeleton no longer includes integer limit macros.
The [U]INT{8,16,32}_{MIN,MAX} macros are never used in skeleton code. Having them in skeleton just increases the chance of conflicts in case that user defines them in non-C99 environment (see issue #307, when flex code is built in Visual C++ (before VS2013)). flexint.h is now split in two files. Only "flexint_shared.h" will be included in skeleton now, which defines flex integral types. flexint.h contains integer limits macros that would be used in flex only. Signed-off-by: Kang-Che Sung <[email protected]>
- Loading branch information
1 parent
ec4f23d
commit 5574881
Showing
4 changed files
with
32 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* flex integer type definitions */ | ||
|
||
/* Prefer C99 integer types if available. */ | ||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L | ||
/* Include <inttypes.h> and not <stdint.h> because Solaris 2.6 has the former | ||
* and not the latter. | ||
*/ | ||
#include <inttypes.h> | ||
typedef int8_t flex_int8_t; | ||
typedef uint8_t flex_uint8_t; | ||
typedef int16_t flex_int16_t; | ||
typedef uint16_t flex_uint16_t; | ||
typedef int32_t flex_int32_t; | ||
typedef uint32_t flex_uint32_t; | ||
#else | ||
typedef signed char flex_int8_t; | ||
typedef short int flex_int16_t; | ||
typedef int flex_int32_t; | ||
typedef unsigned char flex_uint8_t; | ||
typedef unsigned short int flex_uint16_t; | ||
typedef unsigned int flex_uint32_t; | ||
#endif /* ! C99 */ |