Add "extern C {...} to header files for C++ builds.
[freeradius.git] / src / include / ident.h
index 2765e60..5a2a273 100644 (file)
 #ifndef IDENT_H
 #define IDENT_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined(__GNUC__)
 /* force inclusion of ident keywords in the face of optimization */
 #define RCSID(id) static const char rcsid[] __attribute__ ((used)) = id;
 #define DO_PRAGMA(x) _Pragma(#x)
 #define RCSID(id) DO_PRAGMA(sun ident id)
 #define RCSIDH(h, id) DO_PRAGMA(sun ident id)
+#else
+#define RCSID(id)
+#define RCSIDH(h, id)
+#endif
+
+#ifdef __cplusplus
+}
 #endif
 
 #endif /* IDENT_H */