No longer test for __MINGW32__ macro, testing for _WIN32 is enough

Closes: Dynare/dynare#1315
issue#70
Sébastien Villemot 2018-10-02 16:50:07 +02:00
parent 15d026e54e
commit 5e6b8f0a6b
7 changed files with 13 additions and 13 deletions

View File

@ -759,7 +759,7 @@ DataTree::writePowerDeriv(ostream &output) const
void
DataTree::writeNormcdfCHeader(ostream &output) const
{
#if defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
if (isTrinaryOpUsed(TrinaryOpcode::normcdf))
output << "#ifdef _MSC_VER" << endl
<< "double normcdf(double);" << endl
@ -770,7 +770,7 @@ DataTree::writeNormcdfCHeader(ostream &output) const
void
DataTree::writeNormcdf(ostream &output) const
{
#if defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
if (isTrinaryOpUsed(TrinaryOpcode::normcdf))
output << endl
<< "#ifdef _MSC_VER" << endl

View File

@ -1552,7 +1552,7 @@ DynamicModel::writeDynamicCFile(const string &basename, const int order) const
<< " * Warning : this file is generated automatically by Dynare" << endl
<< " * from model file (.mod)" << endl
<< " */" << endl
#if defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
<< "#ifdef _MSC_VER" << endl
<< "#define _USE_MATH_DEFINES" << endl
<< "#endif" << endl

View File

@ -42,7 +42,7 @@ void main2(stringstream &in, string &basename, bool debug, bool clear_all, bool
WarningConsolidation &warnings_arg, bool nostrict, bool stochastic, bool check_model_changes,
bool minimal_workspace, bool compute_xrefs, FileOutputType output_mode,
LanguageOutputType lang, int params_derivs_order, bool transform_unary_ops
#if defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
, bool cygwin, bool msvc, bool mingw
#endif
, JsonOutputPointType json, JsonFileOutputType json_output_mode, bool onlyjson, bool jsonderivsimple
@ -59,7 +59,7 @@ usage()
<< " [console] [nograph] [nointeractive] [parallel[=cluster_name]] [conffile=parallel_config_path_and_filename] [parallel_slave_open_mode] [parallel_test]"
<< " [-D<variable>[=<value>]] [-I/path] [nostrict] [stochastic] [fast] [minimal_workspace] [compute_xrefs] [output=dynamic|first|second|third] [language=julia]"
<< " [params_derivs_order=0|1|2] [transform_unary_ops]"
#if defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
<< " [cygwin] [msvc] [mingw]"
#endif
<< " [json=parse|check|transform|compute] [jsonstdout] [onlyjson] [jsonderivsimple] [nopathchange] [nopreprocessoroutput]"
@ -99,7 +99,7 @@ main(int argc, char **argv)
bool console = false;
bool nograph = false;
bool nointeractive = false;
#if defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
bool cygwin = false;
bool msvc = false;
bool mingw = false;
@ -180,7 +180,7 @@ main(int argc, char **argv)
nograph = true;
else if (!strcmp(argv[arg], "nointeractive"))
nointeractive = true;
#if defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
else if (!strcmp(argv[arg], "cygwin"))
cygwin = true;
else if (!strcmp(argv[arg], "msvc"))
@ -401,7 +401,7 @@ main(int argc, char **argv)
no_tmp_terms, no_log, no_warn, warn_uninit, console, nograph, nointeractive,
parallel, config_file, warnings, nostrict, stochastic, check_model_changes, minimal_workspace,
compute_xrefs, output_mode, language, params_derivs_order, transform_unary_ops
#if defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
, cygwin, msvc, mingw
#endif
, json, json_output_mode, onlyjson, jsonderivsimple, nopreprocessoroutput

View File

@ -33,7 +33,7 @@ main2(stringstream &in, string &basename, bool debug, bool clear_all, bool clear
WarningConsolidation &warnings, bool nostrict, bool stochastic, bool check_model_changes,
bool minimal_workspace, bool compute_xrefs, FileOutputType output_mode,
LanguageOutputType language, int params_derivs_order, bool transform_unary_ops
#if defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
, bool cygwin, bool msvc, bool mingw
#endif
, JsonOutputPointType json, JsonFileOutputType json_output_mode, bool onlyjson, bool jsonderivsimple
@ -73,7 +73,7 @@ main2(stringstream &in, string &basename, bool debug, bool clear_all, bool clear
else
mod_file->writeOutputFiles(basename, clear_all, clear_global, no_log, no_warn, console, nograph,
nointeractive, config_file, check_model_changes, minimal_workspace, compute_xrefs
#if defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
, cygwin, msvc, mingw
#endif
, nopreprocessoroutput

View File

@ -983,7 +983,7 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool clear_glo
// When check_model_changes is true, don't force compile if MEX is fresher than source
if (use_dll)
{
#if defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
if (msvc)
// MATLAB/Windows + Microsoft Visual C++
mOutputFile << "dyn_mex('msvc', '" << basename << "', " << !check_model_changes << ")" << endl;

View File

@ -163,7 +163,7 @@ public:
void writeOutputFiles(const string &basename, bool clear_all, bool clear_global, bool no_log, bool no_warn,
bool console, bool nograph, bool nointeractive, const ConfigFile &config_file,
bool check_model_changes, bool minimal_workspace, bool compute_xrefs
#if defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
, bool cygwin, bool msvc, bool mingw
#endif
, const bool nopreprocessoroutput

View File

@ -1881,7 +1881,7 @@ StaticModel::writeStaticCFile(const string &basename) const
<< " * Warning : this file is generated automatically by Dynare" << endl
<< " * from model file (.mod)" << endl << endl
<< " */" << endl
#if defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
<< "#ifdef _MSC_VER" << endl
<< "#define _USE_MATH_DEFINES" << endl
<< "#endif" << endl