summaryrefslogtreecommitdiff
blob: f59f2a45d230fa25dbca85d780cff7919a953909 (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
diff '--color=auto' -Nuar safecat-1.13.orig/install.c safecat-1.13/install.c
--- safecat-1.13.orig/install.c	2000-02-28 20:10:12.000000000 -0800
+++ safecat-1.13/install.c	2024-06-15 14:40:24.142699634 -0700
@@ -1,3 +1,10 @@
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <unistd.h>
 #include "substdio.h"
 #include "strerr.h"
 #include "error.h"
diff '--color=auto' -Nuar safecat-1.13.orig/instcheck.c safecat-1.13/instcheck.c
--- safecat-1.13.orig/instcheck.c	2000-02-28 20:10:12.000000000 -0800
+++ safecat-1.13/instcheck.c	2024-06-15 14:40:27.502696776 -0700
@@ -1,5 +1,12 @@
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
 #include "strerr.h"
 #include "error.h"
 #include "readwrite.h"
diff '--color=auto' -Nuar safecat-1.13.orig/safecat.c safecat-1.13/safecat.c
--- safecat-1.13.orig/safecat.c	2004-08-16 18:14:34.000000000 -0700
+++ safecat-1.13/safecat.c	2024-06-15 14:40:17.246038832 -0700
@@ -23,6 +23,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <signal.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 /* Support for large files (on Linux systems, if the appropriate
--- safecat-1.13.orig/alloc.c	2000-02-28 20:10:12.000000000 -0800
+++ safecat-1.13/alloc.c	2024-06-15 14:41:26.985979033 -0700
@@ -1,7 +1,6 @@
+#include <stdlib.h>
 #include "alloc.h"
 #include "error.h"
-extern char *malloc();
-extern void free();
 
 #define ALIGNMENT 16 /* XXX: assuming that this alignment is enough */
 #define SPACE 4096 /* must be multiple of ALIGNMENT */
@@ -18,7 +17,7 @@
   char *x;
   n = ALIGNMENT + n - (n & (ALIGNMENT - 1)); /* XXX: could overflow */
   if (n <= avail) { avail -= n; return space + avail; }
-  x = malloc(n);
+  x = (char*)malloc(n);
   if (!x) errno = error_nomem;
   return x;
 }
--- safecat-1.13.orig/readwrite.h	2024-06-15 14:46:41.472362482 -0700
+++ safecat-1.13/readwrite.h	2024-06-15 14:46:21.755714187 -0700
@@ -1,7 +1,8 @@
 #ifndef READWRITE_H
 #define READWRITE_H
 
-extern int read();
-extern int write();
+#include <unistd.h>
+//extern int read();
+//extern int write();
 
 #endif
--- safecat-1.13/stralloc.h	2000-02-28 20:10:12.000000000 -0800
+++ safecat-1.13/stralloc.h	2024-06-15 14:55:46.678492988 -0700
@@ -7,14 +7,14 @@
 
 extern int stralloc_ready();
 extern int stralloc_readyplus();
-extern int stralloc_copy();
-extern int stralloc_cat();
+extern int stralloc_copy(stralloc *sato, stralloc *safrom);
+extern int stralloc_cat(stralloc *sato, stralloc *safrom);
 extern int stralloc_copys();
-extern int stralloc_cats();
-extern int stralloc_copyb();
-extern int stralloc_catb();
+extern int stralloc_cats(stralloc *sa, char *s);
+extern int stralloc_copyb(stralloc *sa, char *s, unsigned int n);
+extern int stralloc_catb(stralloc *sa, char *s, unsigned int n);
 extern int stralloc_append(); /* beware: this takes a pointer to 1 char */
-extern int stralloc_starts();
+extern int stralloc_starts(stralloc *sa, char *s);
 
 #define stralloc_0(sa) stralloc_append(sa,"")