Date: Sat, 25 Jul 2026 16:56:21 +0000
From: Enji Cooper <ngie@FreeBSD.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject: git: bc81728c00b2 - main - [test] libatexit: leverage __{BEGIN,END}_DECLS
Message-ID: <6a64eab5.1e32e.13c91658@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=bc81728c00b200297ac556974b5373c804077a17 commit bc81728c00b200297ac556974b5373c804077a17 Author: Enji Cooper <ngie@FreeBSD.org> AuthorDate: 2026-07-25 16:51:53 +0000 Commit: Enji Cooper <ngie@FreeBSD.org> CommitDate: 2026-07-25 16:55:38 +0000 [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 --- lib/libc/tests/stdlib/libatexit/libatexit.cc | 11 +++++++---- 1 file 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)home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a64eab5.1e32e.13c91658>
