File: static_assert.m4

package info (click to toggle)
libcypher-parser 0.6.2-0.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,072 kB
  • sloc: ansic: 22,684; makefile: 273; sh: 149
file content (15 lines) | stat: -rw-r--r-- 481 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
AC_DEFUN([STATIC_ASSERT],
  [AC_CACHE_CHECK([for static_assert],
    [neo4j_cv_macro_static_assert],
    [AC_COMPILE_IFELSE(
      [AC_LANG_PROGRAM([[
#include <assert.h>
static_assert(1, "impossible");
      ]],[[return 0;]])],
      [neo4j_cv_macro_static_assert=yes],
      [neo4j_cv_macro_static_assert=no])])

  if test "X$neo4j_cv_macro_static_assert" = "Xno"; then
    AC_DEFINE([static_assert(c,m)],[typedef void _no_static_assert], [Substitute for static_assert])
  fi
])