git: 5cf20707ba79 - main - stand: Allow stand.h to be included in C++ programs
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 07 Jan 2023 01:41:59 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5cf20707ba79b5c06b26381da0013c65004b53be commit 5cf20707ba79b5c06b26381da0013c65004b53be Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2023-01-07 01:39:09 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-01-07 01:40:01 +0000 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 <sys/types.h> #include <sys/cdefs.h> + +#include <sys/types.h> #include <sys/stat.h> #include <sys/dirent.h> #include <sys/queue.h> @@ -90,6 +91,8 @@ /* Partial signal emulation for sig_atomic_t */ #include <machine/signal.h> +__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 */