From 994cde57af1322f2b6c895d250d45cf37e4e1ba2 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 7 May 2015 20:41:53 -0400 Subject: [PATCH] Fix Cygwin uint32 compile, bug914. --- Changes | 2 ++ include/verilatedos.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 805c621e8..51db9e87f 100644 --- a/Changes +++ b/Changes @@ -11,6 +11,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix truncation warning with -pins-bv, bug912. [Alfonso Martinez] +**** Fix Cygwin uint32 compile, bug914. [Matthew Barr] + * Verilator 3.872 2015-04-05 diff --git a/include/verilatedos.h b/include/verilatedos.h index f60797250..e0c55b78b 100644 --- a/include/verilatedos.h +++ b/include/verilatedos.h @@ -139,7 +139,7 @@ typedef unsigned char uint8_t; ///< 8-bit unsigned type (backward comp typedef unsigned short int uint16_t; ///< 16-bit unsigned type (backward compatibility) typedef unsigned char vluint8_t; ///< 8-bit unsigned type typedef unsigned short int vluint16_t; ///< 16-bit unsigned type -# ifdef __uint32_t_defined // Newer Cygwin uint32_t in stdint.h as an unsigned int +# if defined(__uint32_t_defined) || defined(___int32_t_defined) // Newer Cygwin uint32_t in stdint.h as an unsigned int typedef int32_t vlsint32_t; ///< 32-bit signed type typedef uint32_t vluint32_t; ///< 32-bit unsigned type # else // Older Cygwin has long==uint32_t