summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2022-11-12 00:41:15 +0100
committerAlejandro Colomar <alx@nginx.com>2022-11-15 13:06:09 +0100
commit5a1597072496067f6cf36320687d6e9d9b5fa604 (patch)
tree09999f31368c045cb4b60d05c8c1fd8696eca729
parentb30b0905a6045f880e004a0fcdfb15e4cdb1d841 (diff)
downloadunit-5a1597072496067f6cf36320687d6e9d9b5fa604.tar.gz
unit-5a1597072496067f6cf36320687d6e9d9b5fa604.tar.bz2
Added NXT_HAVE_C11_GENERIC.
Test if _Generic(3) is available. Although we require GNU C11, some old compilers, like the one in CentOS 7 still don't have full support for C11, and _Generic(3) is not available there. Acked-by: Andrew Clayton <a.clayton@nginx.com> Signed-off-by: Alejandro Colomar <alx@nginx.com>
-rw-r--r--auto/clang11
1 files changed, 11 insertions, 0 deletions
diff --git a/auto/clang b/auto/clang
index 975a6468..f7f0dd64 100644
--- a/auto/clang
+++ b/auto/clang
@@ -6,6 +6,17 @@
# C language features.
+nxt_feature="C11 _Generic()"
+nxt_feature_name=NXT_HAVE_C11_GENERIC
+nxt_feature_run=no
+nxt_feature_incs=
+nxt_feature_libs=
+nxt_feature_test="int main(void) {
+ return _Generic(1, int: 0);
+ }"
+. auto/feature
+
+
nxt_feature="C99 variadic macro"
nxt_feature_name=NXT_HAVE_C99_VARIADIC_MACRO
nxt_feature_run=yes