diff --git a/build/libtool.m4 b/build/libtool.m4 index 8ee7b453010..5b518d50e4e 100644 --- a/build/libtool.m4 +++ b/build/libtool.m4 @@ -277,7 +277,7 @@ dnl This sometimes fails to find confdefs.h, for some reason. dnl [#]line __oline__ "[$]0" [#]line __oline__ "configure" #include "confdefs.h" -int main() { +int main(void) { ; return 0; } EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then @@ -978,8 +978,8 @@ else # endif #endif -void fnord() { int i=42;} -int main () +void fnord(void) { int i=42;} +int main (void) { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; @@ -2750,7 +2750,7 @@ _LT_AC_TAGVAR(objext, $1)=$objext lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' +lt_simple_link_test_code='int main(void){return(0);}' _LT_AC_SYS_COMPILER @@ -4640,7 +4640,7 @@ void nm_test_func(){} #ifdef __cplusplus } #endif -int main(){nm_test_var='a';nm_test_func();return(0);} +int main(void){nm_test_var='a';nm_test_func();return(0);} EOF if AC_TRY_EVAL(ac_compile); then diff --git a/build/ltmain.sh b/build/ltmain.sh index 2f1c8c9dc80..ff1685c8a89 100755 --- a/build/ltmain.sh +++ b/build/ltmain.sh @@ -3598,7 +3598,7 @@ EOF # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c <]], [[struct tm *(*func)() = localtime_r]])],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct tm *(*func)(void) = localtime_r]])],[ : ],[ AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared]) ]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct tm *(*func)() = gmtime_r]])],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct tm *(*func)(void) = gmtime_r]])],[ : ],[ AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared]) ]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[char *(*func)() = asctime_r]])],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[char *(*func)(void) = asctime_r]])],[ : ],[ AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared]) ]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[char *(*func)() = ctime_r]])],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[char *(*func)(void) = ctime_r]])],[ : ],[ AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared]) ]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[char *(*func)() = strtok_r]])],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[char *(*func)(void) = strtok_r]])],[ : ],[ AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared]) @@ -1518,7 +1518,7 @@ AC_DEFUN([PHP_TEST_BUILD], [ LIBS="$4 $LIBS" AC_LINK_IFELSE([AC_LANG_SOURCE([[ $5 - char $1(); + char $1(void); int main(void) { $1(); return 0;