Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Nov 2024 20:09:40 GMT
From:      Jessica Clarke <jrtc27@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 7a3af393d8ac - main - sys/cdefs.h: Add comments to make #if/#else/#endif triple more obvious
Message-ID:  <202411202009.4AKK9epl044455@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jrtc27:

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

commit 7a3af393d8ac2dfe72d24fe401344b60c4f87866
Author:     Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2024-11-20 20:09:28 +0000
Commit:     Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2024-11-20 20:09:28 +0000

    sys/cdefs.h: Add comments to make #if/#else/#endif triple more obvious
    
    This block has a lot of nesting, not helped by two adjacent nested
    blocks involving _POSIX_C_SOURCE, with only the inner one commented,
    looking like it's the end of the outer one. Comment the outer one as
    well so it's not quite so hard to figure out.
    
    MFC after:      1 week
---
 sys/sys/cdefs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index 0f53ff816527..4f4f09a3d763 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -596,7 +596,7 @@
 #undef __ISO_C_VISIBLE
 #define __ISO_C_VISIBLE		2011
 #endif
-#else
+#else /* _POSIX_C_SOURCE */
 /*-
  * Deal with _ANSI_SOURCE:
  * If it is defined, and no other compilation environment is explicitly
@@ -640,7 +640,7 @@
 #define	__ISO_C_VISIBLE		2023
 #define	__EXT1_VISIBLE		1
 #endif
-#endif
+#endif /* _POSIX_C_SOURCE */
 
 /* User override __EXT1_VISIBLE */
 #if defined(__STDC_WANT_LIB_EXT1__)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411202009.4AKK9epl044455>