aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2026-07-25 16:51:53 +0000
committerEnji Cooper <ngie@FreeBSD.org>2026-07-25 16:55:38 +0000
commitbc81728c00b200297ac556974b5373c804077a17 (patch)
tree3680cf405077e11f6cb8cc7b7b08b1e908591c8f
parent64038db825d64fb4827fc8ee264ea0fa1a046d82 (diff)
[test] libatexit: leverage __{BEGIN,END}_DECLS
This change converts the longhand form of `extern "C" {` and its corresponding `}` into `__BEGIN_DECLS` and `__END_DECLS`, respectively. The new form is much easier to grep for and is a best practice to use in the FreeBSD tree. This is meant to be a non-functional change. MFC after: 1 week
-rw-r--r--lib/libc/tests/stdlib/libatexit/libatexit.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libc/tests/stdlib/libatexit/libatexit.cc b/lib/libc/tests/stdlib/libatexit/libatexit.cc
index 7c5a7126d178..5dcbe8a33dc0 100644
--- a/lib/libc/tests/stdlib/libatexit/libatexit.cc
+++ b/lib/libc/tests/stdlib/libatexit/libatexit.cc
@@ -5,15 +5,18 @@
*
*/
+#include <sys/cdefs.h>
#include <unistd.h>
static int exit_code = -1;
static bool fatal_atexit;
-extern "C" {
- void set_fatal_atexit(bool);
- void set_exit_code(int);
-}
+__BEGIN_DECLS
+
+void set_fatal_atexit(bool);
+void set_exit_code(int);
+
+__END_DECLS
void
set_fatal_atexit(bool fexit)