From a62f421d2bbb9849da0192aea7b51246b223ef78 Mon Sep 17 00:00:00 2001 From: Matthias Jurenz Date: Thu, 14 Aug 2008 12:17:24 +0000 Subject: [PATCH] Bugfix (Ticket #1447): Removed included system headers inside 'extern "C" {}' This commit was SVN r19287. --- ompi/contrib/vt/vt/extlib/otf/otflib/OTF_CopyHandler.h | 7 +++++++ ompi/contrib/vt/vt/extlib/otf/otflib/OTF_File.h | 8 ++++++++ ompi/contrib/vt/vt/extlib/otf/otflib/OTF_FileManager.h | 7 +++++++ ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Filenames.h | 8 ++++++++ .../contrib/vt/vt/extlib/otf/otflib/OTF_HandlerArray.h | 8 ++++++++ .../vt/vt/extlib/otf/otflib/OTF_MasterControl.h | 8 ++++++++ ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Parse.h | 7 +++++++ ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Platform.h | 10 ++++++---- ompi/contrib/vt/vt/extlib/otf/otflib/OTF_RBuffer.h | 8 ++++++++ ompi/contrib/vt/vt/extlib/otf/otflib/OTF_RStream.h | 10 +++++++--- ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Reader.h | 7 +++++++ ompi/contrib/vt/vt/extlib/otf/otflib/OTF_WBuffer.h | 8 ++++++++ ompi/contrib/vt/vt/extlib/otf/otflib/OTF_WStream.h | 8 ++++++++ ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Writer.h | 7 +++++++ ompi/contrib/vt/vt/extlib/otf/otflib/OTF_inttypes.h.in | 8 ++++++++ ompi/contrib/vt/vt/extlib/otf/otflib/otf.h | 10 ---------- 16 files changed, 112 insertions(+), 17 deletions(-) diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_CopyHandler.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_CopyHandler.h index 1e791143e6..cb4855b7d2 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_CopyHandler.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_CopyHandler.h @@ -18,6 +18,9 @@ #include "OTF_inttypes.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ /* *** Definition OTF_CopyHandler_r *** ************************************* */ @@ -144,5 +147,9 @@ int OTF_CopyHandler_FileGroupOperationSummary( void* userData, uint64_t time, uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, uint64_t byteswrite ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* OTF_COPYOTF_CopyHandler_R_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_File.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_File.h index f20a48d9d5..6082c499ef 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_File.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_File.h @@ -20,6 +20,10 @@ #include "OTF_Filenames.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /** mode determining what to do with a file */ enum enum_OTF_FileMode { @@ -85,4 +89,8 @@ void OTF_File_setZBufferSize( OTF_File* file, uint32_t size ); OTF_File* OTF_File_open_zlevel( const char* filename, OTF_FileManager* manager, OTF_FileMode mode, OTF_FileCompression compression ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* OTF_FILE_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_FileManager.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_FileManager.h index d660d9b861..651fe94e2a 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_FileManager.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_FileManager.h @@ -32,6 +32,10 @@ #include "OTF_inttypes.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + struct struct_OTF_File; typedef struct struct_OTF_File OTF_File; @@ -73,6 +77,9 @@ int OTF_FileManager_touchFile( OTF_FileManager* m, OTF_File* file ); internally. Return 1 on success, 0 otherwise. */ int OTF_FileManager_suspendFile( OTF_FileManager* m, OTF_File* file ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif /* OTF_FILEMANAGER_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Filenames.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Filenames.h index f4626cd6fc..c24811e3a8 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Filenames.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Filenames.h @@ -20,6 +20,10 @@ #include "OTF_Definitions.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /*#define OTF_FILETYPE_MASTER 0 #define OTF_FILETYPE_GLOBAL_DEF 1 #define OTF_FILETYPE_DEF 2 @@ -59,4 +63,8 @@ char* OTF_stripFilename( const char* filename ); /** DEPRICATED Check whether a file exists or not. Return 1 on success. */ int OTF_fileExists( const char* filename ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* OTF_FILENAMES */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_HandlerArray.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_HandlerArray.h index b9c0d12939..d7f2864096 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_HandlerArray.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_HandlerArray.h @@ -40,6 +40,10 @@ #include "OTF_Writer.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /** Generic function pointer for OTF record handlers. \ingroup ha*/ typedef int (OTF_FunctionPointer) ( void *userData, ... ); @@ -1058,5 +1062,9 @@ int OTF_Handler_UnknownRecord( void *userData, uint64_t value ); */ +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* OTF_HANDLERARRAY_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_MasterControl.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_MasterControl.h index d0c5e40ad7..e5f4196979 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_MasterControl.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_MasterControl.h @@ -126,6 +126,10 @@ #include "OTF_RBuffer.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /** entry for 1:n mapping */ struct struct_OTF_MapEntry { @@ -451,5 +455,9 @@ uint32_t* OTF_MasterControl_getValues( OTF_MasterControl* mc, uint32_t OTF_MasterControl_getNewStreamId( OTF_MasterControl* mc ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* OTF_MASTERCONTROL_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Parse.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Parse.h index 58a906a4ed..4e22f0b75b 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Parse.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Parse.h @@ -19,6 +19,10 @@ #include "OTF_HandlerArray.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /** Parse one event record from buffer and call the appropriate function - internal use only. */ int OTF_Reader_parseEventRecord( OTF_RBuffer* buffer, @@ -49,5 +53,8 @@ int OTF_Reader_readUnknownRecord( OTF_RBuffer* buffer, int OTF_Reader_readUnknownDefRecord( OTF_RBuffer* buffer, OTF_HandlerArray* handlers, uint32_t streamid ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif /* OTF_PARSE_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Platform.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Platform.h index e5ece1fece..1c1e924a2b 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Platform.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Platform.h @@ -20,9 +20,7 @@ #define OTF_PLATFORM_H #ifdef __cplusplus -#define EXTERN extern "C" -#else -#define EXTERN extern +extern "C" { #endif /* __cplusplus */ /* if you know (for sure) of more compilers supporting __FUNCTION__, @@ -84,6 +82,10 @@ #endif -EXTERN char *OTF_strdup( const char*s ); +char *OTF_strdup( const char*s ); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif /* OTF_PLATFORM_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_RBuffer.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_RBuffer.h index 3bf2a1a12a..aaf57cbbed 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_RBuffer.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_RBuffer.h @@ -26,6 +26,10 @@ #include "OTF_File.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + struct struct_OTF_RBuffer { @@ -206,5 +210,9 @@ uint64_t OTF_RBuffer_getFileSize( OTF_RBuffer* rbuffer ); /** Returns the fileposition of the file attached to this buffer */ uint64_t OTF_RBuffer_getFilePos( OTF_RBuffer* rbuffer ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* OTF_RBUFFER_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_RStream.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_RStream.h index 9277e575eb..593ad65785 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_RStream.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_RStream.h @@ -120,15 +120,16 @@ case. */ #include "OTF_inttypes.h" -struct struct_OTF_Reader; - - #include "OTF_FileManager.h" #include "OTF_RBuffer.h" #include "OTF_Filenames.h" #include "OTF_HandlerArray.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + struct struct_OTF_RStream { @@ -613,5 +614,8 @@ uint8_t OTF_RStream_snapshotBytesProgress( OTF_RStream* rstream, uint8_t OTF_RStream_statisticBytesProgress( OTF_RStream* rstream, uint64_t* minimum, uint64_t* current, uint64_t* maximum ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif /* OTF_RSTREAM_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Reader.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Reader.h index f550943474..fee370efb2 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Reader.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Reader.h @@ -28,6 +28,10 @@ #include "OTF_HandlerArray.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /** \defgroup reader Reader Interface * * The reader provides high level read access to traces @@ -794,5 +798,8 @@ uint8_t OTF_Reader_snapshotBytesProgress( OTF_Reader* reader, uint8_t OTF_Reader_statisticBytesProgress( OTF_Reader* reader, uint64_t* minimum, uint64_t* current, uint64_t* maximum ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif /* OTF_READER_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_WBuffer.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_WBuffer.h index 9f5161b470..7d6d0659f6 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_WBuffer.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_WBuffer.h @@ -27,6 +27,10 @@ #include "OTF_Filenames.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + struct struct_OTF_WBuffer { @@ -122,5 +126,9 @@ uint32_t OTF_WBuffer_writeNewline( OTF_WBuffer* wbuffer ); OTF_WBuffer* OTF_WBuffer_open_zlevel( const char* filename, OTF_FileManager* manager, OTF_FileCompression compression ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* OTF_WBUFFER_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_WStream.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_WStream.h index 0bfa9d7a35..0d88ace286 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_WStream.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_WStream.h @@ -88,6 +88,10 @@ #include "OTF_Filenames.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + struct struct_OTF_WStream { @@ -528,5 +532,9 @@ int OTF_WStream_writeCollOpSummary( OTF_WStream* wstream, uint64_t bytes_sent, uint64_t bytes_recved ); */ +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* OTF_WSTREAM_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Writer.h b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Writer.h index 4eac5841bd..ede992976f 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Writer.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_Writer.h @@ -89,6 +89,10 @@ #include "OTF_WStream.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /** writer object \ingroup writer */ typedef struct struct_OTF_Writer OTF_Writer; @@ -1168,6 +1172,9 @@ uint32_t OTF_Writer_mapProcess( OTF_Writer* writer, uint32_t processId ); create one and append it to 'streams'. \ingroup writer */ OTF_WStream* OTF_Writer_getStream( OTF_Writer* writer, uint32_t stream ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif /* OTF_WRITER_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_inttypes.h.in b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_inttypes.h.in index 2bf84a8878..a3fab0aaca 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_inttypes.h.in +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/OTF_inttypes.h.in @@ -72,6 +72,10 @@ #endif +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /** Converts unsigned integers of 8, 16, 32 or 64 bit length into OTF counter values. */ uint64_t OTF_Unsigned2Counter( uint64_t value ); /** Converts OTF counter values to unsigned integers of 8, 16, 32 or 64 bit length. */ @@ -95,5 +99,9 @@ uint64_t OTF_Double2Counter( double value ); /** Converts OTF counter values to double precision floating point values. */ double OTF_Counter2Double( uint64_t value ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* OTF_INTTYPES_H */ diff --git a/ompi/contrib/vt/vt/extlib/otf/otflib/otf.h b/ompi/contrib/vt/vt/extlib/otf/otflib/otf.h index 11cea3b826..c108a5e6c2 100644 --- a/ompi/contrib/vt/vt/extlib/otf/otflib/otf.h +++ b/ompi/contrib/vt/vt/extlib/otf/otflib/otf.h @@ -73,11 +73,6 @@ #define OTF_H -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - #include "OTF_Definitions.h" #include "OTF_FileManager.h" #include "OTF_Filenames.h" @@ -89,10 +84,5 @@ extern "C" { #include "OTF_Writer.h" -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - #endif /* OTF_H */