summaryrefslogtreecommitdiff
blob: c15617b56e84a9dc4ab7e115443fb036d10e9a75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
--- a/configure
+++ b/configure
@@ -223,7 +223,7 @@ compile="$CC $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
 echo checking for ANSI C header files
 echo "#include <stdlib.h>
 #include <string.h>
-main() { exit(0); strerror(0); }" > conftest.c
+int main(void) { exit(0); strerror(0); }" > conftest.c
 eval $compile
 if test -s conftest && ./conftest 2>/dev/null; then
   DEFS="$DEFS -DSTDC_HEADERS"
@@ -236,7 +236,8 @@ rm -f conftest conftest.c
 
 echo checking for sys/termios.h
 echo "#include <sys/termios.h>
-main() { exit(0); }" > conftest.c
+#include <stdlib.h>
+int main(void) { exit(0); }" > conftest.c
 eval $compile
 if test -s conftest && ./conftest 2>/dev/null; then
   DEFS="$DEFS -DTERMIOS_HEADER"
@@ -245,8 +246,9 @@ rm -f conftest conftest.c
 
 echo checking for POSIX.1 header files
 echo "#include <unistd.h>
+#include <stdlib.h>
 #ifdef _POSIX_VERSION
-main() { exit(0); }
+int main(void) { exit(0); }
 #else
 # error no _POSIX_VERSION
 #endif" > conftest.c
@@ -258,7 +260,8 @@ rm -f conftest conftest.c
 
 echo checking for BSD string and memory functions
 echo "#include <strings.h>
-main() { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
+#include <stdlib.h>
+int main(void) { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
 eval $compile
 if test -s conftest ; then :
   else DEFS="$DEFS -DUSG"
@@ -267,7 +270,8 @@ rm -f conftest conftest.c
 
 echo checking whether sys/types.h defines uid_t
 echo '#include <sys/types.h>
-main() { uid_t x; exit(0); }' > conftest.c
+#include <stdlib.h>
+int main(void) { uid_t x; exit(0); }' > conftest.c
 eval $compile
 if test -s conftest ; then :
 else
@@ -300,7 +304,8 @@ char *alloca ();
 #endif
 #endif
 #endif
-main() { char *p = (char *) alloca(1); exit(0); }' > conftest.c
+#include <stdlib.h>
+int main(void) { char *p = (char *) alloca(1); exit(0); }' > conftest.c
 eval $compile
 if test -s conftest ; then :
 elif test -d /usr/ucblib; then LIBS="$LIBS -L/usr/ucblib -lucb"
@@ -312,7 +317,8 @@ rm -f conftest conftest.c
 if [ $usenls = true ]; then
   echo checking for nls
   echo '#include <nl_types.h>
-  main() {nl_catd catfd; exit(0); }' > conftest.c
+  #include <stdlib.h>
+  int main(void) {nl_catd catfd; exit(0); }' > conftest.c
   eval $compile
   if test -s conftest && ./conftest 2>/dev/null; then :
   else
@@ -329,8 +335,9 @@ echo checking for getopt.h
 echo '#define _GNU_SOURCE
 #include <getopt.h>
 #include <stdio.h>
+#include <stdlib.h>
 struct option long_opts[] = { { "", no_argument, NULL, 0 } };
-main() { exit(0); }' > conftest.c
+int main(void) { exit(0); }' > conftest.c
 eval $compile
 if test -s conftest ; then
   manpathoption="--path"