diff options
-rw-r--r-- | doc/autoconf.texi | 2 | ||||
-rw-r--r-- | lib/autoconf/c.m4 | 4 | ||||
-rw-r--r-- | lib/autoconf/functions.m4 | 10 | ||||
-rw-r--r-- | lib/autoconf/specific.m4 | 2 | ||||
-rw-r--r-- | lib/autoconf/types.m4 | 2 | ||||
-rw-r--r-- | tests/c.at | 4 | ||||
-rw-r--r-- | tests/compile.at | 12 |
7 files changed, 18 insertions, 18 deletions
diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 6795fcb6..4a4ee81d 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -9132,7 +9132,7 @@ on a system with @command{gcc} installed, results in: const char hw[] = "Hello, World\n"; int -main () +main (void) @{ fputs (hw, stdout); ; diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index f0f66678..b58e42d3 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -97,7 +97,7 @@ m4_define([AC_LANG_PROGRAM(C)], m4_ifdef([_AC_LANG_PROGRAM_C_F77_HOOKS], [_AC_LANG_PROGRAM_C_F77_HOOKS])[]dnl m4_ifdef([_AC_LANG_PROGRAM_C_FC_HOOKS], [_AC_LANG_PROGRAM_C_FC_HOOKS])[]dnl int -main () +main (void) { dnl Do *not* indent the following line: there may be CPP directives. dnl Don't move the `;' right after for the same reason. @@ -2061,7 +2061,7 @@ m4_define([_AC_LANG_OPENMP(C)], choke me #endif #include <omp.h> -int main () { return omp_get_num_threads (); } +int main (void) { return omp_get_num_threads (); } ]) # _AC_LANG_OPENMP(C++) diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 41752127..c7790ec3 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -1147,7 +1147,7 @@ year_2050_test () } int -main () +main (void) { time_t t, delta; int i, j; @@ -1274,7 +1274,7 @@ AC_CACHE_CHECK([for working mmap], [ac_cv_func_mmap_fixed_mapped], #endif /* no HAVE_GETPAGESIZE */ int -main () +main (void) { char *data, *data2, *data3; const char *cdata2; @@ -1562,7 +1562,7 @@ AC_CACHE_CHECK(for working strtod, ac_cv_func_strtod, double strtod (); #endif int -main() +main (void) { { /* Some versions of Linux strtod mis-parse strings with leading '+'. */ @@ -1900,7 +1900,7 @@ sparc_address_test (int arg) } int -main () +main (void) { pid_t parent = getpid (); pid_t child; @@ -2018,7 +2018,7 @@ AC_CACHE_CHECK([for wait3 that fills in rusage], #include <sys/wait.h> /* HP-UX has wait3 but does not fill in rusage at all. */ int -main () +main (void) { struct rusage r; int i; diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index eadde52e..de940f21 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -254,7 +254,7 @@ void ucatch (dummy) int dummy; { } #endif int -main () +main (void) { int i = fork (), status; diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4 index 2ef4d534..a7a229ef 100644 --- a/lib/autoconf/types.m4 +++ b/lib/autoconf/types.m4 @@ -267,7 +267,7 @@ AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups, #define MAX(x, y) ((x) > (y) ? (x) : (y)) int -main () +main (void) { gid_t gidset[NGID]; int i, n; @@ -366,7 +366,7 @@ AT_DATA([foo.c], #endif #include <stdio.h> -int main () +int main (void) { #ifdef _OPENMP #pragma omp parallel @@ -416,7 +416,7 @@ foo.@OBJEXT@: foo.cpp ]]) AT_DATA([foo.cpp], -[[int main () +[[int main (void) { return 0; } diff --git a/tests/compile.at b/tests/compile.at index e6e96fac..43c36e52 100644 --- a/tests/compile.at +++ b/tests/compile.at @@ -124,7 +124,7 @@ AC_PROG_CC AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#ifndef PACKAGE_NAME choke me #endif -int main () +int main (void) { return 0; } @@ -150,7 +150,7 @@ AC_LANG([C++]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#ifndef PACKAGE_NAME choke me #endif -int main () +int main (void) { return 0; } @@ -249,7 +249,7 @@ AT_CHECK([sed -n 's/ *$//; /#define PACKAGE/,$p' stdout], [], const char hw[] = "Hello, World\n"; int -main () +main (void) { fputs (hw, stdout); ; @@ -269,7 +269,7 @@ AT_KEYWORDS([AC_LANG_DEFINES_PROVIDED]) AT_DATA([configure.ac], [[AC_INIT -AC_COMPILE_IFELSE([int main () { return 0; }], [], +AC_COMPILE_IFELSE([int main (void) { return 0; }], [], [AC_MSG_ERROR([compiling trivial program failed])]) ]]) @@ -280,7 +280,7 @@ AT_CHECK_CONFIGURE([-q]) AT_DATA([configure.ac], [[AC_INIT -AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED()int main () { return 0; }], [], +AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED()int main (void) { return 0; }], [], [AC_MSG_ERROR([compiling trivial program failed])]) ]]) @@ -324,7 +324,7 @@ test $estatus != 2 && AC_MSG_ERROR([did not get as 2 exit status: $estatus])]) # The old stinky one. -AC_TRY_RUN([int main () { return 3; }], +AC_TRY_RUN([int main (void) { return 3; }], [AC_MSG_ERROR([saw `return 3' as a success])], [estatus=$? test $estatus != 3 && |