Add "extern C {...} to header files for C++ builds.
[freeradius.git] / src / include / token.h
index 52d5da3..8b5c24d 100644 (file)
 #include <freeradius-devel/ident.h>
 RCSIDH(token_h, "$Id$")
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef enum fr_token_t {
   T_OP_INVALID = 0,            /* invalid token */
   T_EOL,                       /* end of line */
@@ -71,9 +75,13 @@ const char *fr_int2str(const FR_NAME_NUMBER *table, int number,
                         const char *def);
 
 
-int            getword (char **ptr, char *buf, int buflen);
-int            getbareword (char **ptr, char *buf, int buflen);
-FR_TOKEN       gettoken(char **ptr, char *buf, int buflen);
-FR_TOKEN       getstring(char **ptr, char *buf, int buflen);
+int            getword (const char **ptr, char *buf, int buflen);
+int            getbareword (const char **ptr, char *buf, int buflen);
+FR_TOKEN       gettoken(const char **ptr, char *buf, int buflen);
+FR_TOKEN       getstring(const char **ptr, char *buf, int buflen);
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* FR_TOKEN_H */