Forum: #1177. Only compile EXIV2_RCSID for Complers: GCC/G++/MSC to silence warnings. All others (clang,Oracle) ignore. Added Oracle compiler detection to version.cpp
This commit is contained in:
+3
-11
@@ -53,22 +53,14 @@
|
||||
|
||||
*/
|
||||
|
||||
#if defined(__clang__)
|
||||
#define EXIV2_RCSID(id)
|
||||
|
||||
#elif defined(OS_SOLARIS)
|
||||
#define EXIV2_RCSID(id) \
|
||||
{ \
|
||||
inline const char* getRcsId(const char*) { return id ; } \
|
||||
const char* rcsId = getRcsId(rcsId); \
|
||||
}
|
||||
|
||||
#else
|
||||
#if defined(__GNUG__) || defined(__GNUC__) || defined (_MSC_VER)
|
||||
#define EXIV2_RCSID(id) \
|
||||
namespace { \
|
||||
inline const char* getRcsId(const char*) { return id ; } \
|
||||
const char* rcsId = getRcsId(rcsId); \
|
||||
}
|
||||
#else
|
||||
#define EXIV2_RCSID(id)
|
||||
#endif
|
||||
|
||||
#endif // #if !defined (EXIV2_RCSID)
|
||||
|
||||
@@ -169,10 +169,19 @@ EXIV2API void dumpLibraryInfo(std::ostream& os)
|
||||
"G++" ;
|
||||
#elif defined(__GNUC__)
|
||||
"GCC" ;
|
||||
#elif defined(__SUNPRO_CC)
|
||||
"CC (oracle)";
|
||||
#elif defined (__SUNPRO_C)
|
||||
"cc (oracle)";
|
||||
#else
|
||||
"unknown" ;
|
||||
#endif
|
||||
|
||||
#if defined(__SUNPRO_CC) || defined (__SUNPRO_C)
|
||||
#define __oracle__
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __VERSION__
|
||||
#ifdef __clang__version__
|
||||
#define __VERSION__ __clang__version__
|
||||
|
||||
Reference in New Issue
Block a user