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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
https://src.fedoraproject.org/rpms/tin/blob/bbfb5a569a97cde8d4ca95f44979070ad2f57bd0/f/tin-configure-c99.patch
Add missing #include directives to pick up additional prototypes.
Improves C99 compatibility.
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -2165,8 +2165,17 @@ AC_MSG_CHECKING([if application can dump core])
AC_CACHE_VAL(cf_cv_corefile,[
AC_TRY_RUN([
#include <signal.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
int found()
{
struct stat sb;
@@ -3319,6 +3328,9 @@ AC_DEFUN([CF_FUNC_FORK],
[AC_MSG_CHECKING([for fork])
AC_CACHE_VAL(cf_cv_func_fork,[
AC_TRY_RUN([
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
int main()
{
if (fork() < 0)
@@ -3465,6 +3477,9 @@ AC_MSG_CHECKING(if the system function returns usable child-status)
AC_CACHE_VAL(cf_cv_system_status,[
AC_TRY_RUN([
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include <signal.h>
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
@@ -3495,7 +3510,11 @@ int main()
],
[cf_cv_system_status=no],
[AC_TRY_RUN(
- [int main() { ${cf_cv_main_return:-return}(system("exit 23") != (23 << 8)); }],
+ [
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+int main() { ${cf_cv_main_return:-return}(system("exit 23") != (23 << 8)); }],
[cf_cv_system_status=yes],
[cf_cv_system_status=unknown],
[cf_cv_system_status=unknown])],
--- a/configure
+++ b/configure
@@ -26361,6 +26361,9 @@ else
#line 26361 "configure"
#include "confdefs.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
int main()
{
if (fork() < 0)
@@ -27366,6 +27369,9 @@ else
#include "confdefs.h"
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include <signal.h>
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
@@ -27417,6 +27423,9 @@ else
cat >"conftest.$ac_ext" <<_ACEOF
#line 27418 "configure"
#include "confdefs.h"
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
int main() { ${cf_cv_main_return:-return}(system("exit 23") != (23 << 8)); }
_ACEOF
rm -f "conftest$ac_exeext"
@@ -27764,8 +27773,17 @@ else
#include "confdefs.h"
#include <signal.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
int found()
{
struct stat sb;
|