Fix build error on MinGW, bug1460.

This commit is contained in:
Wilson Snyder 2019-06-11 21:38:17 -04:00
parent 77c2d49d1a
commit 2cedd14d43
3 changed files with 8 additions and 4 deletions

View File

@ -30,6 +30,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix type and real parameter issues, bug1427, bug1456, bug1458. [Todd Strader] **** Fix type and real parameter issues, bug1427, bug1456, bug1458. [Todd Strader]
**** Fix build error on MinGW, bug1460. [Richard Myers]
* Verilator 4.014 2019-05-08 * Verilator 4.014 2019-05-08

View File

@ -7,5 +7,6 @@ Please see the Verilator manual for additional contributors.
Jeremy Bennett Jeremy Bennett
John Coiner John Coiner
Kanad Kanhere Kanad Kanhere
Richard Myers
Stefan Wallentowitz Stefan Wallentowitz
Wilson Snyder Wilson Snyder

View File

@ -206,6 +206,11 @@
//========================================================================= //=========================================================================
// Basic integer types // Basic integer types
#ifdef __MINGW32__
# define __USE_MINGW_ANSI_STDIO 1 // Force old MinGW (GCC 5 and older) to use C99 formats
# define __STDC_FORMAT_MACROS 1 // Otherwise MinGW doesn't get PRId64 for fstapi.c
#endif
#if defined(__CYGWIN__) #if defined(__CYGWIN__)
# include <stdint.h> # include <stdint.h>
@ -278,10 +283,6 @@ typedef unsigned long long vluint64_t; ///< 64-bit unsigned type
#ifdef _MSC_VER #ifdef _MSC_VER
# define VL_PRI64 "I64" # define VL_PRI64 "I64"
#else // use standard C99 format specifiers #else // use standard C99 format specifiers
# ifdef __MINGW32__
# define __USE_MINGW_ANSI_STDIO 1 // Force old MinGW (GCC 5 and older) to use C99 formats
# define __STDC_FORMAT_MACROS 1 // Otherwise MinGW doesn't get PRId64 for fstapi.c
# endif
# if defined(__WORDSIZE) && (__WORDSIZE == 64) # if defined(__WORDSIZE) && (__WORDSIZE == 64)
# define VL_PRI64 "l" # define VL_PRI64 "l"
# else # else