diff --git a/contrib/libxo/libxo/xo.h b/contrib/libxo/libxo/xo.h --- a/contrib/libxo/libxo/xo.h +++ b/contrib/libxo/libxo/xo.h @@ -20,6 +20,10 @@ #ifndef INCLUDE_XO_H #define INCLUDE_XO_H +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #include #include #include @@ -699,4 +703,8 @@ void xo_retain_clear (const char *fmt); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* INCLUDE_XO_H */ diff --git a/contrib/libxo/libxo/xo_buf.h b/contrib/libxo/libxo/xo_buf.h --- a/contrib/libxo/libxo/xo_buf.h +++ b/contrib/libxo/libxo/xo_buf.h @@ -19,6 +19,10 @@ #ifndef XO_BUF_H #define XO_BUF_H +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #define XO_BUFSIZ (8*1024) /* Initial buffer size */ #define XO_BUF_HIGH_WATER (XO_BUFSIZ - 512) /* When to auto-flush */ /* @@ -160,4 +164,8 @@ xbp->xb_curp += len; } +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* XO_BUF_H */ diff --git a/contrib/libxo/libxo/xo_encoder.h b/contrib/libxo/libxo/xo_encoder.h --- a/contrib/libxo/libxo/xo_encoder.h +++ b/contrib/libxo/libxo/xo_encoder.h @@ -18,6 +18,10 @@ #ifndef XO_ENCODER_H #define XO_ENCODER_H +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #include /* @@ -167,4 +171,8 @@ void xo_failure (xo_handle_t *xop, const char *fmt, ...); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* XO_ENCODER_H */ diff --git a/contrib/libxo/libxo/xo_explicit.h b/contrib/libxo/libxo/xo_explicit.h --- a/contrib/libxo/libxo/xo_explicit.h +++ b/contrib/libxo/libxo/xo_explicit.h @@ -12,6 +12,10 @@ #ifndef XO_EXPLICIT_H #define XO_EXPLICIT_H +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /* * NOTE WELL: This file is needed to software that implements an * explicit transition between libxo states on its internal stack. @@ -57,5 +61,8 @@ void xo_explicit_transition (xo_handle_t *xop, xo_state_t new_state, const char *tag, xo_xof_flags_t flags); +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif /* XO_EXPLICIT_H */