diff --git a/Common/GmshUI.h b/Common/GmshUI.h index 3b16e4c97630dba4e0e450f09beb2277cb8da2d5..b7fb6ed3b82df19c5a99b1fbd3eac447d5c586d9 100644 --- a/Common/GmshUI.h +++ b/Common/GmshUI.h @@ -41,8 +41,8 @@ # define GMSH_WINDOW_BOX FL_FLAT_BOX #endif -// recent Cygwin releases define min/max macros! -#if defined(__CYGWIN__) +// some Windows versions define min/max macros! +#if defined(WIN32) #undef min #undef max #endif diff --git a/Fltk/GmshServer.h b/Fltk/GmshServer.h index 5b733db9f26b5428c055c3eab9ec45dc5b02fe61..ba15a631d1e65b2362cfd7ef7f78e0cf623c7158 100644 --- a/Fltk/GmshServer.h +++ b/Fltk/GmshServer.h @@ -97,7 +97,7 @@ class GmshServer { int sofar = 0; int remaining = bytes; do { - ssize_t len = recv(_sock, buf + sofar, remaining, 0); + int len = recv(_sock, buf + sofar, remaining, 0); if(len <= 0) return 0; sofar += len; diff --git a/Fltk/Makefile b/Fltk/Makefile index 554268b5cc23d8493f553da5908a7c5cc57fd5f9..0ca2092b250e7a8c4e586fb6695c7650212dbfa3 100644 --- a/Fltk/Makefile +++ b/Fltk/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.188 2008-06-07 17:20:45 geuzaine Exp $ +# $Id: Makefile,v 1.189 2008-06-12 11:52:00 geuzaine Exp $ # # Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle # @@ -52,7 +52,7 @@ ${LIB}: ${OBJ} cpobj: ${OBJ} cp -f ${OBJ} ../lib/ -.cpp.o: +.cpp${OBJEXT}: ${CXX} ${CFLAGS} ${DASH}c $< res: diff --git a/Graphics/Makefile b/Graphics/Makefile index 5dc9dde12ec204038e375b67419ea94507899237..e083debc1692d7af4862ec63200ed03422b72f55 100644 --- a/Graphics/Makefile +++ b/Graphics/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.155 2008-06-07 17:20:47 geuzaine Exp $ +# $Id: Makefile,v 1.156 2008-06-12 11:52:00 geuzaine Exp $ # # Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle # @@ -58,7 +58,7 @@ ${LIB}: ${OBJ} cpobj: ${OBJ} cp -f ${OBJ} ../lib/ -.cpp.o: +.cpp${OBJEXT}: ${CXX} ${CFLAGS} ${DASH}c $< clean: diff --git a/Graphics/Mesh.cpp b/Graphics/Mesh.cpp index 2c8a565a01e93d1d34954e83206acf55e4ec8454..535d2ada902db34238540b91cea8746a4f611aee 100644 --- a/Graphics/Mesh.cpp +++ b/Graphics/Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: Mesh.cpp,v 1.221 2008-05-04 08:31:14 geuzaine Exp $ +// $Id: Mesh.cpp,v 1.222 2008-06-12 11:52:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -19,6 +19,7 @@ // // Please report all bugs and problems to <gmsh@geuz.org>. +#include <math.h> #include "Message.h" #include "GmshUI.h" #include "GModel.h" @@ -713,7 +714,7 @@ class initMeshGRegion { num += (12 * r->tetrahedra.size() + 24 * r->hexahedra.size() + 18 * r->prisms.size() + 16 * r->pyramids.size()) / 4; if(CTX.mesh.use_cut_plane && CTX.mesh.cut_plane_draw_intersect) - num = (int)sqrt(num); + num = (int)sqrt((double)num); if(CTX.mesh.explode != 1.) num *= 4; if(_curved) num *= 2; } @@ -726,7 +727,7 @@ class initMeshGRegion { num += (4 * r->tetrahedra.size() + 12 * r->hexahedra.size() + 8 * r->prisms.size() + 6 * r->pyramids.size()) / 2; if(CTX.mesh.use_cut_plane && CTX.mesh.cut_plane_draw_intersect) - num = (int)sqrt(num); + num = (int)sqrt((double)num); if(CTX.mesh.explode != 1.) num *= 2; if(_curved) num *= 4; }