Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 3 May 2023 13:26:08 +0200
From: Jens Gustedt <Jens.Gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: [C23 feature tests 2/6] C23: add a feature test for the __VA_OPT__
 feature

---
 include/features.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/features.h b/include/features.h
index 8e1d84e3..05abcadc 100644
--- a/include/features.h
+++ b/include/features.h
@@ -57,4 +57,8 @@
 
 #define __REDIR(x,y) __typeof__(x) x __asm__(#y)
 
+#define __has_VA_OPT2(_0, _1, ...) _1
+#define __has_VA_OPT1(...) __has_VA_OPT2(__VA_OPT__(,) 1, 0,)
+#define __has_VA_OPT __has_VA_OPT1(C23)
+
 #endif
-- 
2.34.1

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.