From 5cf20707ba79b5c06b26381da0013c65004b53be Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 6 Jan 2023 18:39:09 -0700 Subject: [PATCH] stand: Allow stand.h to be included in C++ programs Allow stand.h to be included in C++ programs. This is little more than using our stylized __BEGIN_DECL / __END_DECL around the entire file. There's no run-time support for C++, so the C++ that can be used is quite limited. It is enough for libunwind, though. Sponsored by: Netflix Reviewed by: jrtc27, kevans Differential Revision: https://reviews.freebsd.org/D37946 --- stand/libsa/stand.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h index c0550104bca0..b5087d17e114 100644 --- a/stand/libsa/stand.h +++ b/stand/libsa/stand.h @@ -61,8 +61,9 @@ #ifndef STAND_H #define STAND_H -#include #include + +#include #include #include #include @@ -90,6 +91,8 @@ /* Partial signal emulation for sig_atomic_t */ #include +__BEGIN_DECLS + struct open_file; /* @@ -509,4 +512,6 @@ void tslog(const char *, const char *, const char *); void tslog_setbuf(void * buf, size_t len); void tslog_getbuf(void ** buf, size_t * len); +__END_DECLS + #endif /* STAND_H */