git: bc81728c00b2 - main - [test] libatexit: leverage __{BEGIN,END}_DECLS

Enji Cooper <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a64eab5.1e32e.13c91658__17056.0277228773$1784998597$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=bc81728c00b200297ac556974b5373c804077a17

commit bc81728c00b200297ac556974b5373c804077a17
Author:     Enji Cooper <[email protected]>
AuthorDate: 2026-07-25 16:51:53 +0000
Commit:     Enji Cooper <[email protected]>
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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.