check_and_add_compiler_option(-Wdeclaration-after-statement)
check_and_add_compiler_option(-Wused-but-marked-unused)
check_and_add_compiler_option(-Wdocumentation)
+ check_and_add_compiler_option(-Wcomma)
endif()
endif()
AC_LBL_CHECK_COMPILER_OPT($1, -Wdeclaration-after-statement)
AC_LBL_CHECK_COMPILER_OPT($1, -Wused-but-marked-unused)
AC_LBL_CHECK_COMPILER_OPT($1, -Wdocumentation)
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wcomma)
fi
AC_LBL_CHECK_DEPENDENCY_GENERATION_OPT()
#
$as_echo "no" >&6; }
CFLAGS="$save_CFLAGS"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5
+$as_echo_n "checking whether the compiler supports the -Wcomma option... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ if expr "x-Wcomma" : "x-W.*" >/dev/null
+ then
+ CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcomma"
+ elif expr "x-Wcomma" : "x-f.*" >/dev/null
+ then
+ CFLAGS="$CFLAGS -Werror -Wcomma"
+ elif expr "x-Wcomma" : "x-m.*" >/dev/null
+ then
+ CFLAGS="$CFLAGS -Werror -Wcomma"
+ else
+ CFLAGS="$CFLAGS -Wcomma"
+ fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$save_CFLAGS"
+ V_CCOPT="$V_CCOPT -Wcomma"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$save_CFLAGS"
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cp = &cstate->chunks[cstate->cur_chunk];
if (n > cp->n_left) {
- ++cp, k = ++cstate->cur_chunk;
+ ++cp;
+ k = ++cstate->cur_chunk;
if (k >= NCHUNKS)
bpf_error(cstate, "out of memory");
size = CHUNK0SIZE << k;