From: Morgan Deters Date: Thu, 18 Jul 2013 20:31:20 +0000 (-0400) Subject: Fixes for building with mingw win64. X-Git-Tag: cvc5-1.0.0~7287^2~45 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=62cec291d3204ae6eb30a9f5748b48fc4107efc9;p=cvc5.git Fixes for building with mingw win64. --- diff --git a/src/lib/clock_gettime.h b/src/lib/clock_gettime.h index 2d3455aed..43c3395a4 100644 --- a/src/lib/clock_gettime.h +++ b/src/lib/clock_gettime.h @@ -30,7 +30,7 @@ /* otherwise, we have to define it */ -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__WIN64__) #ifdef __cplusplus extern "C" { @@ -45,12 +45,12 @@ struct timespec { }/* extern "C" */ #endif /* __cplusplus */ -#else /* ! __WIN32__ */ +#else /* !__WIN32__ || __WIN64__ */ /* get timespec from */ #include -#endif /* __WIN32__ */ +#endif /* __WIN32__ && !__WIN64__ */ #ifdef __cplusplus extern "C" { diff --git a/src/options/options_template.cpp b/src/options/options_template.cpp index 8af61b79f..229c25597 100644 --- a/src/options/options_template.cpp +++ b/src/options/options_template.cpp @@ -14,14 +14,18 @@ ** Contains code for handling command-line options **/ -#if !defined(_BSD_SOURCE) && (defined(__MINGW32__) || defined(__MINGW64__)) -// force use of optreset; mingw croaks on argv-switching otherwise +#if !defined(_BSD_SOURCE) && defined(__MINGW32__) && !defined(__MINGW64__) +// force use of optreset; mingw32 croaks on argv-switching otherwise # include "cvc4autoconfig.h" # define _BSD_SOURCE # undef HAVE_DECL_OPTRESET # define HAVE_DECL_OPTRESET 1 # define CVC4_IS_NOT_REALLY_BSD -#endif /* !_BSD_SOURCE && (__MINGW32__ || __MINGW64__) */ +#endif /* !_BSD_SOURCE && __MINGW32__ && !__MINGW64__ */ + +#ifdef __MINGW64__ +extern int optreset; +#endif /* __MINGW64__ */ #include