add check to see if CC supports '_Static_assert'
authorChristian Grothoff <christian@grothoff.org>
Wed, 8 Apr 2020 12:44:39 +0000 (14:44 +0200)
committerChristian Grothoff <christian@grothoff.org>
Wed, 8 Apr 2020 12:44:39 +0000 (14:44 +0200)
configure.ac
po/POTFILES.in

index c57a56f9ffe8203c93c1d51f969010123bf9a42d..3b3c9cbe981621233d09a2886c95023b25606b73 100644 (file)
@@ -691,6 +691,14 @@ AC_RUN_IFELSE(
 AC_LANG_POP(C)
 ])     # $build = $target
 
+AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+  [[int main() {
+      _Static_assert(sizeof(int) >= 4, "not big enough");
+      return 0;
+    };]])],
+  [AC_DEFINE([HAVE_STATIC_ASSERT],[1],[Static assertions supported])],
+  [AC_DEFINE([HAVE_STATIC_ASSERT],[0],[Static assertions not supported])])
+
 # check for bluetooth library
 bluetooth=0
 AC_MSG_CHECKING(for libbluetooth)
index aaeed979cda4c4cb222f9c291484b14769ffc6b3..ed999179613bdf09b927b8a7308e990678522c9e 100644 (file)
@@ -437,6 +437,7 @@ src/util/common_endian.c
 src/util/common_logging.c
 src/util/configuration.c
 src/util/configuration_loader.c
+src/util/consttime_memcmp.c
 src/util/container_bloomfilter.c
 src/util/container_heap.c
 src/util/container_meta_data.c