updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / ipupdate / archlinux.patch
blob6a089565f14ec369fd5aad1f6b3342510258acdc
1 diff -crB ipupdate-1.1.1_orig/include/array.c ipupdate-1.1.1/include/array.c
2 *** ipupdate-1.1.1_orig/include/array.c 2011-03-20 21:58:51.470000007 +0000
3 --- ipupdate-1.1.1/include/array.c 2011-03-20 21:59:36.260000007 +0000
4 ***************
5 *** 53,59 ****
8 /*
9 ! ** splice
11 ** remove length elements from array starting at offset
12 ** All trailing elements will be left aligned
13 --- 53,59 ----
17 ! ** nsplice
19 ** remove length elements from array starting at offset
20 ** All trailing elements will be left aligned
21 ***************
22 *** 70,76 ****
23 ** Returns the number of elements removed
26 ! int splice(void** array, int cnt, int offset, int length)
28 int t;
30 --- 70,76 ----
31 ** Returns the number of elements removed
34 ! int nsplice(void** array, int cnt, int offset, int length)
36 int t;
38 diff -crB ipupdate-1.1.1_orig/include/array.h ipupdate-1.1.1/include/array.h
39 *** ipupdate-1.1.1_orig/include/array.h 2011-03-20 21:58:51.466666674 +0000
40 --- ipupdate-1.1.1/include/array.h 2011-03-20 21:59:36.260000007 +0000
41 ***************
42 *** 2,5 ****
43 #include <stdlib.h>
45 char** split(char*, const char*, int*);
46 ! int splice(void**, int, int, int);
47 --- 2,5 ----
48 #include <stdlib.h>
50 char** split(char*, const char*, int*);
51 ! int nsplice(void**, int, int, int);
52 diff -crB ipupdate-1.1.1_orig/ipupdate.c ipupdate-1.1.1/ipupdate.c
53 *** ipupdate-1.1.1_orig/ipupdate.c 2011-03-20 21:58:51.470000007 +0000
54 --- ipupdate-1.1.1/ipupdate.c 2011-03-20 21:59:36.263333340 +0000
55 ***************
56 *** 295,301 ****
57 free(zone->keyname);
58 free(server->zones[j]);
60 ! server->zonec -= splice((void**)server->zones, server->zonec, j, 1);
61 continue;
64 --- 295,301 ----
65 free(zone->keyname);
66 free(server->zones[j]);
68 ! server->zonec -= nsplice((void**)server->zones, server->zonec, j, 1);
69 continue;
72 ***************
73 *** 317,323 ****
74 free(server->zones);
75 free(cfg.servers[i]);
77 ! cfg.serverc -= splice((void**)cfg.servers, cfg.serverc, i, 1);
78 continue;
80 i++;
81 --- 317,323 ----
82 free(server->zones);
83 free(cfg.servers[i]);
85 ! cfg.serverc -= nsplice((void**)cfg.servers, cfg.serverc, i, 1);
86 continue;
88 i++;
89 ***************
90 *** 414,420 ****
91 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
92 PostMsgFree(msg);
94 ! zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1);
95 continue;
98 --- 414,420 ----
99 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
100 PostMsgFree(msg);
102 ! zone->hostc -= nsplice((void**)zone->hosts, zone->hostc, i, 1);
103 continue;
106 ***************
107 *** 446,452 ****
108 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
109 PostMsgFree(msg);
111 ! zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1);
112 continue;
114 //append the record to the packet
115 --- 446,452 ----
116 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
117 PostMsgFree(msg);
119 ! zone->hostc -= nsplice((void**)zone->hosts, zone->hostc, i, 1);
120 continue;
122 //append the record to the packet
123 ***************
124 *** 488,494 ****
125 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
126 PostMsgFree(msg);
128 ! zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1);
129 continue;
132 --- 488,494 ----
133 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
134 PostMsgFree(msg);
136 ! zone->hostc -= nsplice((void**)zone->hosts, zone->hostc, i, 1);
137 continue;
140 ***************
141 *** 561,567 ****
142 asprintf(&msg, "checkip: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
143 PostMsgFree(msg);
145 ! if (zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1))
147 *((unsigned short*)&pkt.data[8]) = htons(zone->hostc);
148 continue;
149 --- 561,567 ----
150 asprintf(&msg, "checkip: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
151 PostMsgFree(msg);
153 ! if (zone->hostc -= nsplice((void**)zone->hosts, zone->hostc, i, 1))
155 *((unsigned short*)&pkt.data[8]) = htons(zone->hostc);
156 continue;
157 diff -crB ipupdate-1.1.1_orig/Makefile ipupdate-1.1.1/Makefile
158 *** ipupdate-1.1.1_orig/Makefile 2011-03-20 21:58:51.476666673 +0000
159 --- ipupdate-1.1.1/Makefile 2011-03-20 22:03:10.423333341 +0000
160 ***************
161 *** 75,113 ****
162 -rm ipupdate dollardns whatismyip ifip failover *.o
164 install: all
165 ! cp -f ipupdate /usr/sbin
166 ! mkdir -p /etc/ipupdate
167 ! cp -f dollardns whatismyip ifip failover /etc/ipupdate
168 ! @echo "installing man pages"
169 ! @-if [ -x /usr/share/man ]; then \
170 ! cp -f man/getip.7 /usr/share/man/man7/getip.7; \
171 ! cp -f man/ipupdate.8 /usr/share/man/man8/ipupdate.8; \
172 ! cp -f man/ipupdate.conf.5 /usr/share/man/man5/ipupdate.conf.5; \
173 ! elif [ -x /usr/local/man ]; then \
174 ! cp -f man/getip.7 /usr/local/man/man7/getip.7; \
175 ! cp -f man/ipupdate.8 /usr/local/man/man8/ipupdate.8; \
176 ! cp -f man/ipupdate.conf.5 /usr/local/man/man5/ipupdate.conf.5; \
177 else \
178 ! cp -f man/getip.7 /usr/man/man7/getip.7; \
179 ! cp -f man/ipupdate.8 /usr/man/man8/ipupdate.8; \
180 ! cp -f man/ipupdate.conf.5 /usr/man/man5/ipupdate.conf.5; fi
181 ! cp -i ipupdate.conf /etc
182 ! chmod 640 /etc/ipupdate.conf
184 uninstall:
185 ! -rm /usr/sbin/ipupdate
186 ! -rm -r /etc/ipupdate
187 @echo "uninstalling man pages"
188 ! @-if [ -x /usr/share/man ]; then \
189 ! rm /usr/share/man/man7/getip.7; \
190 ! rm /usr/share/man/man8/ipupdate.8; \
191 ! rm /usr/share/man/man5/ipupdate.conf.5; \
192 ! elif [ -x /usr/local/man ]; then \
193 ! rm /usr/local/man/man7/getip.7 \
194 ! rm /usr/local/man/man8/ipupdate.8; \
195 ! rm /usr/local/man/man5/ipupdate.conf.5; \
196 else \
197 ! rm /usr/man/man7/getip.7; \
198 ! rm /usr/man/man8/ipupdate.8; \
199 ! rm /usr/man/man5/ipupdate.conf.5; fi
200 ! rm -i /etc/ipupdate.conf
201 --- 75,113 ----
202 -rm ipupdate dollardns whatismyip ifip failover *.o
204 install: all
205 ! cp -f ipupdate $(DESTDIR)/usr/sbin
206 ! mkdir -p $(DESTDIR)/etc/ipupdate
207 ! cp -f dollardns whatismyip ifip failover $(DESTDIR)/etc/ipupdate
208 ! @echo "installing man pages" #archlinux man is in /usr/share/man
209 ! @-if [ -x $(DESTDIR)/usr/share/man ]; then \
210 ! cp -f man/getip.7 $(DESTDIR)/usr/share/man/man7/getip.7; \
211 ! cp -f man/ipupdate.8 $(DESTDIR)/usr/share/man/man8/ipupdate.8; \
212 ! cp -f man/ipupdate.conf.5 $(DESTDIR)/usr/share/man/man5/ipupdate.conf.5; \
213 ! elif [ -x $(DESTDIR)/usr/local/man ]; then \
214 ! cp -f man/getip.7 $(DESTDIR)/usr/local/man/man7/getip.7; \
215 ! cp -f man/ipupdate.8 $(DESTDIR)/usr/local/man/man8/ipupdate.8; \
216 ! cp -f man/ipupdate.conf.5 $(DESTDIR)/usr/local/man/man5/ipupdate.conf.5; \
217 else \
218 ! cp -f man/getip.7 $(DESTDIR)/usr/man/man7/getip.7; \
219 ! cp -f man/ipupdate.8 $(DESTDIR)/usr/man/man8/ipupdate.8; \
220 ! cp -f man/ipupdate.conf.5 $(DESTDIR)/usr/man/man5/ipupdate.conf.5; fi
221 ! cp -i ipupdate.conf $(DESTDIR)/etc
222 ! chmod 640 $(DESTDIR)/etc/ipupdate.conf
224 uninstall:
225 ! -rm $(DESTDIR)/usr/sbin/ipupdate
226 ! -rm -r $(DESTDIR)/etc/ipupdate
227 @echo "uninstalling man pages"
228 ! @-if [ -x $(DESTDIR)/usr/share/man ]; then \
229 ! rm $(DESTDIR)/usr/share/man/man7/getip.7; \
230 ! rm $(DESTDIR)/usr/share/man/man8/ipupdate.8; \
231 ! rm $(DESTDIR)/usr/share/man/man5/ipupdate.conf.5; \
232 ! elif [ -x $(DESTDIR)/usr/local/man ]; then \
233 ! rm $(DESTDIR)/usr/local/man/man7/getip.7 \
234 ! rm $(DESTDIR)/usr/local/man/man8/ipupdate.8; \
235 ! rm $(DESTDIR)/usr/local/man/man5/ipupdate.conf.5; \
236 else \
237 ! rm $(DESTDIR)/usr/man/man7/getip.7; \
238 ! rm $(DESTDIR)/usr/man/man8/ipupdate.8; \
239 ! rm $(DESTDIR)/usr/man/man5/ipupdate.conf.5; fi
240 ! rm -i $(DESTDIR)/etc/ipupdate.conf