78df74c22637f1e6cc4ddcbc422ba96c9daf9f07
[openwrt/svn-archive/archive.git] / net / djbdns / patches / 100-crosscompile.patch
1 diff -urN djbdns-1.05/Makefile djbdns-1.05.new/Makefile
2 --- djbdns-1.05/Makefile 2001-02-11 23:11:45.000000000 +0200
3 +++ djbdns-1.05.new/Makefile 2007-09-30 15:09:51.000000000 +0300
4 @@ -29,10 +29,6 @@
5 compile auto-str.c buffer.h exit.h
6 ./compile auto-str.c
7
8 -auto_home.c: \
9 -auto-str conf-home
10 - ./auto-str auto_home `head -1 conf-home` > auto_home.c
11 -
12 auto_home.o: \
13 compile auto_home.c
14 ./compile auto_home.c
15 @@ -221,10 +217,6 @@
16 uint64.h taia.h dd.h
17 ./compile dd.c
18
19 -direntry.h: \
20 -choose compile trydrent.c direntry.h1 direntry.h2
21 - ./choose c trydrent direntry.h1 direntry.h2 > direntry.h
22 -
23 dns.a: \
24 makelib dns_dfd.o dns_domain.o dns_dtda.o dns_ip.o dns_ipq.o dns_mx.o \
25 dns_name.o dns_nd.o dns_packet.o dns_random.o dns_rcip.o dns_rcrw.o \
26 @@ -508,12 +500,6 @@
27 *) cat hasdevtcp.h1 ;; \
28 esac ) > hasdevtcp.h
29
30 -hasshsgr.h: \
31 -choose compile load tryshsgr.c hasshsgr.h1 hasshsgr.h2 chkshsgr \
32 -warn-shsgr
33 - ./chkshsgr || ( cat warn-shsgr; exit 1 )
34 - ./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h
35 -
36 hier.o: \
37 compile hier.c auto_home.h
38 ./compile hier.c
39 @@ -534,10 +520,6 @@
40 compile instcheck.c strerr.h error.h exit.h
41 ./compile instcheck.c
42
43 -iopause.h: \
44 -choose compile load trypoll.c iopause.h1 iopause.h2
45 - ./choose clr trypoll iopause.h1 iopause.h2 > iopause.h
46 -
47 iopause.o: \
48 compile iopause.c taia.h tai.h uint64.h select.h iopause.h taia.h
49 ./compile iopause.c
50 @@ -766,10 +748,6 @@
51 compile seek_set.c seek.h
52 ./compile seek_set.c
53
54 -select.h: \
55 -choose compile trysysel.c select.h1 select.h2
56 - ./choose c trysysel select.h1 select.h2 > select.h
57 -
58 server.o: \
59 compile server.c byte.h case.h env.h buffer.h strerr.h ip4.h uint16.h \
60 ndelay.h socket.h uint16.h droproot.h qlog.h uint16.h response.h \
61 @@ -1060,10 +1038,6 @@
62 compile uint32_unpack.c uint32.h
63 ./compile uint32_unpack.c
64
65 -uint64.h: \
66 -choose compile load tryulong64.c uint64.h1 uint64.h2
67 - ./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h
68 -
69 unix.a: \
70 makelib buffer_read.o buffer_write.o error.o error_str.o ndelay_off.o \
71 ndelay_on.o open_read.o open_trunc.o openreadclose.o readclose.o \
72 diff -urN djbdns-1.05/auto_home.c djbdns-1.05.new/auto_home.c
73 --- djbdns-1.05/auto_home.c 1970-01-01 03:00:00.000000000 +0300
74 +++ djbdns-1.05.new/auto_home.c 2007-09-30 13:32:06.000000000 +0300
75 @@ -0,0 +1,3 @@
76 +const char auto_home[] = "\
77 +\057\165\163\162\
78 +";
79 diff -urN djbdns-1.05/conf-cc djbdns-1.05.new/conf-cc
80 --- djbdns-1.05/conf-cc 2007-09-30 14:11:35.000000000 +0300
81 +++ djbdns-1.05.new/conf-cc 2007-09-30 15:10:46.000000000 +0300
82 @@ -1,3 +1,3 @@
83 -gcc -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings
84 +$TARGET_CC $TARGET_CFLAGS -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -include errno.h
85
86 This will be used to compile .c files.
87 diff -urN djbdns-1.05/conf-home djbdns-1.05.new/conf-home
88 --- djbdns-1.05/conf-home 2001-02-11 23:11:45.000000000 +0200
89 +++ djbdns-1.05.new/conf-home 2007-09-30 14:10:46.000000000 +0300
90 @@ -1,4 +1,4 @@
91 -/usr/local
92 +/usr
93
94 This is the dnscache home directory. Programs will be installed in
95 .../bin.
96 diff -urN djbdns-1.05/conf-ld djbdns-1.05.new/conf-ld
97 --- djbdns-1.05/conf-ld 2001-02-11 23:11:45.000000000 +0200
98 +++ djbdns-1.05.new/conf-ld 2007-09-30 15:11:00.000000000 +0300
99 @@ -1,3 +1,3 @@
100 -gcc -s
101 +$TARGET_CC -s $TARGET_LDFLAGS
102
103 This will be used to link .o files into an executable.
104 diff -urN djbdns-1.05/direntry.h djbdns-1.05.new/direntry.h
105 --- djbdns-1.05/direntry.h 1970-01-01 03:00:00.000000000 +0300
106 +++ djbdns-1.05.new/direntry.h 2007-09-30 13:14:14.000000000 +0300
107 @@ -0,0 +1,10 @@
108 +#ifndef DIRENTRY_H
109 +#define DIRENTRY_H
110 +
111 +/* sysdep: +dirent */
112 +
113 +#include <sys/types.h>
114 +#include <dirent.h>
115 +#define direntry struct dirent
116 +
117 +#endif
118 diff -urN djbdns-1.05/hasshsgr.h djbdns-1.05.new/hasshsgr.h
119 --- djbdns-1.05/hasshsgr.h 1970-01-01 03:00:00.000000000 +0300
120 +++ djbdns-1.05.new/hasshsgr.h 2007-09-30 13:14:14.000000000 +0300
121 @@ -0,0 +1 @@
122 +/* sysdep: -shortsetgroups */
123 diff -urN djbdns-1.05/iopause.h djbdns-1.05.new/iopause.h
124 --- djbdns-1.05/iopause.h 1970-01-01 03:00:00.000000000 +0300
125 +++ djbdns-1.05.new/iopause.h 2007-09-30 13:14:14.000000000 +0300
126 @@ -0,0 +1,18 @@
127 +#ifndef IOPAUSE_H
128 +#define IOPAUSE_H
129 +
130 +/* sysdep: +poll */
131 +#define IOPAUSE_POLL
132 +
133 +#include <sys/types.h>
134 +#include <poll.h>
135 +
136 +typedef struct pollfd iopause_fd;
137 +#define IOPAUSE_READ POLLIN
138 +#define IOPAUSE_WRITE POLLOUT
139 +
140 +#include "taia.h"
141 +
142 +extern void iopause(iopause_fd *,unsigned int,struct taia *,struct taia *);
143 +
144 +#endif
145 diff -urN djbdns-1.05/select.h djbdns-1.05.new/select.h
146 --- djbdns-1.05/select.h 1970-01-01 03:00:00.000000000 +0300
147 +++ djbdns-1.05.new/select.h 2007-09-30 13:14:14.000000000 +0300
148 @@ -0,0 +1,11 @@
149 +#ifndef SELECT_H
150 +#define SELECT_H
151 +
152 +/* sysdep: +sysselect */
153 +
154 +#include <sys/types.h>
155 +#include <sys/time.h>
156 +#include <sys/select.h>
157 +extern int select();
158 +
159 +#endif
160 diff -urN djbdns-1.05/uint64.h djbdns-1.05.new/uint64.h
161 --- djbdns-1.05/uint64.h 1970-01-01 03:00:00.000000000 +0300
162 +++ djbdns-1.05.new/uint64.h 2007-09-30 13:23:48.000000000 +0300
163 @@ -0,0 +1,8 @@
164 +#ifndef UINT64_H
165 +#define UINT64_H
166 +
167 +/* sysdep: -ulong64 */
168 +
169 +typedef unsigned long long uint64;
170 +
171 +#endif