AC_MSG_RESULT($ac_cv___attribute___noreturn_function_pointer)
])
+dnl
+dnl Test whether __attribute__((fallthrough)) can be used without warnings
+dnl
+
+AC_DEFUN(AC_C___ATTRIBUTE___FALLTHROUGH, [
+AC_MSG_CHECKING([whether __attribute__((fallthrough)) can be used without warnings])
+AC_CACHE_VAL(ac_cv___attribute___fallthrough, [
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+AC_COMPILE_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdio.h>
+
+int
+main(int argc, char **argv)
+{
+ int x = 1;
+ switch (x)
+ {
+ case 1:
+ printf ("x == %d\n", x);
+ __attribute__ ((fallthrough));
+ case 2:
+ printf ("x == %d\n", x);
+ break;
+ default:
+ return 0;
+ }
+ return x;
+}
+ ]])],
+ac_cv___attribute___fallthrough=yes,
+ac_cv___attribute___fallthrough=no)])
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___fallthrough" = "yes"; then
+ AC_DEFINE(__ATTRIBUTE___FALLTHROUGH_OK, 1,
+ [define if your compiler allows __attribute__((fallthrough)) without a warning])
+fi
+AC_MSG_RESULT($ac_cv___attribute___fallthrough)
+])
+
AC_DEFUN(AC_LBL_SSLEAY,
[
#
#define below would cause a syntax error. */
#undef _UINT8_T
+/* define if your compiler allows __attribute__((fallthrough)) without a
+ warning */
+#undef __ATTRIBUTE___FALLTHROUGH_OK
+
/* define if your compiler allows __attribute__((format)) without a warning */
#undef __ATTRIBUTE___FORMAT_OK
$as_echo "$ac_cv___attribute___format_function_pointer" >&6; }
fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((fallthrough)) can be used without warnings" >&5
+$as_echo_n "checking whether __attribute__((fallthrough)) can be used without warnings... " >&6; }
+if ${ac_cv___attribute___fallthrough+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdio.h>
+
+int
+main(int argc, char **argv)
+{
+ int x = 1;
+ switch (x)
+ {
+ case 1:
+ printf ("x == %d\n", x);
+ __attribute__ ((fallthrough));
+ case 2:
+ printf ("x == %d\n", x);
+ break;
+ default:
+ return 0;
+ }
+ return x;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv___attribute___fallthrough=yes
+else
+ ac_cv___attribute___fallthrough=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___fallthrough" = "yes"; then
+
+$as_echo "#define __ATTRIBUTE___FALLTHROUGH_OK 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___fallthrough" >&5
+$as_echo "$ac_cv___attribute___fallthrough" >&6; }
+
fi
ac_ext=c
if test "$ac_cv___attribute___format" = "yes"; then
AC_C___ATTRIBUTE___FORMAT_FUNCTION_POINTER
fi
+ AC_C___ATTRIBUTE___FALLTHROUGH
fi
AC_CHECK_HEADERS(fcntl.h rpc/rpc.h rpc/rpcent.h netdnet/dnetdb.h)
#define max(a,b) ((b)>(a)?(b):(a))
#endif
+#ifdef __ATTRIBUTE___FALLTHROUGH_OK
+# define ND_FALL_THROUGH __attribute__ ((fallthrough))
+#else
+# define ND_FALL_THROUGH
+#endif /* __ATTRIBUTE___FALLTHROUGH_OK */
+
#endif /* netdissect_stdinc_h */