File: static_assert.m4

package info (click to toggle)
libneo4j-client 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 3,444 kB
  • ctags: 2,333
  • sloc: ansic: 24,977; sh: 4,261; makefile: 206
file content (15 lines) | stat: -rw-r--r-- 457 bytes parent folder | download
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_static_assert],
    [AC_COMPILE_IFELSE(
      [AC_LANG_PROGRAM([[
#include <assert.h>
static_assert(1, "impossible");
      ]],[[return 0;]])],
      [neo4j_cv_static_assert=yes],
      [neo4j_cv_static_assert=no])])

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