]> git.pld-linux.org Git - packages/cvs-nserver.git/blame - cvs-nserver-getline.patch
Release 36 (by relup.sh)
[packages/cvs-nserver.git] / cvs-nserver-getline.patch
CommitLineData
7694fe0b
JR
1diff -ur cvs-nserver-1.11.1.52/lib/getline.c cvs-nserver-1.11.1.52-getline/lib/getline.c
2--- cvs-nserver-1.11.1.52/lib/getline.c 2000-12-01 00:50:43.000000000 +0100
3+++ cvs-nserver-1.11.1.52-getline/lib/getline.c 2009-07-04 00:33:52.556620165 +0200
4@@ -154,7 +154,7 @@
5 }
6
7 int
8-getline (lineptr, n, stream)
9+cvs_getline (lineptr, n, stream)
10 char **lineptr;
11 size_t *n;
12 FILE *stream;
13@@ -163,7 +163,7 @@
14 }
15
16 int
17-getline_safe (lineptr, n, stream, limit)
18+cvs_getline_safe (lineptr, n, stream, limit)
19 char **lineptr;
20 size_t *n;
21 FILE *stream;
22diff -ur cvs-nserver-1.11.1.52/lib/getline.h cvs-nserver-1.11.1.52-getline/lib/getline.h
23--- cvs-nserver-1.11.1.52/lib/getline.h 2000-12-01 00:50:43.000000000 +0100
24+++ cvs-nserver-1.11.1.52-getline/lib/getline.h 2009-07-04 00:32:03.262674181 +0200
25@@ -12,9 +12,9 @@
26 #define GETLINE_NO_LIMIT -1
27
28 int
29- getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
30+ cvs_getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
31 int
32- getline_safe __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
33+ cvs_getline_safe __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
34 int limit));
35 int
36 getstr __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
37diff -ur cvs-nserver-1.11.1.52/src/client.c cvs-nserver-1.11.1.52-getline/src/client.c
38--- cvs-nserver-1.11.1.52/src/client.c 2009-07-04 00:34:22.252366910 +0200
39+++ cvs-nserver-1.11.1.52-getline/src/client.c 2009-07-04 00:33:52.496617548 +0200
40@@ -5007,7 +5007,7 @@
41 char *p;
42
43 fp = open_file (CVSADM_NOTIFY, "r");
44- if (getline (&line, &line_len, fp) < 0)
45+ if (cvs_getline (&line, &line_len, fp) < 0)
46 {
47 if (feof (fp))
48 error (0, 0, "cannot read %s: end of file", CVSADM_NOTIFY);
49@@ -5028,7 +5028,7 @@
50 line + 1);
51 }
52
53- if (getline (&line, &line_len, fp) < 0)
54+ if (cvs_getline (&line, &line_len, fp) < 0)
55 {
56 if (feof (fp))
57 {
58diff -ur cvs-nserver-1.11.1.52/src/commit.c cvs-nserver-1.11.1.52-getline/src/commit.c
59--- cvs-nserver-1.11.1.52/src/commit.c 2009-07-04 00:34:22.222367462 +0200
60+++ cvs-nserver-1.11.1.52-getline/src/commit.c 2009-07-04 00:33:52.449617374 +0200
61@@ -1488,7 +1488,7 @@
62
63 line = NULL;
64 line_chars_allocated = 0;
65- line_length = getline (&line, &line_chars_allocated, fp);
66+ line_length = cvs_getline (&line, &line_chars_allocated, fp);
67 if (line_length > 0)
68 {
69 /* Remove any trailing newline. */
70diff -ur cvs-nserver-1.11.1.52/src/cvspasswd.c cvs-nserver-1.11.1.52-getline/src/cvspasswd.c
71--- cvs-nserver-1.11.1.52/src/cvspasswd.c 2001-09-08 19:26:57.000000000 +0200
72+++ cvs-nserver-1.11.1.52-getline/src/cvspasswd.c 2009-07-04 00:33:52.400617520 +0200
73@@ -176,7 +176,7 @@
74
75 /* first check user and/or password */
76
77- while (getline (&passwd_line, &passwd_line_allocated, CVSPASSWD) != -1)
78+ while (cvs_getline (&passwd_line, &passwd_line_allocated, CVSPASSWD) != -1)
79 {
80 assert(strlen(passwd_line) > 0);
81 passwd_line[strlen(passwd_line) - 1] = '\0';
82diff -ur cvs-nserver-1.11.1.52/src/cvspasswd-file.c cvs-nserver-1.11.1.52-getline/src/cvspasswd-file.c
83--- cvs-nserver-1.11.1.52/src/cvspasswd-file.c 2009-07-04 00:34:22.254366550 +0200
84+++ cvs-nserver-1.11.1.52-getline/src/cvspasswd-file.c 2009-07-04 00:33:52.497617308 +0200
85@@ -65,7 +65,7 @@
86 char *passwd_line = NULL;
87 size_t passwd_line_allocated = 0;
88
89- while (getline(&passwd_line, &passwd_line_allocated, cvspasswd) != -1)
90+ while (cvs_getline(&passwd_line, &passwd_line_allocated, cvspasswd) != -1)
91 {
92 char *field_user, *field_password;
93
94diff -ur cvs-nserver-1.11.1.52/src/cvsrc.c cvs-nserver-1.11.1.52-getline/src/cvsrc.c
95--- cvs-nserver-1.11.1.52/src/cvsrc.c 2009-07-04 00:34:22.178367490 +0200
96+++ cvs-nserver-1.11.1.52-getline/src/cvsrc.c 2009-07-04 00:33:52.409619722 +0200
97@@ -116,7 +116,7 @@
98 line_chars_allocated = 0;
99 command_len = strlen (cmdname);
100 cvsrcfile = open_file (homeinit, "r");
101- while ((line_length = getline (&line, &line_chars_allocated, cvsrcfile))
102+ while ((line_length = cvs_getline (&line, &line_chars_allocated, cvsrcfile))
103 >= 0)
104 {
105 /* skip over comment lines */
106diff -ur cvs-nserver-1.11.1.52/src/edit.c cvs-nserver-1.11.1.52-getline/src/edit.c
107--- cvs-nserver-1.11.1.52/src/edit.c 2001-09-24 00:13:09.000000000 +0200
108+++ cvs-nserver-1.11.1.52-getline/src/edit.c 2009-07-04 00:33:52.311617374 +0200
109@@ -178,7 +178,7 @@
110 return 0;
111 }
112
113- while (getline (&line, &line_len, fp) > 0)
114+ while (cvs_getline (&line, &line_len, fp) > 0)
115 {
116 notif_type = line[0];
117 if (notif_type == '\0')
118@@ -891,7 +891,7 @@
119 error (0, errno, "cannot read %s", usersname);
120 if (fp != NULL)
121 {
122- while (getline (&line, &line_len, fp) >= 0)
123+ while (cvs_getline (&line, &line_len, fp) >= 0)
124 {
125 if (strncmp (line, p, len) == 0
126 && line[len] == ':')
127@@ -995,7 +995,7 @@
128 error (0, errno, "cannot open %s", CVSADM_NOTIFY);
129 return;
130 }
131- while (getline (&line, &line_len, fp) > 0)
132+ while (cvs_getline (&line, &line_len, fp) > 0)
133 {
134 int notif_type;
135 char *filename;
136diff -ur cvs-nserver-1.11.1.52/src/entries.c cvs-nserver-1.11.1.52-getline/src/entries.c
137--- cvs-nserver-1.11.1.52/src/entries.c 2001-05-19 14:05:04.000000000 +0200
138+++ cvs-nserver-1.11.1.52-getline/src/entries.c 2009-07-04 00:33:52.316617855 +0200
139@@ -302,7 +302,7 @@
140 line_chars_allocated = 0;
141
142 ent = NULL;
143- while ((line_length = getline (&line, &line_chars_allocated, fpin)) > 0)
144+ while ((line_length = cvs_getline (&line, &line_chars_allocated, fpin)) > 0)
145 {
146 l = line;
147
148@@ -737,7 +737,7 @@
149 line = NULL;
150 line_chars_allocated = 0;
151
152- if ((line_length = getline (&line, &line_chars_allocated, fp)) > 0)
153+ if ((line_length = cvs_getline (&line, &line_chars_allocated, fp)) > 0)
154 {
155 /* Remove any trailing newline. */
156 if (line[line_length - 1] == '\n')
157@@ -1070,7 +1070,7 @@
158
159 if (fp != NULL)
160 {
161- while (getline (&line, &line_allocated, fp) >= 0)
162+ while (cvs_getline (&line, &line_allocated, fp) >= 0)
163 {
164 char *linefile;
165 char *p;
166diff -ur cvs-nserver-1.11.1.52/src/fileattr.c cvs-nserver-1.11.1.52-getline/src/fileattr.c
167--- cvs-nserver-1.11.1.52/src/fileattr.c 2000-12-01 00:50:46.000000000 +0100
168+++ cvs-nserver-1.11.1.52-getline/src/fileattr.c 2009-07-04 00:33:52.320617816 +0200
169@@ -100,7 +100,7 @@
170 attrlist = getlist ();
171 while (1) {
172 int nread;
173- nread = getline (&line, &line_len, fp);
174+ nread = cvs_getline (&line, &line_len, fp);
175 if (nread < 0)
176 break;
177 /* Remove trailing newline. */
178diff -ur cvs-nserver-1.11.1.52/src/ignore.c cvs-nserver-1.11.1.52-getline/src/ignore.c
179--- cvs-nserver-1.11.1.52/src/ignore.c 2001-05-26 14:43:51.000000000 +0200
180+++ cvs-nserver-1.11.1.52-getline/src/ignore.c 2009-07-04 00:33:52.327617418 +0200
181@@ -164,7 +164,7 @@
182 error (0, errno, "cannot open %s", file);
183 return;
184 }
185- while (getline (&line, &line_allocated, fp) >= 0)
186+ while (cvs_getline (&line, &line_allocated, fp) >= 0)
187 ign_add (line, hold);
188 if (ferror (fp))
189 error (0, errno, "cannot read %s", file);
190diff -ur cvs-nserver-1.11.1.52/src/login.c cvs-nserver-1.11.1.52-getline/src/login.c
191--- cvs-nserver-1.11.1.52/src/login.c 2009-07-04 00:34:22.178367490 +0200
192+++ cvs-nserver-1.11.1.52-getline/src/login.c 2009-07-04 00:33:52.411617563 +0200
193@@ -363,7 +363,7 @@
194
195 /* Check each line to see if we have this entry already. */
196 line = 0;
197- while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)
198+ while ((line_length = cvs_getline (&linebuf, &linebuf_len, fp)) >= 0)
199 {
200 line++;
201 password = password_entry_parseline(cvsroot_canonical, 1, line, linebuf);
202@@ -432,7 +432,7 @@
203 error (1, errno, "unable to open temp file %s", tmp_name);
204
205 line = 0;
206- while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)
207+ while ((line_length = cvs_getline (&linebuf, &linebuf_len, fp)) >= 0)
208 {
209 line++;
210 if (line < found_at
211diff -ur cvs-nserver-1.11.1.52/src/logmsg.c cvs-nserver-1.11.1.52-getline/src/logmsg.c
212--- cvs-nserver-1.11.1.52/src/logmsg.c 2001-09-23 13:29:21.000000000 +0200
213+++ cvs-nserver-1.11.1.52-getline/src/logmsg.c 2009-07-04 00:33:52.344617823 +0200
214@@ -321,7 +321,7 @@
215 size_t offset = 0;
216 while (1)
217 {
218- line_length = getline (&line, &line_chars_allocated, fp);
219+ line_length = cvs_getline (&line, &line_chars_allocated, fp);
220 if (line_length == -1)
221 {
222 if (ferror (fp))
223@@ -350,7 +350,7 @@
224 (void) printf ("a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs\n");
225 (void) printf ("Action: (continue) ");
226 (void) fflush (stdout);
227- line_length = getline (&line, &line_chars_allocated, stdin);
228+ line_length = cvs_getline (&line, &line_chars_allocated, stdin);
229 if (line_length < 0)
230 {
231 error (0, errno, "cannot read from stdin");
232@@ -491,7 +491,7 @@
233 char *line = NULL;
234 size_t line_chars_allocated = 0;
235
236- while (getline (&line, &line_chars_allocated, tfp) >= 0)
237+ while (cvs_getline (&line, &line_chars_allocated, tfp) >= 0)
238 (void) fputs (line, fp);
239 if (ferror (tfp))
240 error (0, errno, "warning: cannot read %s", template);
241diff -ur cvs-nserver-1.11.1.52/src/mkmodules.c cvs-nserver-1.11.1.52-getline/src/mkmodules.c
242--- cvs-nserver-1.11.1.52/src/mkmodules.c 2001-06-16 21:14:10.000000000 +0200
243+++ cvs-nserver-1.11.1.52-getline/src/mkmodules.c 2009-07-04 00:33:52.350617465 +0200
244@@ -451,7 +451,7 @@
245 *
246 * comment lines begin with '#'
247 */
248- while (getline (&line, &line_allocated, fp) >= 0)
249+ while (cvs_getline (&line, &line_allocated, fp) >= 0)
250 {
251 /* skip lines starting with # */
252 if (line[0] == '#')
253diff -ur cvs-nserver-1.11.1.52/src/parseinfo.c cvs-nserver-1.11.1.52-getline/src/parseinfo.c
254--- cvs-nserver-1.11.1.52/src/parseinfo.c 2001-11-20 22:26:06.000000000 +0100
255+++ cvs-nserver-1.11.1.52-getline/src/parseinfo.c 2009-07-04 00:33:52.353617386 +0200
256@@ -72,7 +72,7 @@
257
258 /* search the info file for lines that match */
259 callback_done = line_number = 0;
260- while (getline (&line, &line_allocated, fp_info) >= 0)
261+ while (cvs_getline (&line, &line_allocated, fp_info) >= 0)
262 {
263 line_number++;
264
265@@ -261,7 +261,7 @@
266 return 0;
267 }
268
269- while (getline (&line, &line_allocated, fp_info) >= 0)
270+ while (cvs_getline (&line, &line_allocated, fp_info) >= 0)
271 {
272 /* Skip comments. */
273 if (line[0] == '#')
274diff -ur cvs-nserver-1.11.1.52/src/patch.c cvs-nserver-1.11.1.52-getline/src/patch.c
275--- cvs-nserver-1.11.1.52/src/patch.c 2001-11-20 22:29:17.000000000 +0100
276+++ cvs-nserver-1.11.1.52-getline/src/patch.c 2009-07-04 00:33:52.357619467 +0200
277@@ -613,8 +613,8 @@
278 cvs_output ("\n", 1);
279
280 fp = open_file (tmpfile3, "r");
281- if (getline (&line1, &line1_chars_allocated, fp) < 0 ||
282- getline (&line2, &line2_chars_allocated, fp) < 0)
283+ if (cvs_getline (&line1, &line1_chars_allocated, fp) < 0 ||
284+ cvs_getline (&line2, &line2_chars_allocated, fp) < 0)
285 {
286 if (feof (fp))
287 error (0, 0, "\
288@@ -719,7 +719,7 @@
289
290 /* spew the rest of the diff out */
291 while ((line_length
292- = getline (&line1, &line1_chars_allocated, fp))
293+ = cvs_getline (&line1, &line1_chars_allocated, fp))
294 >= 0)
295 cvs_output (line1, 0);
296 if (line_length < 0 && !feof (fp))
297diff -ur cvs-nserver-1.11.1.52/src/release.c cvs-nserver-1.11.1.52-getline/src/release.c
298--- cvs-nserver-1.11.1.52/src/release.c 2001-10-13 17:21:56.000000000 +0200
299+++ cvs-nserver-1.11.1.52-getline/src/release.c 2009-07-04 00:33:52.366617869 +0200
300@@ -188,7 +188,7 @@
301
302 c = 0;
303
304- while ((line_length = getline (&line, &line_allocated, fp)) >= 0)
305+ while ((line_length = cvs_getline (&line, &line_allocated, fp)) >= 0)
306 {
307 if (strchr ("MARCZ", *line))
308 c++;
309diff -ur cvs-nserver-1.11.1.52/src/repos.c cvs-nserver-1.11.1.52-getline/src/repos.c
310--- cvs-nserver-1.11.1.52/src/repos.c 2001-09-23 00:28:58.000000000 +0200
311+++ cvs-nserver-1.11.1.52-getline/src/repos.c 2009-07-04 00:33:52.368618270 +0200
312@@ -91,7 +91,7 @@
313 error (1, save_errno, "cannot open %s", tmp);
314 }
315
316- if (getline (&repos, &repos_allocated, fpin) < 0)
317+ if (cvs_getline (&repos, &repos_allocated, fpin) < 0)
318 {
319 /* FIXME: should be checking for end of file separately. */
320 error (0, 0, "in directory %s:", xupdate_dir);
321diff -ur cvs-nserver-1.11.1.52/src/root.c cvs-nserver-1.11.1.52-getline/src/root.c
322--- cvs-nserver-1.11.1.52/src/root.c 2001-11-20 21:22:15.000000000 +0100
323+++ cvs-nserver-1.11.1.52-getline/src/root.c 2009-07-04 00:33:52.370617391 +0200
324@@ -75,7 +75,7 @@
325 */
326 fpin = open_file (tmp, "r");
327
328- if (getline (&root, &root_allocated, fpin) < 0)
329+ if (cvs_getline (&root, &root_allocated, fpin) < 0)
330 {
331 /* FIXME: should be checking for end of file separately; errno
332 is not set in that case. */
333diff -ur cvs-nserver-1.11.1.52/src/server.c cvs-nserver-1.11.1.52-getline/src/server.c
334--- cvs-nserver-1.11.1.52/src/server.c 2009-07-04 00:34:22.248367469 +0200
335+++ cvs-nserver-1.11.1.52-getline/src/server.c 2009-07-04 00:33:52.480617263 +0200
336@@ -2582,7 +2582,7 @@
337 }
338 else /* successfully opened readers file */
339 {
340- while ((num_red = getline (&linebuf, &linebuf_len, fp)) >= 0)
341+ while ((num_red = cvs_getline (&linebuf, &linebuf_len, fp)) >= 0)
342 {
343 /* Hmmm, is it worth importing my own readline
344 library into CVS? It takes care of chopping
345@@ -2643,7 +2643,7 @@
346 }
347
348 found_it = 0;
349- while ((num_red = getline (&linebuf, &linebuf_len, fp)) >= 0)
350+ while ((num_red = cvs_getline (&linebuf, &linebuf_len, fp)) >= 0)
351 {
352 /* Chop newline by hand, for strcmp()'s sake. */
353 if (linebuf[num_red - 1] == '\n')
354diff -ur cvs-nserver-1.11.1.52/src/subr.c cvs-nserver-1.11.1.52-getline/src/subr.c
355--- cvs-nserver-1.11.1.52/src/subr.c 2001-09-08 19:26:21.000000000 +0200
356+++ cvs-nserver-1.11.1.52-getline/src/subr.c 2009-07-04 00:33:52.377617913 +0200
357@@ -610,7 +610,7 @@
358 fp = CVS_FOPEN (finfo->file, "r");
359 if (fp == NULL)
360 error (1, errno, "cannot open %s", finfo->fullname);
361- while (getline (&line, &line_allocated, fp) > 0)
362+ while (cvs_getline (&line, &line_allocated, fp) > 0)
363 {
364 if (strncmp (line, RCS_MERGE_PAT_1, sizeof RCS_MERGE_PAT_1 - 1) == 0 ||
365 strncmp (line, RCS_MERGE_PAT_2, sizeof RCS_MERGE_PAT_2 - 1) == 0 ||
366diff -ur cvs-nserver-1.11.1.52/src/update.c cvs-nserver-1.11.1.52-getline/src/update.c
367--- cvs-nserver-1.11.1.52/src/update.c 2002-03-10 03:25:35.000000000 +0100
368+++ cvs-nserver-1.11.1.52-getline/src/update.c 2009-07-04 00:33:52.391617677 +0200
369@@ -1115,7 +1115,7 @@
370 size_t line_allocated = 0;
371
372 repository = Name_Repository ((char *) NULL, update_dir);
373- if (getline (&line, &line_allocated, fp) >= 0)
374+ if (cvs_getline (&line, &line_allocated, fp) >= 0)
375 {
376 if ((cp = strrchr (line, '\n')) != NULL)
377 *cp = '\0';
378diff -ur cvs-nserver-1.11.1.52/src/wrapper.c cvs-nserver-1.11.1.52-getline/src/wrapper.c
379--- cvs-nserver-1.11.1.52/src/wrapper.c 2009-07-04 00:34:22.244367428 +0200
380+++ cvs-nserver-1.11.1.52-getline/src/wrapper.c 2009-07-04 00:33:52.460617417 +0200
381@@ -300,7 +300,7 @@
382 error (0, errno, "cannot open %s", file);
383 return;
384 }
385- while (getline (&line, &line_allocated, fp) >= 0)
386+ while (cvs_getline (&line, &line_allocated, fp) >= 0)
387 wrap_add (line, temp);
388 if (line)
389 free (line);
This page took 0.157105 seconds and 4 git commands to generate.