From 17b8e336408d5ed25f87efc22da50bc1fa8b4686 Mon Sep 17 00:00:00 2001 From: Claudine Bon <claudine.bon@samtech.com> Date: Thu, 5 Jun 2008 11:52:50 +0000 Subject: [PATCH] fixes for SUN PRO compiler --- Common/CommandLine.cpp | 3 ++- Common/Main.cpp | 3 ++- Common/SmoothData.cpp | 3 ++- Geo/GEdgeLoop.cpp | 3 ++- Geo/GEntity.cpp | 3 ++- Geo/GModelIO_Geo.cpp | 7 ++++--- Geo/GModelIO_Mesh.cpp | 3 ++- Geo/MElement.cpp | 3 ++- Geo/MVertex.cpp | 6 +++--- Geo/findLinks.cpp | 3 ++- Geo/gmshFace.cpp | 3 ++- Geo/gmshRegion.cpp | 3 ++- Mesh/Field.h | 2 +- Mesh/Generator.cpp | 3 ++- Mesh/meshGEdge.cpp | 3 ++- Mesh/meshGFace.cpp | 3 ++- Mesh/meshGFaceBDS.cpp | 3 ++- Mesh/meshGRegion.cpp | 3 ++- Numeric/FunctionSpace.h | 1 + 19 files changed, 39 insertions(+), 22 deletions(-) diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index cc4a773dd7..58d77223db 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -1,4 +1,4 @@ -// $Id: CommandLine.cpp,v 1.129 2008-05-04 08:31:11 geuzaine Exp $ +// $Id: CommandLine.cpp,v 1.130 2008-06-05 11:52:49 samtech Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -20,6 +20,7 @@ // Please report all bugs and problems to <gmsh@geuz.org>. #include <string.h> +#include <stdlib.h> #include "GmshUI.h" #include "GmshDefines.h" #include "GmshVersion.h" diff --git a/Common/Main.cpp b/Common/Main.cpp index 79ec38e877..0389c1b9eb 100644 --- a/Common/Main.cpp +++ b/Common/Main.cpp @@ -1,4 +1,4 @@ -// $Id: Main.cpp,v 1.1 2008-05-04 08:31:11 geuzaine Exp $ +// $Id: Main.cpp,v 1.2 2008-06-05 11:52:49 samtech 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 <stdlib.h> #include "Gmsh.h" #include "GModel.h" #include "CommandLine.h" diff --git a/Common/SmoothData.cpp b/Common/SmoothData.cpp index bfdd77d47b..0e575487be 100644 --- a/Common/SmoothData.cpp +++ b/Common/SmoothData.cpp @@ -1,4 +1,4 @@ -// $Id: SmoothData.cpp,v 1.6 2008-03-20 11:44:02 geuzaine Exp $ +// $Id: SmoothData.cpp,v 1.7 2008-06-05 11:52:49 samtech 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 <stdio.h> #include "SmoothData.h" #include "Numeric.h" diff --git a/Geo/GEdgeLoop.cpp b/Geo/GEdgeLoop.cpp index fa36a661ad..2600a17868 100644 --- a/Geo/GEdgeLoop.cpp +++ b/Geo/GEdgeLoop.cpp @@ -1,4 +1,4 @@ -// $Id: GEdgeLoop.cpp,v 1.14 2008-05-04 08:31:13 geuzaine Exp $ +// $Id: GEdgeLoop.cpp,v 1.15 2008-06-05 11:52:49 samtech Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -20,6 +20,7 @@ // Please report all bugs and problems to <gmsh@geuz.org>. #include <algorithm> +#include <functional> #include "GEdgeLoop.h" #if defined(HAVE_GMSH_EMBEDDED) diff --git a/Geo/GEntity.cpp b/Geo/GEntity.cpp index 80f7441293..558022603a 100644 --- a/Geo/GEntity.cpp +++ b/Geo/GEntity.cpp @@ -1,4 +1,4 @@ -// $Id: GEntity.cpp,v 1.20 2008-02-22 20:28:07 geuzaine Exp $ +// $Id: GEntity.cpp,v 1.21 2008-06-05 11:52:49 samtech 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 <stdio.h> #include "GEntity.h" #if defined(HAVE_GMSH_EMBEDDED) diff --git a/Geo/GModelIO_Geo.cpp b/Geo/GModelIO_Geo.cpp index 4253f190a6..2678e14afd 100644 --- a/Geo/GModelIO_Geo.cpp +++ b/Geo/GModelIO_Geo.cpp @@ -1,4 +1,4 @@ -// $Id: GModelIO_Geo.cpp,v 1.22 2008-05-04 15:43:03 geuzaine Exp $ +// $Id: GModelIO_Geo.cpp,v 1.23 2008-06-05 11:52:49 samtech 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 <stdlib.h> #include "GModel.h" #include "Geo.h" #include "OpenFile.h" @@ -155,7 +156,7 @@ class writeFieldOptionGEO{ Field *field; public : writeFieldOptionGEO(FILE *fp,Field *_field) { geo = fp ? fp : stdout; field=_field;} - void operator() (std::pair<const char *,FieldOption *> it) + void operator() (std::pair<const char *, FieldOption *> it) { std::string v; it.second->get_text_representation(v); @@ -168,7 +169,7 @@ class writeFieldGEO{ FILE *geo; public : writeFieldGEO(FILE *fp) { geo = fp ? fp : stdout; } - void operator() (std::pair<int, Field *> it) + void operator() (std::pair<const int, Field *> it) { fprintf(geo, "Field[%i] = %s;\n", it.first, it.second->get_name()); std::for_each(it.second->options.begin(), it.second->options.end(), diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp index 362a30f7f5..91073a7b51 100644 --- a/Geo/GModelIO_Mesh.cpp +++ b/Geo/GModelIO_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: GModelIO_Mesh.cpp,v 1.53 2008-05-06 21:11:47 geuzaine Exp $ +// $Id: GModelIO_Mesh.cpp,v 1.54 2008-06-05 11:52:49 samtech 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 <stdlib.h> #include <string.h> #include <map> #include <string> diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp index 7944495284..e4ef0e2de4 100644 --- a/Geo/MElement.cpp +++ b/Geo/MElement.cpp @@ -1,4 +1,4 @@ -// $Id: MElement.cpp,v 1.69 2008-06-01 09:14:21 geuzaine Exp $ +// $Id: MElement.cpp,v 1.70 2008-06-05 11:52:49 samtech 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 <stdlib.h> #include <math.h> #include "MElement.h" #include "GEntity.h" diff --git a/Geo/MVertex.cpp b/Geo/MVertex.cpp index 01935f2fe2..4e775ecc2a 100644 --- a/Geo/MVertex.cpp +++ b/Geo/MVertex.cpp @@ -1,4 +1,4 @@ -// $Id: MVertex.cpp,v 1.24 2008-05-06 21:11:47 geuzaine Exp $ +// $Id: MVertex.cpp,v 1.25 2008-06-05 11:52:49 samtech Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -19,8 +19,8 @@ // // Please report all bugs and problems to <gmsh@geuz.org>. -#include <cstring> -#include <cmath> +#include <string.h> +#include <math.h> #include "MVertex.h" #include "GEdge.h" #include "GFace.h" diff --git a/Geo/findLinks.cpp b/Geo/findLinks.cpp index 94f5fb4455..eefd6f1c25 100644 --- a/Geo/findLinks.cpp +++ b/Geo/findLinks.cpp @@ -1,4 +1,4 @@ -// $Id: findLinks.cpp,v 1.8 2008-05-04 08:31:14 geuzaine Exp $ +// $Id: findLinks.cpp,v 1.9 2008-06-05 11:52:49 samtech 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 <stdlib.h> #include "Message.h" #include "GModel.h" #include "Tree.h" diff --git a/Geo/gmshFace.cpp b/Geo/gmshFace.cpp index 5cd383fa54..c15d0979da 100644 --- a/Geo/gmshFace.cpp +++ b/Geo/gmshFace.cpp @@ -1,4 +1,4 @@ -// $Id: gmshFace.cpp,v 1.57 2008-06-03 21:39:01 geuzaine Exp $ +// $Id: gmshFace.cpp,v 1.58 2008-06-05 11:52:49 samtech 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 <stdlib.h> #include "GModel.h" #include "gmshFace.h" #include "Geo.h" diff --git a/Geo/gmshRegion.cpp b/Geo/gmshRegion.cpp index 8f830b9c24..eb087d0f47 100644 --- a/Geo/gmshRegion.cpp +++ b/Geo/gmshRegion.cpp @@ -1,4 +1,4 @@ -// $Id: gmshRegion.cpp,v 1.22 2008-05-04 08:31:14 geuzaine Exp $ +// $Id: gmshRegion.cpp,v 1.23 2008-06-05 11:52:49 samtech 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 <stdlib.h> #include "GModel.h" #include "gmshRegion.h" #include "Geo.h" diff --git a/Mesh/Field.h b/Mesh/Field.h index c988646019..33da943e23 100644 --- a/Mesh/Field.h +++ b/Mesh/Field.h @@ -91,7 +91,7 @@ class FieldFactory { class FieldManager : public std::map<int, Field*> { public: - std::map<const std::string, FieldFactory*> map_type_name; + std::map<std::string, FieldFactory*> map_type_name; void reset(); Field *get(int id); Field *new_field(int id, const char *type_name); diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp index 841ead19d4..ec7e51b86c 100644 --- a/Mesh/Generator.cpp +++ b/Mesh/Generator.cpp @@ -1,4 +1,4 @@ -// $Id: Generator.cpp,v 1.144 2008-05-06 21:11:47 geuzaine Exp $ +// $Id: Generator.cpp,v 1.145 2008-06-05 11:52:49 samtech 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 <stdlib.h> #include "Message.h" #include "Numeric.h" #include "Context.h" diff --git a/Mesh/meshGEdge.cpp b/Mesh/meshGEdge.cpp index 2759804c39..d4e2938830 100644 --- a/Mesh/meshGEdge.cpp +++ b/Mesh/meshGEdge.cpp @@ -1,4 +1,4 @@ -// $Id: meshGEdge.cpp,v 1.61 2008-05-04 08:31:16 geuzaine Exp $ +// $Id: meshGEdge.cpp,v 1.62 2008-06-05 11:52:49 samtech 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 <stdlib.h> #include "meshGEdge.h" #include "GEdge.h" #include "MElement.h" diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp index 2b8c63e2a2..116a55ba72 100644 --- a/Mesh/meshGFace.cpp +++ b/Mesh/meshGFace.cpp @@ -1,4 +1,4 @@ -// $Id: meshGFace.cpp,v 1.134 2008-05-06 21:11:47 geuzaine Exp $ +// $Id: meshGFace.cpp,v 1.135 2008-06-05 11:52:50 samtech 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 <stdlib.h> #include "meshGFace.h" #include "meshGFaceBDS.h" #include "meshGFaceDelaunayInsertion.h" diff --git a/Mesh/meshGFaceBDS.cpp b/Mesh/meshGFaceBDS.cpp index 60190d9f6f..f9755e6b02 100644 --- a/Mesh/meshGFaceBDS.cpp +++ b/Mesh/meshGFaceBDS.cpp @@ -1,4 +1,4 @@ -// $Id: meshGFaceBDS.cpp,v 1.14 2008-06-03 12:43:42 remacle Exp $ +// $Id: meshGFaceBDS.cpp,v 1.15 2008-06-05 11:52:50 samtech 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 <stdlib.h> #include "meshGFace.h" #include "meshGFaceOptimize.h" #include "BackgroundMesh.h" diff --git a/Mesh/meshGRegion.cpp b/Mesh/meshGRegion.cpp index 4bf9fc07b5..fa995cd482 100644 --- a/Mesh/meshGRegion.cpp +++ b/Mesh/meshGRegion.cpp @@ -1,4 +1,4 @@ -// $Id: meshGRegion.cpp,v 1.47 2008-05-06 21:11:48 geuzaine Exp $ +// $Id: meshGRegion.cpp,v 1.48 2008-06-05 11:52:50 samtech 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 <stdlib.h> #include <vector> #include "meshGRegion.h" #include "meshGRegionDelaunayInsertion.h" diff --git a/Numeric/FunctionSpace.h b/Numeric/FunctionSpace.h index 7726e26bc9..b568ea9972 100644 --- a/Numeric/FunctionSpace.h +++ b/Numeric/FunctionSpace.h @@ -20,6 +20,7 @@ // // Please report all bugs and problems to <gmsh@geuz.org>. +#include <math.h> #include <map> #include "GmshMatrix.h" -- GitLab