libnetbsd: import the __nothing macro
This macro is widely used in new NetBSD tests. Please see the comment next to the imported macro for more details on its use. Obtained from: NetBSD (c26cc77b3a0b2) MFC after: 1 week
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
@@ -81,4 +80,18 @@
|
||||
#define __BITS(__m, __n) \
|
||||
((__BIT(MAX((__m), (__n)) + 1) - 1) ^ (__BIT(MIN((__m), (__n))) - 1))
|
||||
|
||||
/*
|
||||
* To be used when an empty body is required like:
|
||||
*
|
||||
* #ifdef DEBUG
|
||||
* # define dprintf(a) printf(a)
|
||||
* #else
|
||||
* # define dprintf(a) __nothing
|
||||
* #endif
|
||||
*
|
||||
* We use ((void)0) instead of do {} while (0) so that it
|
||||
* works on , expressions.
|
||||
*/
|
||||
#define __nothing (/*LINTED*/(void)0)
|
||||
|
||||
#endif /* _LIBNETBSD_SYS_CDEFS_H_ */
|
||||
|
||||
Reference in New Issue
Block a user