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
// File : HDFOI.hxx
// Module : SALOME
//
-extern "C"
-{
#include "HDFtypes.h"
-}
#include "HDFattribute.hxx"
#include "HDFfile.hxx"
// File : HDFattribute.cc
// Module : SALOME
//
-extern "C"
-{
#include "hdfi.h"
-}
#include "HDFexception.hxx"
#include "HDFattribute.hxx"
#include "HDFinternalObject.hxx"
#ifndef HDFATTRIBUTE_HXX
#define HDFATTRIBUTE_HXX
-extern "C"
-{
#include "HDFtypes.h"
-}
#include "HDFinternalObject.hxx"
#include "HDFcontainerObject.hxx"
// File : HDFcontainerObject.cc
// Module : SALOME
//
-extern "C"
-{
#include "hdfi.h"
-}
#include "HDFcontainerObject.hxx"
#include "HDFexception.hxx"
#ifndef HDFCONTAINEROBJECT_HXX
#define HDFCONTAINEROBJECT_HXX
-extern "C"
-{
#include "HDFtypes.h"
-}
#include "HDFobject.hxx"
#include "HDFinternalObject.hxx"
#include "HDFexport.hxx"
#ifndef HDFCONVERT_HXX
#define HDFCONVERT_HXX
-extern "C"
-{
#include "HDFtypes.h"
#ifndef WIN32
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-}
#include "HDFexport.hxx"
#include "HDFcontainerObject.hxx"
#include "HDFdataset.hxx"
// File : HDFdataset.cc
// Module : SALOME
//
-extern "C"
-{
#include "hdfi.h"
#include <string.h>
-}
#include "HDFdataset.hxx"
#include "HDFcontainerObject.hxx"
#include "HDFexception.hxx"
#ifndef HDFDATASET_HXX
#define HDFDATASET_HXX
-extern "C"
-{
#include "HDFtypes.h"
-}
#include "HDFinternalObject.hxx"
#include "HDFcontainerObject.hxx"
#include "HDFexport.hxx"
// File : HDFfile.cc
// Module : SALOME
//
-extern "C"
-{
#include "hdfi.h"
#ifndef WIN32
#include <unistd.h>
#define access _access
#endif
#include <string.h>
-}
#include <iostream>
#include "HDFfile.hxx"
#include "HDFexception.hxx"
#ifndef HDFFILE_HXX
#define HDFFILE_HXX
-extern "C"
-{
#include "HDFtypes.h"
-}
#include "HDFcontainerObject.hxx"
#include "HDFexport.hxx"
// File : HDFgroup.cc
// Module : SALOME
//
-extern "C"
-{
#include "hdfi.h"
#include <string.h>
-}
#include "HDFgroup.hxx"
#include "HDFexception.hxx"
#ifndef HDFGROUP_HXX
#define HDFGROUP_HXX
-extern "C"
-{
#include "HDFtypes.h"
-}
#include "HDFcontainerObject.hxx"
#include "HDFexport.hxx"
// File : HDFinternalObject.cc
// Module : SALOME
//
-extern "C"
-{
#include "hdfi.h"
-}
#include "HDFinternalObject.hxx"
HDFinternalObject::HDFinternalObject(const char *name)
#ifndef HDFINTERNALOBJECT_HXX
#define HDFINTERNALOBJECT_HXX
-extern "C"
-{
#include "HDFtypes.h"
-}
#include "HDFobject.hxx"
#include "HDFexport.hxx"
// Module : SALOME
//
#include "HDFobject.hxx"
-extern "C"
-{
#include "hdfi.h"
-}
#include <cstring>
#include <stdlib.h>
#ifndef HDFOBJECT_HXX
#define HDFOBJECT_HXX
-extern "C"
-{
#include "HDFtypes.h"
-}
#include "HDFexport.hxx"
class HDFPERSIST_EXPORT HDFobject {
/* HDF C INTERFACE */
+#ifdef __cplusplus
+extern "C" {
+#endif
/* File Interface */
extern
hdf_idt HDFfileCreate(char *name);
extern
hdf_err HDFobjectType(hdf_idt id, char *name, hdf_object_type *type);
+#ifdef __cplusplus
+}
+#endif
#endif /* HDFI_H */