Skip to content
Snippets Groups Projects
Commit bc935e9c authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fixes for vc++

parent 0a596faf
No related branches found
No related tags found
No related merge requests found
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
# define GMSH_WINDOW_BOX FL_FLAT_BOX # define GMSH_WINDOW_BOX FL_FLAT_BOX
#endif #endif
// recent Cygwin releases define min/max macros! // some Windows versions define min/max macros!
#if defined(__CYGWIN__) #if defined(WIN32)
#undef min #undef min
#undef max #undef max
#endif #endif
......
...@@ -97,7 +97,7 @@ class GmshServer { ...@@ -97,7 +97,7 @@ class GmshServer {
int sofar = 0; int sofar = 0;
int remaining = bytes; int remaining = bytes;
do { do {
ssize_t len = recv(_sock, buf + sofar, remaining, 0); int len = recv(_sock, buf + sofar, remaining, 0);
if(len <= 0) if(len <= 0)
return 0; return 0;
sofar += len; sofar += len;
......
# $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 # Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
# #
...@@ -52,7 +52,7 @@ ${LIB}: ${OBJ} ...@@ -52,7 +52,7 @@ ${LIB}: ${OBJ}
cpobj: ${OBJ} cpobj: ${OBJ}
cp -f ${OBJ} ../lib/ cp -f ${OBJ} ../lib/
.cpp.o: .cpp${OBJEXT}:
${CXX} ${CFLAGS} ${DASH}c $< ${CXX} ${CFLAGS} ${DASH}c $<
res: res:
......
# $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 # Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
# #
...@@ -58,7 +58,7 @@ ${LIB}: ${OBJ} ...@@ -58,7 +58,7 @@ ${LIB}: ${OBJ}
cpobj: ${OBJ} cpobj: ${OBJ}
cp -f ${OBJ} ../lib/ cp -f ${OBJ} ../lib/
.cpp.o: .cpp${OBJEXT}:
${CXX} ${CFLAGS} ${DASH}c $< ${CXX} ${CFLAGS} ${DASH}c $<
clean: clean:
......
// $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 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
// //
// Please report all bugs and problems to <gmsh@geuz.org>. // Please report all bugs and problems to <gmsh@geuz.org>.
#include <math.h>
#include "Message.h" #include "Message.h"
#include "GmshUI.h" #include "GmshUI.h"
#include "GModel.h" #include "GModel.h"
...@@ -713,7 +714,7 @@ class initMeshGRegion { ...@@ -713,7 +714,7 @@ class initMeshGRegion {
num += (12 * r->tetrahedra.size() + 24 * r->hexahedra.size() + num += (12 * r->tetrahedra.size() + 24 * r->hexahedra.size() +
18 * r->prisms.size() + 16 * r->pyramids.size()) / 4; 18 * r->prisms.size() + 16 * r->pyramids.size()) / 4;
if(CTX.mesh.use_cut_plane && CTX.mesh.cut_plane_draw_intersect) 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(CTX.mesh.explode != 1.) num *= 4;
if(_curved) num *= 2; if(_curved) num *= 2;
} }
...@@ -726,7 +727,7 @@ class initMeshGRegion { ...@@ -726,7 +727,7 @@ class initMeshGRegion {
num += (4 * r->tetrahedra.size() + 12 * r->hexahedra.size() + num += (4 * r->tetrahedra.size() + 12 * r->hexahedra.size() +
8 * r->prisms.size() + 6 * r->pyramids.size()) / 2; 8 * r->prisms.size() + 6 * r->pyramids.size()) / 2;
if(CTX.mesh.use_cut_plane && CTX.mesh.cut_plane_draw_intersect) 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(CTX.mesh.explode != 1.) num *= 2;
if(_curved) num *= 4; if(_curved) num *= 4;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment