From 6ce30bd21eeae5630087f549f7aaec487c80b802 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 30 Aug 2015 15:16:52 +0200 Subject: add __SLIBC_ONLY macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/slibc/features.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/slibc/features.h b/include/slibc/features.h index f62f5cb..b6fc406 100644 --- a/include/slibc/features.h +++ b/include/slibc/features.h @@ -80,6 +80,16 @@ #endif +/** + * Macro used to exclude code unless `_SLIBC_SOURCE` is set. + */ +#if defined(_SLIBC_SOURCE) +# define __SLIBC_ONLY(...) __VA_ARGS__ +#else +# define __SLIBC_ONLY(...) /* ignore */ +#endif + + #endif -- cgit v1.2.3-70-g09d2