diff --git a/configure b/configure index 3462b9a..c9d7fa7 100755 --- a/configure +++ b/configure @@ -89,7 +89,7 @@ else if ac_yesno "sizes of standard integer types" \ ac_compile_run < -int main() { +int main(int argc, char **argv) { printf("#define SIZEOF_SHORT %d\n", sizeof(short)); printf("#define SIZEOF_INT %d\n", sizeof(int)); printf("#define SIZEOF_LONG %d\n", sizeof(long)); @@ -104,7 +104,7 @@ EOF if ac_yesno "for long long" \ ac_compile_run < -int main() { +int main(int argc, char **argv) { long long x; printf("#define SIZEOF_LONG_LONG %d\n", sizeof(long long)); return 0; @@ -119,7 +119,7 @@ fi if ac_compile_run_v "whether C compiler defines __SIZEOF_POINTER__" < -int main() { +int main(int argc, char **argv) { #ifdef __SIZEOF_POINTER__ return 0; #else @@ -135,7 +135,7 @@ fi if ac_verbose "byte order" "big-endian" "little-endian" \ ac_compile_run < #include -int foo() { socklen_t len; len = 0; return len; } +int foo(void) { socklen_t len; len = 0; return len; } EOF then : else @@ -172,7 +172,13 @@ else fi if ac_library_find_v 'connect()' "" "-lsocket -lnsl" < +#include +int main(int argc, char **argv) { + gethostbyname(""); + connect(0, (const struct sockaddr *)0, (socklen_t)0); + return 0; +} EOF then : else @@ -188,7 +194,7 @@ if ac_link_v "for IPv6" < #include #include -int main() { +int main(int argc, char **argv) { char h[200]; char s[200]; struct sockaddr_in6 sa; @@ -210,7 +216,7 @@ if ac_link_v "for mallinfo()" < #include #include -int main() { +int main(int argc, char **argv) { struct mallinfo mi = mallinfo(); return 0; } @@ -223,7 +229,7 @@ fi if ac_link_v "for poll()" < #include -int main() { +int main(int argc, char **argv) { struct pollfd pfd[2]; return poll(pfd, 2, 10); } @@ -250,7 +256,7 @@ int test(char *fmt, ...) { vsnprintf(buf, sizeof(buf), fmt, ap); return 0; } -int main() { +int main(int argc, char **argv) { test("test%d", 40); return 0; } @@ -264,7 +270,7 @@ if ac_link_v "for writev()/readv()" < #include #include -int main() { +int main(int argc, char **argv) { struct iovec iov; return writev(1, &iov, 1) && readv(1, &iov, 1); } @@ -277,7 +283,7 @@ fi if ac_link_v "for setitimer()" < #include -int main() { +int main(int argc, char **argv) { struct itimerval itv; itv.it_interval.tv_sec = itv.it_value.tv_sec = 10; itv.it_interval.tv_usec = itv.it_value.tv_usec = 20; @@ -295,7 +301,7 @@ elif ac_link_v "for zlib support" -lz < #include #include -int main() { +int main(int argc, char **argv) { z_stream z; int r; r = inflateInit2(&z, 0); @@ -318,7 +324,7 @@ elif [ n = "$enable_dso" ]; then echo "#define NO_DSO 1 /* option disabled */" >>confdef.h elif ac_link_v "for dlopen() in -dl with -rdynamic" -ldl -rdynamic < -int main() { +int main(int argc, char **argv) { void *handle, *func; handle = dlopen("testfile", RTLD_NOW); func = dlsym(handle, "function"); diff --git a/configure.lib b/configure.lib index 39cf423..6b7245f 100644 --- a/configure.lib +++ b/configure.lib @@ -178,7 +178,7 @@ EOF if ac_yesno "whether the C compiler ($ccld) can produce executables" \ ac_compile_run <