1 string.h fix |
|
2 |
|
3 diff -r 6f7a81934006 authenticate/Makefile.in |
|
4 --- a/authenticate/Makefile.in Wed Jan 16 22:39:43 2008 +0100 |
|
5 +++ b/authenticate/Makefile.in Sun Jan 20 01:57:01 2008 +0100 |
|
6 @@ -93,7 +93,7 @@ CLEANFILES = $(man_MANS) $(noinst_HTMLS) |
|
7 |
|
8 EXTRA_DIST = $(man_MANS) $(noinst_HTMLS) $(noinst_PODS) |
|
9 |
|
10 -CXXLINK = $(CC) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
11 +CXXLINK = $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
12 INCLUDES = $(CIINCLUDES) -I../lib |
|
13 |
|
14 checkvpw_SOURCES = checkvpw.cc authvlib.cc authvlib.h |
|
15 diff -r 6f7a81934006 authenticate/authvmailmgr.cc |
|
16 --- a/authenticate/authvmailmgr.cc Wed Jan 16 22:39:43 2008 +0100 |
|
17 +++ b/authenticate/authvmailmgr.cc Sun Jan 20 01:57:01 2008 +0100 |
|
18 @@ -15,6 +15,8 @@ |
|
19 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
|
21 #include <config.h> |
|
22 +#include <stdlib.h> |
|
23 +#include <string.h> |
|
24 #include "misc/exec.h" |
|
25 #include "authvlib.h" |
|
26 // Courier-IMAP includes |
|
27 diff -r 6f7a81934006 authenticate/checkvpw.cc |
|
28 --- a/authenticate/checkvpw.cc Wed Jan 16 22:39:43 2008 +0100 |
|
29 +++ b/authenticate/checkvpw.cc Sun Jan 20 01:57:01 2008 +0100 |
|
30 @@ -16,6 +16,7 @@ |
|
31 |
|
32 #include <config.h> |
|
33 #include <errno.h> |
|
34 +#include <stdlib.h> |
|
35 #include <string.h> |
|
36 #include <sys/types.h> |
|
37 #include "config/configrc.h" |
|
38 diff -r 6f7a81934006 authenticate/vauthenticate.cc |
|
39 --- a/authenticate/vauthenticate.cc Wed Jan 16 22:39:43 2008 +0100 |
|
40 +++ b/authenticate/vauthenticate.cc Sun Jan 20 01:57:01 2008 +0100 |
|
41 @@ -16,6 +16,7 @@ |
|
42 |
|
43 #include <config.h> |
|
44 #include <errno.h> |
|
45 +#include <stdlib.h> |
|
46 #include <unistd.h> |
|
47 #include "authvlib.h" |
|
48 #include "fdbuf/fdbuf.h" |
|
49 diff -r 6f7a81934006 cgi/Makefile.in |
|
50 --- a/cgi/Makefile.in Wed Jan 16 22:39:43 2008 +0100 |
|
51 +++ b/cgi/Makefile.in Sun Jan 20 01:57:01 2008 +0100 |
|
52 @@ -86,7 +86,7 @@ cgi_PROGRAMS = vpasswd vadduser vdeluser |
|
53 cgi_PROGRAMS = vpasswd vadduser vdeluser vaddalias vchattr vchforwards listvdomain |
|
54 |
|
55 |
|
56 -CXXLINK = $(CC) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
57 +CXXLINK = $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
58 INCLUDES = -I../lib |
|
59 |
|
60 vpasswd_SOURCES = vpasswd.cc |
|
61 diff -r 6f7a81934006 commands/Makefile.in |
|
62 --- a/commands/Makefile.in Wed Jan 16 22:39:43 2008 +0100 |
|
63 +++ b/commands/Makefile.in Sun Jan 20 01:57:01 2008 +0100 |
|
64 @@ -99,7 +99,7 @@ EXTRA_PROGRAMS = vpasswd2cdb vrehash |
|
65 EXTRA_PROGRAMS = vpasswd2cdb vrehash |
|
66 EXTRA_SCRIPTS = allvpasswd2cdb |
|
67 |
|
68 -CXXLINK = $(CC) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
69 +CXXLINK = $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
70 INCLUDES = -I../lib -DBINDIR=\"@bindir@\" |
|
71 |
|
72 listvdomain_SOURCES = listvdomain.cc vcommand.cc |
|
73 diff -r 6f7a81934006 commands/vcheckquota.cc |
|
74 --- a/commands/vcheckquota.cc Wed Jan 16 22:39:43 2008 +0100 |
|
75 +++ b/commands/vcheckquota.cc Sun Jan 20 01:57:01 2008 +0100 |
|
76 @@ -31,10 +31,10 @@ |
|
77 |
|
78 const char* cli_program = "vcheckquota"; |
|
79 const char* cli_help_prefix = "vmailmgr quota enforcement program\n"; |
|
80 -const char* cli_help_suffix = " |
|
81 -Warning: the soft-message is linked into the users maildir once for each |
|
82 -message that is received while the account is over its soft quota. This may |
|
83 -result in multiple warning messages.\n"; |
|
84 +const char* cli_help_suffix = |
|
85 +"Warning: the soft-message is linked into the users maildir once for each" |
|
86 +"message that is received while the account is over its soft quota. This may" |
|
87 +"result in multiple warning messages.\n"; |
|
88 const char* cli_args_usage = ""; |
|
89 const int cli_args_min = 0; |
|
90 const int cli_args_max = 0; |
|
91 diff -r 6f7a81934006 commands/vchforwards.cc |
|
92 --- a/commands/vchforwards.cc Wed Jan 16 22:39:43 2008 +0100 |
|
93 +++ b/commands/vchforwards.cc Sun Jan 20 01:57:01 2008 +0100 |
|
94 @@ -25,8 +25,7 @@ const char* cli_help_prefix = |
|
95 const char* cli_help_prefix = |
|
96 "Change virtual user forwarding addresses.\n"; |
|
97 const char* cli_help_suffix = |
|
98 -"If no forwarding addresses are given, forwarding is disabled. |
|
99 -"; |
|
100 +"If no forwarding addresses are given, forwarding is disabled."; |
|
101 const char* cli_args_usage = "USERNAME [DESTINATION1 ...]"; |
|
102 const int cli_args_min = 1; |
|
103 const int cli_args_max = -1; |
|
104 diff -r 6f7a81934006 commands/vpasswd2cdb.cc |
|
105 --- a/commands/vpasswd2cdb.cc Wed Jan 16 22:39:43 2008 +0100 |
|
106 +++ b/commands/vpasswd2cdb.cc Sun Jan 20 01:57:01 2008 +0100 |
|
107 @@ -27,9 +27,9 @@ const char* cli_program = "vpasswd2cdb"; |
|
108 const char* cli_program = "vpasswd2cdb"; |
|
109 const char* cli_help_prefix = "Converts text password tables to CDB format\n"; |
|
110 const char* cli_help_suffix = |
|
111 -"Reads in a standard virtual password table in the current directory, |
|
112 -and writes it out to a CDB table. The file names for the text and CDB |
|
113 -tables are determined from the configuration file."; |
|
114 +"Reads in a standard virtual password table in the current directory," |
|
115 +"and writes it out to a CDB table. The file names for the text and CDB" |
|
116 +"tables are determined from the configuration file."; |
|
117 const char* cli_args_usage = ""; |
|
118 const int cli_args_min = 0; |
|
119 const int cli_args_max = 0; |
|
120 diff -r 6f7a81934006 commands/vpasswd2db.cc |
|
121 --- a/commands/vpasswd2db.cc Wed Jan 16 22:39:43 2008 +0100 |
|
122 +++ b/commands/vpasswd2db.cc Sun Jan 20 01:57:01 2008 +0100 |
|
123 @@ -26,9 +26,9 @@ const char* cli_program = "vpasswd2db"; |
|
124 const char* cli_program = "vpasswd2db"; |
|
125 const char* cli_help_prefix = "Converts text password tables to current vpwtable DB format\n"; |
|
126 const char* cli_help_suffix = |
|
127 -"Reads in a standard virtual password table in the current directory, |
|
128 -and writes it out to a table. The file names for the input and output |
|
129 -tables are determined from the configuration file."; |
|
130 +"Reads in a standard virtual password table in the current directory," |
|
131 +"and writes it out to a table. The file names for the input and output" |
|
132 +"tables are determined from the configuration file."; |
|
133 const char* cli_args_usage = ""; |
|
134 const int cli_args_min = 0; |
|
135 const int cli_args_max = 0; |
|
136 diff -r 6f7a81934006 daemon/Makefile.in |
|
137 --- a/daemon/Makefile.in Wed Jan 16 22:39:43 2008 +0100 |
|
138 +++ b/daemon/Makefile.in Sun Jan 20 01:57:01 2008 +0100 |
|
139 @@ -91,7 +91,7 @@ CLEANFILES = $(man_MANS) $(noinst_HTMLS) |
|
140 |
|
141 EXTRA_DIST = $(man_MANS) $(noinst_HTMLS) $(noinst_PODS) |
|
142 |
|
143 -CXXLINK = $(CC) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
144 +CXXLINK = $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
145 INCLUDES = -I../lib |
|
146 |
|
147 vmailmgrd_SOURCES = daemon.h adduser2.cc autoresponse.cc chattr.cc check.cc command.h command.cc deluser.cc dispatch.cc listdomain.cc log.h log.cc lookup.cc main.cc state.h state.cc |
|
148 diff -r 6f7a81934006 lib/courier-authlib/changeuidgid.c |
|
149 --- a/lib/courier-authlib/changeuidgid.c Wed Jan 16 22:39:43 2008 +0100 |
|
150 +++ b/lib/courier-authlib/changeuidgid.c Sun Jan 20 01:57:01 2008 +0100 |
|
151 @@ -12,6 +12,7 @@ |
|
152 #endif |
|
153 #include <stdio.h> |
|
154 #include <stdlib.h> |
|
155 +#include <string.h> |
|
156 #include <grp.h> |
|
157 #include <pwd.h> |
|
158 #include <errno.h> |
|
159 diff -r 6f7a81934006 lib/misc/crc32.h |
|
160 --- a/lib/misc/crc32.h Wed Jan 16 22:39:43 2008 +0100 |
|
161 +++ b/lib/misc/crc32.h Sun Jan 20 01:57:01 2008 +0100 |
|
162 @@ -45,4 +45,4 @@ public: |
|
163 (unsigned char)(octet) ] ^ ( ((crc32)>>8) & 0x00FFFFFFL ) ) |
|
164 #endif |
|
165 |
|
166 -#endif CRC32INIT |
|
167 +#endif /* CRC32INIT */ |
|
168 diff -r 6f7a81934006 lib/misc/exec.cc |
|
169 --- a/lib/misc/exec.cc Wed Jan 16 22:39:43 2008 +0100 |
|
170 +++ b/lib/misc/exec.cc Sun Jan 20 01:57:01 2008 +0100 |
|
171 @@ -17,10 +17,12 @@ |
|
172 #include <config.h> |
|
173 #include <errno.h> |
|
174 #include <stdlib.h> |
|
175 +#include <string.h> |
|
176 #include <sys/stat.h> |
|
177 #include <sys/types.h> |
|
178 #include <sys/wait.h> |
|
179 #include <unistd.h> |
|
180 +#include <string.h> |
|
181 #include "exec.h" |
|
182 #include "config/configrc.h" |
|
183 |
|
184 diff -r 6f7a81934006 lib/misc/keystrlist.cc |
|
185 --- a/lib/misc/keystrlist.cc Wed Jan 16 22:39:43 2008 +0100 |
|
186 +++ b/lib/misc/keystrlist.cc Sun Jan 20 01:57:01 2008 +0100 |
|
187 @@ -15,6 +15,7 @@ |
|
188 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
189 |
|
190 #include <config.h> |
|
191 +#include <string.h> |
|
192 #include "strlist.h" |
|
193 |
|
194 void keystrlist::set(const mystring& var, const mystring& val) |
|
195 diff -r 6f7a81934006 lib/misc/md5-crypt.c |
|
196 --- a/lib/misc/md5-crypt.c Wed Jan 16 22:39:43 2008 +0100 |
|
197 +++ b/lib/misc/md5-crypt.c Sun Jan 20 01:57:01 2008 +0100 |
|
198 @@ -32,7 +32,7 @@ static const char md5_salt_prefix[] = "$ |
|
199 static const char md5_salt_prefix[] = "$1$"; |
|
200 |
|
201 /* Table with characters for base64 transformation. */ |
|
202 -static const char b64t[64] = |
|
203 +static const char b64t[] = |
|
204 "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; |
|
205 |
|
206 |
|
207 @@ -53,11 +53,7 @@ extern char *md5_crypt __P ((const char |
|
208 /* This entry point is equivalent to the `crypt' function in Unix |
|
209 libcs. */ |
|
210 char * |
|
211 -md5_crypt_r (key, salt, buffer, buflen) |
|
212 - const char *key; |
|
213 - const char *salt; |
|
214 - char *buffer; |
|
215 - int buflen; |
|
216 +md5_crypt_r (const char *key, const char *salt, char *buffer, int buflen) |
|
217 { |
|
218 unsigned char alt_result[16]; |
|
219 struct md5_ctx ctx; |
|
220 @@ -213,9 +209,7 @@ md5_crypt_r (key, salt, buffer, buflen) |
|
221 |
|
222 |
|
223 char * |
|
224 -md5_crypt (key, salt) |
|
225 - const char *key; |
|
226 - const char *salt; |
|
227 +md5_crypt (const char *key, const char *salt) |
|
228 { |
|
229 /* We don't want to have an arbitrary limit in the size of the |
|
230 password. We can compute the size of the result in advance and |
|
231 @@ -227,7 +221,7 @@ md5_crypt (key, salt) |
|
232 if (buflen < needed) |
|
233 { |
|
234 buflen = needed; |
|
235 - if ((buffer = realloc (buffer, buflen)) == NULL) |
|
236 + if ((buffer = (char *)realloc (buffer, buflen)) == NULL) |
|
237 return NULL; |
|
238 } |
|
239 |
|
240 diff -r 6f7a81934006 lib/misc/md5.c |
|
241 --- a/lib/misc/md5.c Wed Jan 16 22:39:43 2008 +0100 |
|
242 +++ b/lib/misc/md5.c Sun Jan 20 01:57:01 2008 +0100 |
|
243 @@ -69,8 +69,7 @@ static const unsigned char fillbuf[64] = |
|
244 /* Initialize structure containing state of computation. |
|
245 (RFC 1321, 3.3: Step 3) */ |
|
246 void |
|
247 -md5_init_ctx (ctx) |
|
248 - struct md5_ctx *ctx; |
|
249 +md5_init_ctx (struct md5_ctx *ctx) |
|
250 { |
|
251 ctx->A = 0x67452301; |
|
252 ctx->B = 0xefcdab89; |
|
253 @@ -87,9 +86,7 @@ md5_init_ctx (ctx) |
|
254 IMPORTANT: On some systems it is required that RESBUF is correctly |
|
255 aligned for a 32 bits value. */ |
|
256 void * |
|
257 -md5_read_ctx (ctx, resbuf) |
|
258 - const struct md5_ctx *ctx; |
|
259 - void *resbuf; |
|
260 +md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) |
|
261 { |
|
262 ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A); |
|
263 ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B); |
|
264 @@ -105,9 +102,7 @@ md5_read_ctx (ctx, resbuf) |
|
265 IMPORTANT: On some systems it is required that RESBUF is correctly |
|
266 aligned for a 32 bits value. */ |
|
267 void * |
|
268 -md5_finish_ctx (ctx, resbuf) |
|
269 - struct md5_ctx *ctx; |
|
270 - void *resbuf; |
|
271 +md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) |
|
272 { |
|
273 /* Take yet unprocessed bytes into account. */ |
|
274 md5_uint32 bytes = ctx->buflen; |
|
275 @@ -136,9 +131,7 @@ md5_finish_ctx (ctx, resbuf) |
|
276 resulting message digest number will be written into the 16 bytes |
|
277 beginning at RESBLOCK. */ |
|
278 int |
|
279 -md5_stream (stream, resblock) |
|
280 - FILE *stream; |
|
281 - void *resblock; |
|
282 +md5_stream (FILE *stream, void *resblock) |
|
283 { |
|
284 /* Important: BLOCKSIZE must be a multiple of 64. */ |
|
285 #define BLOCKSIZE 4096 |
|
286 @@ -193,10 +186,7 @@ md5_stream (stream, resblock) |
|
287 output yields to the wanted ASCII representation of the message |
|
288 digest. */ |
|
289 void * |
|
290 -md5_buffer (buffer, len, resblock) |
|
291 - const char *buffer; |
|
292 - size_t len; |
|
293 - void *resblock; |
|
294 +md5_buffer (const char *buffer, size_t len, void *resblock) |
|
295 { |
|
296 struct md5_ctx ctx; |
|
297 |
|
298 @@ -212,10 +202,7 @@ md5_buffer (buffer, len, resblock) |
|
299 |
|
300 |
|
301 void |
|
302 -md5_process_bytes (buffer, len, ctx) |
|
303 - const void *buffer; |
|
304 - size_t len; |
|
305 - struct md5_ctx *ctx; |
|
306 +md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) |
|
307 { |
|
308 /* When we already have some bits in our internal buffer concatenate |
|
309 both inputs first. */ |
|
310 @@ -270,13 +257,10 @@ md5_process_bytes (buffer, len, ctx) |
|
311 It is assumed that LEN % 64 == 0. */ |
|
312 |
|
313 void |
|
314 -md5_process_block (buffer, len, ctx) |
|
315 - const void *buffer; |
|
316 - size_t len; |
|
317 - struct md5_ctx *ctx; |
|
318 +md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) |
|
319 { |
|
320 md5_uint32 correct_words[16]; |
|
321 - const md5_uint32 *words = buffer; |
|
322 + const md5_uint32 *words = (const md5_uint32 *)buffer; |
|
323 size_t nwords = len / sizeof (md5_uint32); |
|
324 const md5_uint32 *endp = words + nwords; |
|
325 md5_uint32 A = ctx->A; |
|
326 diff -r 6f7a81934006 lib/misc/strlist.cc |
|
327 --- a/lib/misc/strlist.cc Wed Jan 16 22:39:43 2008 +0100 |
|
328 +++ b/lib/misc/strlist.cc Sun Jan 20 01:57:01 2008 +0100 |
|
329 @@ -15,6 +15,7 @@ |
|
330 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
331 |
|
332 #include <config.h> |
|
333 +#include <string.h> |
|
334 #include "strlist.h" |
|
335 |
|
336 static const char* compare(const char* ptr, const char* end, |
|
337 diff -r 6f7a81934006 lib/mystring/append.cc |
|
338 --- a/lib/mystring/append.cc Wed Jan 16 22:39:43 2008 +0100 |
|
339 +++ b/lib/mystring/append.cc Sun Jan 20 01:57:01 2008 +0100 |
|
340 @@ -1,3 +1,4 @@ |
|
341 +#include <string.h> |
|
342 #include "mystring.h" |
|
343 #include "trace.h" |
|
344 |
|