Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/common/include/linux stub BUILD_BUG_ON_ZERO...



details:   https://anonhg.NetBSD.org/src/rev/697fb2986dd5
branches:  trunk
changeset: 1028521:697fb2986dd5
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:14:26 2021 +0000

description:
stub BUILD_BUG_ON_ZERO, from openbsd.

This is a dual purpose macro that asserts but can also be used in
expressions. Provide the expression implementation.


Author: Maya Rashish <maya%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/common/include/linux/build_bug.h |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 38229cd4ef24 -r 697fb2986dd5 sys/external/bsd/common/include/linux/build_bug.h
--- a/sys/external/bsd/common/include/linux/build_bug.h Sun Dec 19 11:14:16 2021 +0000
+++ b/sys/external/bsd/common/include/linux/build_bug.h Sun Dec 19 11:14:26 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: build_bug.h,v 1.2 2021/12/19 11:10:48 riastradh Exp $  */
+/*     $NetBSD: build_bug.h,v 1.3 2021/12/19 11:14:26 riastradh Exp $  */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -41,5 +41,6 @@
 #define        BUILD_BUG()                     do {} while (0)
 #define        BUILD_BUG_ON_MSG(EXPR,MSG)      BUILD_BUG_ON(EXPR)
 #define        BUILD_BUG_ON_INVALID(EXPR)      ((void)sizeof((long)(EXPR)))
+#define        BUILD_BUG_ON_ZERO(EXPR)         0
 
 #endif /* _LINUX_BUILD_BUG_H_ */



Home | Main Index | Thread Index | Old Index