mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
contrib/libxo: fix API header files inclusions in C++ source files
C++ source files need `extern "C"` to disable C++ name mangling. MFC after: 1 week Reviewed by: aokblast (previous version), phil, imp (previous version) Differential Revision: https://reviews.freebsd.org/D47930
This commit is contained in:
parent
6d624634ac
commit
11ace56fa0
2 changed files with 16 additions and 0 deletions
|
|
@ -27,6 +27,10 @@
|
|||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifdef __dead2
|
||||
#define NORETURN __dead2
|
||||
#else
|
||||
|
|
@ -699,4 +703,8 @@ xo_retain_clear_all (void);
|
|||
void
|
||||
xo_retain_clear (const char *fmt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* INCLUDE_XO_H */
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* Expose libxo's memory allocation functions
|
||||
*/
|
||||
|
|
@ -167,4 +171,8 @@ xo_encoder_op_name (xo_encoder_op_t op);
|
|||
void
|
||||
xo_failure (xo_handle_t *xop, const char *fmt, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* XO_ENCODER_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue