diff --git a/contrib/src/rplight/iesDataset.cxx b/contrib/src/rplight/iesDataset.cxx index 2975268138..34f5a8608e 100644 --- a/contrib/src/rplight/iesDataset.cxx +++ b/contrib/src/rplight/iesDataset.cxx @@ -27,7 +27,9 @@ #include "iesDataset.h" +#ifndef _USE_MATH_DEFINES #define _USE_MATH_DEFINES +#endif #include NotifyCategoryDef(iesdataset, "") diff --git a/contrib/src/rplight/pssmCameraRig.cxx b/contrib/src/rplight/pssmCameraRig.cxx index b9560a80d2..8b8c22fd20 100644 --- a/contrib/src/rplight/pssmCameraRig.cxx +++ b/contrib/src/rplight/pssmCameraRig.cxx @@ -27,7 +27,9 @@ #include "pssmCameraRig.h" +#ifndef _USE_MATH_DEFINES #define _USE_MATH_DEFINES +#endif #include #include "orthographicLens.h" diff --git a/contrib/src/rplight/rpSpotLight.cxx b/contrib/src/rplight/rpSpotLight.cxx index 649e0b1beb..3fd677a34c 100644 --- a/contrib/src/rplight/rpSpotLight.cxx +++ b/contrib/src/rplight/rpSpotLight.cxx @@ -27,7 +27,9 @@ #include "rpSpotLight.h" +#ifndef _USE_MATH_DEFINES #define _USE_MATH_DEFINES +#endif #include diff --git a/dtool/src/parser-inc/stdlib.h b/dtool/src/parser-inc/stdlib.h index 5009b522b8..cb05992816 100644 --- a/dtool/src/parser-inc/stdlib.h +++ b/dtool/src/parser-inc/stdlib.h @@ -1,3 +1,5 @@ +#pragma once + #include #define EXIT_SUCCESS 0 diff --git a/pandatool/src/mayaprogs/mayaSavePview.cxx b/pandatool/src/mayaprogs/mayaSavePview.cxx index 423c7f09da..1537d95ce8 100644 --- a/pandatool/src/mayaprogs/mayaSavePview.cxx +++ b/pandatool/src/mayaprogs/mayaSavePview.cxx @@ -72,8 +72,8 @@ doIt(const MArgList &args) { #ifdef WIN32_VC // On Windows, we use the spawn function to run pview asynchronously. MString quoted = MString("\"") + filename + MString("\""); - int retval = _spawnlp(_P_DETACH, "pview", - "pview", pview_args.asChar(), quoted.asChar(), nullptr); + intptr_t retval = _spawnlp(_P_DETACH, "pview", + "pview", pview_args.asChar(), quoted.asChar(), nullptr); if (retval == -1) { return MS::kFailure; } diff --git a/pandatool/src/mayaprogs/mayapath.cxx b/pandatool/src/mayaprogs/mayapath.cxx index a82411efe9..cac021eebe 100644 --- a/pandatool/src/mayaprogs/mayapath.cxx +++ b/pandatool/src/mayaprogs/mayapath.cxx @@ -43,7 +43,9 @@ #include #if defined(_WIN32) +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #else #include