From 8b324249b1bd6cbe1155117a5904723ea0e94ddc Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 4 Feb 2010 08:38:00 -0500 Subject: [PATCH] Fix -mno-cygwin warnings --- include/verilatedos.h | 6 +++++- src/V3Options.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/verilatedos.h b/include/verilatedos.h index b09d3a975..00243df91 100644 --- a/include/verilatedos.h +++ b/include/verilatedos.h @@ -37,7 +37,11 @@ # define VL_ATTR_ALIGNED(alignment) __attribute__ ((aligned (alignment))) # define VL_ATTR_ALWINLINE __attribute__ ((always_inline)) # define VL_ATTR_NORETURN __attribute__ ((noreturn)) -# define VL_ATTR_PRINTF(fmtArgNum) __attribute__ ((format (printf, fmtArgNum, fmtArgNum+1))) +# ifdef _WIN32 +# define VL_ATTR_PRINTF(fmtArgNum) // GCC with MS runtime will fool the print arg checker +# else +# define VL_ATTR_PRINTF(fmtArgNum) __attribute__ ((format (printf, fmtArgNum, fmtArgNum+1))) +# endif # define VL_ATTR_UNUSED __attribute__ ((unused)) # define VL_FUNC __func__ # define VL_LIKELY(x) __builtin_expect(!!(x), 1) diff --git a/src/V3Options.cpp b/src/V3Options.cpp index 169646abe..8fd7cc5fd 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -367,7 +367,7 @@ string V3Options::getenvSYSTEMC_ARCH() { // Hardcoded with MINGW current version. Would like a better way. string sysname = "MINGW32_NT-5.0"; var = "mingw32"; -#elsif defined (_WIN32) +#elif defined (_WIN32) string sysname = "WIN32"; var = "win32"; #else