ref: 55cb13e7c12c6f14612437e26fa013fe9e9babd0
parent: 9ee03ddc4699baae6ac82c0db2be9b6a727cb9cd
author: Diego Biurrun <diego@biurrun.de>
date: Wed Oct 22 08:59:03 EDT 2014
attributes.m4: Properly declare parameterless main() functions.
--- a/m4/attributes.m4
+++ b/m4/attributes.m4
@@ -39,7 +39,7 @@
AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]),
[ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $1"
- AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return 0; }])],
[eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"],
[eval "AS_TR_SH([cc_cv_cflags_$1])='no'"])
CFLAGS="$ac_save_CFLAGS"
@@ -89,7 +89,7 @@
AS_TR_SH([cc_cv_ldflags_$1]),
[ac_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $1"
- AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 1; }])],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return 1; }])],
[eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
[eval "AS_TR_SH([cc_cv_ldflags_$1])="])
LDFLAGS="$ac_save_LDFLAGS"
@@ -281,7 +281,7 @@
CFLAGS="$CFLAGS $cc_cv_werror"
for cc_attribute_align_try in 64 32 16 8 4 2; do
AC_COMPILE_IFELSE([
- int main() {
+ int main(void) {
static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0;
return c;
}], [cc_cv_attribute_aligned=$cc_attribute_align_try; break])