summaryrefslogtreecommitdiff
blob: 570319cabe554a1762f8382728147ff407c1d943 (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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
From a01468c1734129595355af0815d4577af4e265cc Mon Sep 17 00:00:00 2001
From: Sebastian Pipping <sebastian@pipping.org>
Date: Wed, 7 Dec 2011 23:22:55 +0100
Subject: [PATCH] Add missing includes, remove conflicting prototypes

---
 decode.c   |    1 +
 encode.c   |    1 +
 magic.c    |    1 +
 part.c     |    1 +
 unixos.c   |    5 +----
 unixpk.c   |    2 ++
 unixpk.o   |  Bin 12000 -> 12016 bytes
 unixunpk.c |    1 +
 xmalloc.c  |    2 +-
 9 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/decode.c b/decode.c
index c96918f..8b8df56 100644
--- a/decode.c
+++ b/decode.c
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
+#include <stdlib.h>
 #include "xmalloc.h"
 #include "common.h"
 #include "part.h"
diff --git a/encode.c b/encode.c
index 0ba3934..1377cf8 100644
--- a/encode.c
+++ b/encode.c
@@ -24,6 +24,7 @@
  */
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 
 extern char *magic_look(FILE *infile);
 extern char *os_genid(void);
diff --git a/magic.c b/magic.c
index e08c6f8..a452a43 100644
--- a/magic.c
+++ b/magic.c
@@ -23,6 +23,7 @@
  * SOFTWARE.
  */
 #include <stdio.h>
+#include <string.h>
 
 /* Description of the various file formats and their magic numbers */
 struct magic {
diff --git a/part.c b/part.c
index 1d4efe6..15fd724 100644
--- a/part.c
+++ b/part.c
@@ -28,6 +28,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 
 #include "part.h"
 #include "xmalloc.h"
diff --git a/unixos.c b/unixos.c
index 3f5c4c0..fa6d0a7 100644
--- a/unixos.c
+++ b/unixos.c
@@ -30,6 +30,7 @@
 #include <sys/param.h>
 #include <netdb.h>
 #include <fcntl.h>
+#include <stdlib.h>
 #include "xmalloc.h"
 #include "common.h"
 #include "part.h"
@@ -38,10 +39,6 @@
 #define MAXHOSTNAMELEN 64
 #endif
 
-extern int errno;
-extern char *malloc();
-extern char *getenv();
-
 int overwrite_files = 0;
 int didchat;
 
diff --git a/unixpk.c b/unixpk.c
index c2aaa56..1f81ea9 100644
--- a/unixpk.c
+++ b/unixpk.c
@@ -25,6 +25,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
 #include "common.h"
 #include "version.h"
 #include "xmalloc.h"
diff --git a/unixunpk.c b/unixunpk.c
index a1f065b..0f5fa85 100644
--- a/unixunpk.c
+++ b/unixunpk.c
@@ -23,6 +23,7 @@
  * SOFTWARE.
  */
 #include <stdio.h>
+#include <stdlib.h>
 #include "version.h"
 #include "part.h"
 
diff --git a/xmalloc.c b/xmalloc.c
index 7c74360..46dbbd1 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -24,7 +24,7 @@
  */
 #include <stdio.h>
 #include <string.h>
-extern char *malloc(), *realloc();
+#include <stdlib.h>
 
 char *xmalloc (int size)
 {
-- 
1.7.8