added djb daemontools patch provided by Johnny Halfmoon
[openwrt/svn-archive/archive.git] / utils / daemontools / patches / crosscompile.patch
1 diff -urN daemontools-0.76/src/Makefile daemontools-0.76.new/src/Makefile
2 --- daemontools-0.76/src/Makefile 2001-07-12 19:49:49.000000000 +0300
3 +++ daemontools-0.76.new/src/Makefile 2007-09-30 16:27:25.000000000 +0300
4 @@ -101,9 +101,6 @@
5 uint64.h
6 ./compile deepsleep.c
7
8 -direntry.h: choose compile direntry.h1 direntry.h2 trydrent.c
9 - ./choose c trydrent direntry.h1 direntry.h2 > direntry.h
10 -
11 env.o: compile env.c env.h str.h
12 ./compile env.c
13
14 @@ -151,29 +148,6 @@
15 fmt_ulong.o: compile fmt.h fmt_ulong.c
16 ./compile fmt_ulong.c
17
18 -hasflock.h: choose compile hasflock.h1 hasflock.h2 load tryflock.c
19 - ./choose cl tryflock hasflock.h1 hasflock.h2 > hasflock.h
20 -
21 -hasmkffo.h: choose compile hasmkffo.h1 hasmkffo.h2 load trymkffo.c
22 - ./choose cl trymkffo hasmkffo.h1 hasmkffo.h2 > hasmkffo.h
23 -
24 -hassgact.h: choose compile hassgact.h1 hassgact.h2 load trysgact.c
25 - ./choose cl trysgact hassgact.h1 hassgact.h2 > hassgact.h
26 -
27 -hassgprm.h: choose compile hassgprm.h1 hassgprm.h2 load trysgprm.c
28 - ./choose cl trysgprm hassgprm.h1 hassgprm.h2 > hassgprm.h
29 -
30 -hasshsgr.h: chkshsgr choose compile hasshsgr.h1 hasshsgr.h2 load \
31 -tryshsgr.c warn-shsgr
32 - ./chkshsgr || ( cat warn-shsgr; exit 1 )
33 - ./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h
34 -
35 -haswaitp.h: choose compile haswaitp.h1 haswaitp.h2 load trywaitp.c
36 - ./choose cl trywaitp haswaitp.h1 haswaitp.h2 > haswaitp.h
37 -
38 -iopause.h: choose compile iopause.h1 iopause.h2 load trypoll.c
39 - ./choose clr trypoll iopause.h1 iopause.h2 > iopause.h
40 -
41 iopause.o: compile iopause.c iopause.h select.h tai.h taia.h uint64.h
42 ./compile iopause.c
43
44 @@ -265,7 +239,6 @@
45 rts: envdir envuidgid fghack matchtest multilog pgrphack \
46 readproctitle rts.tests setlock setuidgid softlimit supervise svc \
47 svok svscan svscanboot svstat tai64n tai64nlocal
48 - env - /bin/sh rts.tests 2>&1 | cat -v > rts
49
50 scan_ulong.o: compile scan.h scan_ulong.c
51 ./compile scan_ulong.c
52 @@ -273,9 +246,6 @@
53 seek_set.o: compile seek.h seek_set.c
54 ./compile seek_set.c
55
56 -select.h: choose compile select.h1 select.h2 trysysel.c
57 - ./choose c trysysel select.h1 select.h2 > select.h
58 -
59 setlock: byte.a load setlock.o unix.a
60 ./load setlock unix.a byte.a
61
62 @@ -478,9 +448,6 @@
63 timestamp.o: compile tai.h taia.h timestamp.c timestamp.h uint64.h
64 ./compile timestamp.c
65
66 -uint64.h: choose compile load tryulong64.c uint64.h1 uint64.h2
67 - ./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h
68 -
69 unix.a: alloc.o alloc_re.o buffer.o buffer_0.o buffer_1.o buffer_2.o \
70 buffer_get.o buffer_put.o buffer_read.o buffer_write.o coe.o env.o \
71 error.o error_str.o fd_copy.o fd_move.o fifo.o lock_ex.o lock_exnb.o \
72 diff -urN daemontools-0.76/src/conf-cc daemontools-0.76.new/src/conf-cc
73 --- daemontools-0.76/src/conf-cc 2007-09-30 13:58:40.000000000 +0300
74 +++ daemontools-0.76.new/src/conf-cc 2007-09-30 15:15:32.000000000 +0300
75 @@ -1,3 +1,3 @@
76 -gcc -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings
77 +$TARGET_CC $TARGET_CFLAGS -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -include errno.h
78
79 This will be used to compile .c files.
80 diff -urN daemontools-0.76/src/conf-ld daemontools-0.76.new/src/conf-ld
81 --- daemontools-0.76/src/conf-ld 2001-07-12 19:49:49.000000000 +0300
82 +++ daemontools-0.76.new/src/conf-ld 2007-09-30 15:15:42.000000000 +0300
83 @@ -1,3 +1,3 @@
84 -gcc -s
85 +$TARGET_CC -s $TARGET_LDFLAGS
86
87 This will be used to link .o files into an executable.
88 diff -urN daemontools-0.76/src/direntry.h daemontools-0.76.new/src/direntry.h
89 --- daemontools-0.76/src/direntry.h 1970-01-01 03:00:00.000000000 +0300
90 +++ daemontools-0.76.new/src/direntry.h 2007-09-30 13:52:11.000000000 +0300
91 @@ -0,0 +1,12 @@
92 +/* Public domain. */
93 +
94 +#ifndef DIRENTRY_H
95 +#define DIRENTRY_H
96 +
97 +/* sysdep: +dirent */
98 +
99 +#include <sys/types.h>
100 +#include <dirent.h>
101 +#define direntry struct dirent
102 +
103 +#endif
104 diff -urN daemontools-0.76/src/hasflock.h daemontools-0.76.new/src/hasflock.h
105 --- daemontools-0.76/src/hasflock.h 1970-01-01 03:00:00.000000000 +0300
106 +++ daemontools-0.76.new/src/hasflock.h 2007-09-30 13:52:55.000000000 +0300
107 @@ -0,0 +1,4 @@
108 +/* Public domain. */
109 +
110 +/* sysdep: +flock */
111 +#define HASFLOCK 1
112 diff -urN daemontools-0.76/src/hasmkffo.h daemontools-0.76.new/src/hasmkffo.h
113 --- daemontools-0.76/src/hasmkffo.h 1970-01-01 03:00:00.000000000 +0300
114 +++ daemontools-0.76.new/src/hasmkffo.h 2007-09-30 13:53:16.000000000 +0300
115 @@ -0,0 +1,4 @@
116 +/* Public domain. */
117 +
118 +/* sysdep: +mkfifo */
119 +#define HASMKFIFO 1
120 diff -urN daemontools-0.76/src/hassgact.h daemontools-0.76.new/src/hassgact.h
121 --- daemontools-0.76/src/hassgact.h 1970-01-01 03:00:00.000000000 +0300
122 +++ daemontools-0.76.new/src/hassgact.h 2007-09-30 13:53:47.000000000 +0300
123 @@ -0,0 +1,4 @@
124 +/* Public domain. */
125 +
126 +/* sysdep: +sigaction */
127 +#define HASSIGACTION 1
128 diff -urN daemontools-0.76/src/hassgprm.h daemontools-0.76.new/src/hassgprm.h
129 --- daemontools-0.76/src/hassgprm.h 1970-01-01 03:00:00.000000000 +0300
130 +++ daemontools-0.76.new/src/hassgprm.h 2007-09-30 13:54:13.000000000 +0300
131 @@ -0,0 +1,4 @@
132 +/* Public domain. */
133 +
134 +/* sysdep: +sigprocmask */
135 +#define HASSIGPROCMASK 1
136 diff -urN daemontools-0.76/src/hasshsgr.h daemontools-0.76.new/src/hasshsgr.h
137 --- daemontools-0.76/src/hasshsgr.h 1970-01-01 03:00:00.000000000 +0300
138 +++ daemontools-0.76.new/src/hasshsgr.h 2007-09-30 13:54:41.000000000 +0300
139 @@ -0,0 +1,3 @@
140 +/* Public domain. */
141 +
142 +/* sysdep: -shortsetgroups */
143 diff -urN daemontools-0.76/src/haswaitp.h daemontools-0.76.new/src/haswaitp.h
144 --- daemontools-0.76/src/haswaitp.h 1970-01-01 03:00:00.000000000 +0300
145 +++ daemontools-0.76.new/src/haswaitp.h 2007-09-30 13:54:57.000000000 +0300
146 @@ -0,0 +1,4 @@
147 +/* Public domain. */
148 +
149 +/* sysdep: +waitpid */
150 +#define HASWAITPID 1
151 diff -urN daemontools-0.76/src/iopause.h daemontools-0.76.new/src/iopause.h
152 --- daemontools-0.76/src/iopause.h 1970-01-01 03:00:00.000000000 +0300
153 +++ daemontools-0.76.new/src/iopause.h 2007-09-30 13:55:14.000000000 +0300
154 @@ -0,0 +1,20 @@
155 +/* Public domain. */
156 +
157 +#ifndef IOPAUSE_H
158 +#define IOPAUSE_H
159 +
160 +/* sysdep: +poll */
161 +#define IOPAUSE_POLL
162 +
163 +#include <sys/types.h>
164 +#include <poll.h>
165 +
166 +typedef struct pollfd iopause_fd;
167 +#define IOPAUSE_READ POLLIN
168 +#define IOPAUSE_WRITE POLLOUT
169 +
170 +#include "taia.h"
171 +
172 +extern void iopause(iopause_fd *,unsigned int,struct taia *,struct taia *);
173 +
174 +#endif
175 diff -urN daemontools-0.76/src/select.h daemontools-0.76.new/src/select.h
176 --- daemontools-0.76/src/select.h 1970-01-01 03:00:00.000000000 +0300
177 +++ daemontools-0.76.new/src/select.h 2007-09-30 13:55:32.000000000 +0300
178 @@ -0,0 +1,13 @@
179 +/* Public domain. */
180 +
181 +#ifndef SELECT_H
182 +#define SELECT_H
183 +
184 +/* sysdep: +sysselect */
185 +
186 +#include <sys/types.h>
187 +#include <sys/time.h>
188 +#include <sys/select.h>
189 +extern int select();
190 +
191 +#endif
192 diff -urN daemontools-0.76/src/uint64.h daemontools-0.76.new/src/uint64.h
193 --- daemontools-0.76/src/uint64.h 1970-01-01 03:00:00.000000000 +0300
194 +++ daemontools-0.76.new/src/uint64.h 2007-09-30 13:55:54.000000000 +0300
195 @@ -0,0 +1,10 @@
196 +/* Public domain. */
197 +
198 +#ifndef UINT64_H
199 +#define UINT64_H
200 +
201 +/* sysdep: -ulong64 */
202 +
203 +typedef unsigned long long uint64;
204 +
205 +#endif