From: eap Date: Tue, 1 Mar 2011 12:41:51 +0000 (+0000) Subject: 0021196: [CEA 456] Integration and merge modification for debian packages X-Git-Tag: Start_BR_19998_21191~42 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=564db64117c7e126f9038679283d99d6bdf2105b;p=modules%2Fkernel.git 0021196: [CEA 456] Integration and merge modification for debian packages Remove unnecessary extern "C" instances and add one necessary one. Background: One must not #include mpi.h from within an extern "C" block. Both mpi.h and hdf5.h are C++-safe, and should be included directly without extern "C". For details, see: http://www.open-mpi.org/community/lists/users/2007/12/4763.php --- diff --git a/src/HDFPersist/HDFOI.hxx b/src/HDFPersist/HDFOI.hxx index 23434e63f..134aca9d8 100644 --- a/src/HDFPersist/HDFOI.hxx +++ b/src/HDFPersist/HDFOI.hxx @@ -24,10 +24,7 @@ // File : HDFOI.hxx // Module : SALOME // -extern "C" -{ #include "HDFtypes.h" -} #include "HDFattribute.hxx" #include "HDFfile.hxx" diff --git a/src/HDFPersist/HDFattribute.cc b/src/HDFPersist/HDFattribute.cc index 5ed08fc32..6124a1630 100644 --- a/src/HDFPersist/HDFattribute.cc +++ b/src/HDFPersist/HDFattribute.cc @@ -24,10 +24,7 @@ // File : HDFattribute.cc // Module : SALOME // -extern "C" -{ #include "hdfi.h" -} #include "HDFexception.hxx" #include "HDFattribute.hxx" #include "HDFinternalObject.hxx" diff --git a/src/HDFPersist/HDFattribute.hxx b/src/HDFPersist/HDFattribute.hxx index a6acbf1f8..6d8bdae78 100644 --- a/src/HDFPersist/HDFattribute.hxx +++ b/src/HDFPersist/HDFattribute.hxx @@ -27,10 +27,7 @@ #ifndef HDFATTRIBUTE_HXX #define HDFATTRIBUTE_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFinternalObject.hxx" #include "HDFcontainerObject.hxx" diff --git a/src/HDFPersist/HDFcontainerObject.cc b/src/HDFPersist/HDFcontainerObject.cc index 4936285f7..b92d2df74 100644 --- a/src/HDFPersist/HDFcontainerObject.cc +++ b/src/HDFPersist/HDFcontainerObject.cc @@ -24,10 +24,7 @@ // File : HDFcontainerObject.cc // Module : SALOME // -extern "C" -{ #include "hdfi.h" -} #include "HDFcontainerObject.hxx" #include "HDFexception.hxx" diff --git a/src/HDFPersist/HDFcontainerObject.hxx b/src/HDFPersist/HDFcontainerObject.hxx index 26bc6fdde..af2bbb43c 100644 --- a/src/HDFPersist/HDFcontainerObject.hxx +++ b/src/HDFPersist/HDFcontainerObject.hxx @@ -27,10 +27,7 @@ #ifndef HDFCONTAINEROBJECT_HXX #define HDFCONTAINEROBJECT_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFobject.hxx" #include "HDFinternalObject.hxx" #include "HDFexport.hxx" diff --git a/src/HDFPersist/HDFconvert.hxx b/src/HDFPersist/HDFconvert.hxx index a7595bad7..d280f7ab9 100644 --- a/src/HDFPersist/HDFconvert.hxx +++ b/src/HDFPersist/HDFconvert.hxx @@ -27,8 +27,6 @@ #ifndef HDFCONVERT_HXX #define HDFCONVERT_HXX -extern "C" -{ #include "HDFtypes.h" #ifndef WIN32 #include @@ -40,7 +38,6 @@ extern "C" #include #include #include -} #include "HDFexport.hxx" #include "HDFcontainerObject.hxx" #include "HDFdataset.hxx" diff --git a/src/HDFPersist/HDFdataset.cc b/src/HDFPersist/HDFdataset.cc index a0af78076..e3ff8fe45 100644 --- a/src/HDFPersist/HDFdataset.cc +++ b/src/HDFPersist/HDFdataset.cc @@ -24,11 +24,8 @@ // File : HDFdataset.cc // Module : SALOME // -extern "C" -{ #include "hdfi.h" #include -} #include "HDFdataset.hxx" #include "HDFcontainerObject.hxx" #include "HDFexception.hxx" diff --git a/src/HDFPersist/HDFdataset.hxx b/src/HDFPersist/HDFdataset.hxx index 96d69ebdf..d85778dd5 100644 --- a/src/HDFPersist/HDFdataset.hxx +++ b/src/HDFPersist/HDFdataset.hxx @@ -27,10 +27,7 @@ #ifndef HDFDATASET_HXX #define HDFDATASET_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFinternalObject.hxx" #include "HDFcontainerObject.hxx" #include "HDFexport.hxx" diff --git a/src/HDFPersist/HDFfile.cc b/src/HDFPersist/HDFfile.cc index a56b0164a..fe7af1d5d 100644 --- a/src/HDFPersist/HDFfile.cc +++ b/src/HDFPersist/HDFfile.cc @@ -24,8 +24,6 @@ // File : HDFfile.cc // Module : SALOME // -extern "C" -{ #include "hdfi.h" #ifndef WIN32 #include @@ -35,7 +33,6 @@ extern "C" #define access _access #endif #include -} #include #include "HDFfile.hxx" #include "HDFexception.hxx" diff --git a/src/HDFPersist/HDFfile.hxx b/src/HDFPersist/HDFfile.hxx index fd3cd0429..de3e694e1 100644 --- a/src/HDFPersist/HDFfile.hxx +++ b/src/HDFPersist/HDFfile.hxx @@ -27,10 +27,7 @@ #ifndef HDFFILE_HXX #define HDFFILE_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFcontainerObject.hxx" #include "HDFexport.hxx" diff --git a/src/HDFPersist/HDFgroup.cc b/src/HDFPersist/HDFgroup.cc index f8ffa2df3..ce3de1e80 100644 --- a/src/HDFPersist/HDFgroup.cc +++ b/src/HDFPersist/HDFgroup.cc @@ -24,11 +24,8 @@ // File : HDFgroup.cc // Module : SALOME // -extern "C" -{ #include "hdfi.h" #include -} #include "HDFgroup.hxx" #include "HDFexception.hxx" diff --git a/src/HDFPersist/HDFgroup.hxx b/src/HDFPersist/HDFgroup.hxx index 87f294164..ac137213f 100644 --- a/src/HDFPersist/HDFgroup.hxx +++ b/src/HDFPersist/HDFgroup.hxx @@ -27,10 +27,7 @@ #ifndef HDFGROUP_HXX #define HDFGROUP_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFcontainerObject.hxx" #include "HDFexport.hxx" diff --git a/src/HDFPersist/HDFinternalObject.cc b/src/HDFPersist/HDFinternalObject.cc index fa10958c1..d1b3345c0 100644 --- a/src/HDFPersist/HDFinternalObject.cc +++ b/src/HDFPersist/HDFinternalObject.cc @@ -24,10 +24,7 @@ // File : HDFinternalObject.cc // Module : SALOME // -extern "C" -{ #include "hdfi.h" -} #include "HDFinternalObject.hxx" HDFinternalObject::HDFinternalObject(const char *name) diff --git a/src/HDFPersist/HDFinternalObject.hxx b/src/HDFPersist/HDFinternalObject.hxx index 085248434..97597260a 100644 --- a/src/HDFPersist/HDFinternalObject.hxx +++ b/src/HDFPersist/HDFinternalObject.hxx @@ -27,10 +27,7 @@ #ifndef HDFINTERNALOBJECT_HXX #define HDFINTERNALOBJECT_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFobject.hxx" #include "HDFexport.hxx" diff --git a/src/HDFPersist/HDFobject.cc b/src/HDFPersist/HDFobject.cc index d04bdea6a..c797182a7 100644 --- a/src/HDFPersist/HDFobject.cc +++ b/src/HDFPersist/HDFobject.cc @@ -25,10 +25,7 @@ // Module : SALOME // #include "HDFobject.hxx" -extern "C" -{ #include "hdfi.h" -} #include #include diff --git a/src/HDFPersist/HDFobject.hxx b/src/HDFPersist/HDFobject.hxx index 62c143345..feb50e85f 100644 --- a/src/HDFPersist/HDFobject.hxx +++ b/src/HDFPersist/HDFobject.hxx @@ -27,10 +27,7 @@ #ifndef HDFOBJECT_HXX #define HDFOBJECT_HXX -extern "C" -{ #include "HDFtypes.h" -} #include "HDFexport.hxx" class HDFPERSIST_EXPORT HDFobject { diff --git a/src/HDFPersist/hdfi.h b/src/HDFPersist/hdfi.h index 2be74616a..9c9e3c2fc 100644 --- a/src/HDFPersist/hdfi.h +++ b/src/HDFPersist/hdfi.h @@ -33,6 +33,9 @@ /* HDF C INTERFACE */ +#ifdef __cplusplus +extern "C" { +#endif /* File Interface */ extern hdf_idt HDFfileCreate(char *name); @@ -126,5 +129,8 @@ hdf_err HDFobjectIdentify(hdf_idt fid,const char *path,int i,char *name); extern hdf_err HDFobjectType(hdf_idt id, char *name, hdf_object_type *type); +#ifdef __cplusplus +} +#endif #endif /* HDFI_H */