diff --git a/Graphics/gl2ps.h b/Graphics/gl2ps.h
index 5da060004fb6063fd1254ccc933110a5d3b78c10..3bded6f584c65c90bf90966a1ec1ac47b24978f6 100644
--- a/Graphics/gl2ps.h
+++ b/Graphics/gl2ps.h
@@ -48,7 +48,9 @@
 #    pragma warning(disable:4127)
 #    pragma warning(disable:4996)
 #  endif
-#  define NOMINMAX
+#  if !defined(NOMINMAX)
+#    define NOMINMAX
+#  endif
 #  include <windows.h>
 #  undef NOMINMAX
 #  if defined(GL2PSDLL)
diff --git a/contrib/hxt/hxt_mesh.h b/contrib/hxt/hxt_mesh.h
index 12dda19a95281e376d80ce122e58f848648f9faf..cc1d5ba0cbad4df2d1efd31ab6718c8fdeb85ada 100644
--- a/contrib/hxt/hxt_mesh.h
+++ b/contrib/hxt/hxt_mesh.h
@@ -3,7 +3,7 @@
 
 #include "hxt_tools.h" // to have SIMD_ALIGN and stdint.h
 
-#if defined(WIN32)
+#if defined(WIN32) && !defined(INT32_MAX) // FIXME: Gmsh
 #define INT32_MAX        2147483647i32
 #endif
 
@@ -43,7 +43,7 @@ struct hxtMeshStruct {
     uint64_t num;    // number of tetrahedra
     uint64_t size;   // reserved number of tetrahedra (size of the vector)
   } tetrahedra;
-  
+
   // hexahedra
   struct {
     uint32_t* node;  // aligned (size = hexahedra.size*8*sizeof(uint32_t))
@@ -65,7 +65,7 @@ struct hxtMeshStruct {
     uint64_t num;    // number of tetrahedra
     uint64_t size;   // reserved number of prisms (size of the vector)
   } prisms;
-  
+
   // pyramids
   struct {
     uint32_t* node;  // aligned (size = pyramids.size*5*sizeof(uint32_t))
@@ -80,7 +80,7 @@ struct hxtMeshStruct {
   // triangles // TODO: consider writing a array of structure...
   struct {
     uint32_t* node;
-    uint64_t* neigh; 
+    uint64_t* neigh;
     uint16_t* colors;
     uint64_t num;
     uint64_t size;