@@ -1034,7 +1034,7 @@ AC_DEFUN([_PHP_CHECK_SIZEOF], [
10341034#endif
10351035$3
10361036
1037- int main()
1037+ int main(void )
10381038{
10391039 FILE *fp = fopen("conftestval", "w");
10401040 if (!fp) return(1);
@@ -1102,7 +1102,7 @@ AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[
11021102AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [ [
11031103#include <time.h>
11041104
1105- int main() {
1105+ int main(void ) {
11061106char buf[ 27] ;
11071107struct tm t;
11081108time_t old = 0;
@@ -1118,7 +1118,7 @@ return (1);
11181118] ,[
11191119 AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [ [
11201120#include <time.h>
1121- int main() {
1121+ int main(void ) {
11221122 struct tm t, *s;
11231123 time_t old = 0;
11241124 char buf[ 27] , *p;
@@ -1159,7 +1159,7 @@ AC_DEFUN([PHP_DOES_PWRITE_WORK],[
11591159#include <errno.h>
11601160#include <stdlib.h>
11611161$1
1162- int main() {
1162+ int main(void ) {
11631163 int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
11641164
11651165 if (fd < 0) return 1;
@@ -1193,7 +1193,7 @@ AC_DEFUN([PHP_DOES_PREAD_WORK],[
11931193#include <errno.h>
11941194#include <stdlib.h>
11951195$1
1196- int main() {
1196+ int main(void ) {
11971197 char buf[ 3] ;
11981198 int fd = open("conftest_in", O_RDONLY);
11991199 if (fd < 0) return 1;
@@ -1261,27 +1261,27 @@ dnl PHP_MISSING_TIME_R_DECL
12611261dnl
12621262AC_DEFUN ( [ PHP_MISSING_TIME_R_DECL] ,[
12631263 AC_MSG_CHECKING ( [ for missing declarations of reentrant functions] )
1264- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <time.h>] ] , [ [ struct tm *(*func)() = localtime_r] ] ) ] ,[
1264+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <time.h>] ] , [ [ struct tm *(*func)(void ) = localtime_r] ] ) ] ,[
12651265 :
12661266 ] ,[
12671267 AC_DEFINE ( MISSING_LOCALTIME_R_DECL ,1 ,[ Whether localtime_r is declared] )
12681268 ] )
1269- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <time.h>] ] , [ [ struct tm *(*func)() = gmtime_r] ] ) ] ,[
1269+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <time.h>] ] , [ [ struct tm *(*func)(void ) = gmtime_r] ] ) ] ,[
12701270 :
12711271 ] ,[
12721272 AC_DEFINE ( MISSING_GMTIME_R_DECL ,1 ,[ Whether gmtime_r is declared] )
12731273 ] )
1274- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <time.h>] ] , [ [ char *(*func)() = asctime_r] ] ) ] ,[
1274+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <time.h>] ] , [ [ char *(*func)(void ) = asctime_r] ] ) ] ,[
12751275 :
12761276 ] ,[
12771277 AC_DEFINE ( MISSING_ASCTIME_R_DECL ,1 ,[ Whether asctime_r is declared] )
12781278 ] )
1279- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <time.h>] ] , [ [ char *(*func)() = ctime_r] ] ) ] ,[
1279+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <time.h>] ] , [ [ char *(*func)(void ) = ctime_r] ] ) ] ,[
12801280 :
12811281 ] ,[
12821282 AC_DEFINE ( MISSING_CTIME_R_DECL ,1 ,[ Whether ctime_r is declared] )
12831283 ] )
1284- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <string.h>] ] , [ [ char *(*func)() = strtok_r] ] ) ] ,[
1284+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <string.h>] ] , [ [ char *(*func)(void ) = strtok_r] ] ) ] ,[
12851285 :
12861286 ] ,[
12871287 AC_DEFINE ( MISSING_STRTOK_R_DECL ,1 ,[ Whether strtok_r is declared] )
@@ -1315,7 +1315,7 @@ dnl See if we have broken header files like SunOS has.
13151315dnl
13161316AC_DEFUN ( [ PHP_MISSING_FCLOSE_DECL] ,[
13171317 AC_MSG_CHECKING ( [ for fclose declaration] )
1318- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <stdio.h>] ] , [ [ int (*func)() = fclose] ] ) ] ,[
1318+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <stdio.h>] ] , [ [ int (*func)(void ) = fclose] ] ) ] ,[
13191319 AC_DEFINE ( MISSING_FCLOSE_DECL ,0 ,[ ] )
13201320 AC_MSG_RESULT ( [ ok] )
13211321 ] ,[
@@ -1405,7 +1405,7 @@ struct s
14051405 int i;
14061406 char c[ 1] ;
14071407};
1408- int main()
1408+ int main(void )
14091409{
14101410 struct s *s = malloc(sizeof(struct s) + 3);
14111411 s->i = 3;
@@ -1463,7 +1463,7 @@ int seeker(void *cookie, off64_t *position, int whence)
14631463
14641464cookie_io_functions_t funcs = {reader, writer, seeker, closer};
14651465
1466- int main() {
1466+ int main(void ) {
14671467 struct cookiedata g = { 0 };
14681468 FILE *fp = fopencookie(&g, "r", funcs);
14691469
@@ -1590,7 +1590,7 @@ AC_DEFUN([PHP_CHECK_FUNC_LIB],[
15901590 if test "$found" = "yes"; then
15911591 ac_libs=$LIBS
15921592 LIBS="$LIBS -l$2 "
1593- AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [ [ int main() { return (0); } ] ] ) ] ,[ found=yes] ,[ found=no] ,[
1593+ AC_RUN_IFELSE ( [ AC_LANG_PROGRAM ( ) ] ,[ found=yes] ,[ found=no] ,[
15941594 dnl Cross compilation.
15951595 found=yes
15961596 ] )
@@ -1643,8 +1643,8 @@ AC_DEFUN([PHP_TEST_BUILD], [
16431643 LIBS="$4 $LIBS"
16441644 AC_LINK_IFELSE ( [ AC_LANG_SOURCE ( [ [
16451645 $5
1646- char $1 ();
1647- int main() {
1646+ char $1 (void );
1647+ int main(void ) {
16481648 $1 ();
16491649 return 0;
16501650 }
@@ -2296,7 +2296,7 @@ AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
22962296
22972297#define TEXT "This is the test message -- "
22982298
2299- int main()
2299+ int main(void )
23002300{
23012301 int n;
23022302
0 commit comments