various things

disable paranoid check which was never triggered as far as I'm aware
add editorconfig
some whitespace changes in configure.ac
which to batch mode by default
start working on putting all filtering options in one bin
some other tweaks
This commit is contained in:
cathugger
2020-11-21 11:34:25 +00:00
parent 9eb4b328f0
commit 30491bd9f8
7 changed files with 79 additions and 39 deletions

View File

@@ -33,9 +33,9 @@ oldcflags="$CFLAGS"
CFLAGS="-nopie -Werror"
AC_MSG_CHECKING([whether CC supports -nopie])
AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[nopie="-nopie"],
[AC_MSG_RESULT([no])]
[AC_MSG_RESULT([yes])]
[nopie="-nopie"],
[AC_MSG_RESULT([no])]
)
CFLAGS="$oldcflags"
@@ -178,35 +178,35 @@ oldcflags="$CFLAGS"
CFLAGS="-std=c99"
AC_MSG_CHECKING([whether CC supports -std=c99])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[c99="yes"]
[cstd="-std=c99"],
[AC_MSG_RESULT([no])]
[AC_MSG_RESULT([yes])]
[c99="yes"]
[cstd="-std=c99"],
[AC_MSG_RESULT([no])]
)
CFLAGS="$cstd -Wall"
AC_MSG_CHECKING([whether CC supports -Wall])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[cstd="$cstd -Wall"],
[AC_MSG_RESULT([no])]
[AC_MSG_RESULT([yes])]
[cstd="$cstd -Wall"],
[AC_MSG_RESULT([no])]
)
CFLAGS="$cstd -Wextra"
AC_MSG_CHECKING([whether CC supports -Wextra])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[cstd="$cstd -Wextra"],
[AC_MSG_RESULT([no])]
[AC_MSG_RESULT([yes])]
[cstd="$cstd -Wextra"],
[AC_MSG_RESULT([no])]
)
# (negative) detection on clang fails without -Werror
CFLAGS="$cstd -Wno-maybe-uninitialized -Werror"
AC_MSG_CHECKING([whether CC supports -Wno-maybe-uninitialized])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[cstd="$cstd -Wno-maybe-uninitialized"],
[AC_MSG_RESULT([no])]
[AC_MSG_RESULT([yes])]
[cstd="$cstd -Wno-maybe-uninitialized"],
[AC_MSG_RESULT([no])]
)
if test "x$c99" = "xyes" -a "x$ed25519impl" != "xdonna" -a "x$enable_intfilter" != "x128"
@@ -244,18 +244,18 @@ fi
CFLAGS="$cstd -Wmissing-prototypes -Werror"
AC_MSG_CHECKING([whether CC supports -Wmissing-prototypes])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[cstd="$cstd -Wmissing-prototypes"],
[AC_MSG_RESULT([no])]
[AC_MSG_RESULT([yes])]
[cstd="$cstd -Wmissing-prototypes"],
[AC_MSG_RESULT([no])]
)
# XXX AC_LANG_PROGRAM produces unsuitable prototype so this check must be last one
CFLAGS="$cstd -Wstrict-prototypes -Werror"
AC_MSG_CHECKING([whether CC supports -Wstrict-prototypes])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int main(void) { return 0; }]])],
[AC_MSG_RESULT([yes])]
[cstd="$cstd -Wstrict-prototypes"],
[AC_MSG_RESULT([no])]
[AC_MSG_RESULT([yes])]
[cstd="$cstd -Wstrict-prototypes"],
[AC_MSG_RESULT([no])]
)
CFLAGS="$oldcflags"