diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2013-07-18 16:31:20 -0400 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2013-07-24 16:50:04 -0400 |
commit | 62cec291d3204ae6eb30a9f5748b48fc4107efc9 (patch) | |
tree | 7f809bb5e9f7448e9ca659f6e32035741a044e3f | |
parent | 3797216a84228b6685df1f2337e17b1a4de97722 (diff) |
Fixes for building with mingw win64.
-rw-r--r-- | src/lib/clock_gettime.h | 6 | ||||
-rw-r--r-- | src/options/options_template.cpp | 10 |
2 files changed, 10 insertions, 6 deletions
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 <time.h> */ #include <time.h> -#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 <getopt.h> |