1 diff -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
8 -getline (lineptr, n, stream)
9 +cvs_getline (lineptr, n, stream)
17 -getline_safe (lineptr, n, stream, limit)
18 +cvs_getline_safe (lineptr, n, stream, limit)
22 diff -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
26 #define GETLINE_NO_LIMIT -1
29 - getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
30 + cvs_getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
32 - getline_safe __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
33 + cvs_getline_safe __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
36 getstr __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
37 diff -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
43 fp = open_file (CVSADM_NOTIFY, "r");
44 - if (getline (&line, &line_len, fp) < 0)
45 + if (cvs_getline (&line, &line_len, fp) < 0)
48 error (0, 0, "cannot read %s: end of file", CVSADM_NOTIFY);
53 - if (getline (&line, &line_len, fp) < 0)
54 + if (cvs_getline (&line, &line_len, fp) < 0)
58 diff -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
64 line_chars_allocated = 0;
65 - line_length = getline (&line, &line_chars_allocated, fp);
66 + line_length = cvs_getline (&line, &line_chars_allocated, fp);
69 /* Remove any trailing newline. */
70 diff -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
75 /* first check user and/or password */
77 - while (getline (&passwd_line, &passwd_line_allocated, CVSPASSWD) != -1)
78 + while (cvs_getline (&passwd_line, &passwd_line_allocated, CVSPASSWD) != -1)
80 assert(strlen(passwd_line) > 0);
81 passwd_line[strlen(passwd_line) - 1] = '\0';
82 diff -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
86 char *passwd_line = NULL;
87 size_t passwd_line_allocated = 0;
89 - while (getline(&passwd_line, &passwd_line_allocated, cvspasswd) != -1)
90 + while (cvs_getline(&passwd_line, &passwd_line_allocated, cvspasswd) != -1)
92 char *field_user, *field_password;
94 diff -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
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))
105 /* skip over comment lines */
106 diff -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
113 - while (getline (&line, &line_len, fp) > 0)
114 + while (cvs_getline (&line, &line_len, fp) > 0)
116 notif_type = line[0];
117 if (notif_type == '\0')
119 error (0, errno, "cannot read %s", usersname);
122 - while (getline (&line, &line_len, fp) >= 0)
123 + while (cvs_getline (&line, &line_len, fp) >= 0)
125 if (strncmp (line, p, len) == 0
128 error (0, errno, "cannot open %s", CVSADM_NOTIFY);
131 - while (getline (&line, &line_len, fp) > 0)
132 + while (cvs_getline (&line, &line_len, fp) > 0)
136 diff -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
140 line_chars_allocated = 0;
143 - while ((line_length = getline (&line, &line_chars_allocated, fpin)) > 0)
144 + while ((line_length = cvs_getline (&line, &line_chars_allocated, fpin)) > 0)
150 line_chars_allocated = 0;
152 - if ((line_length = getline (&line, &line_chars_allocated, fp)) > 0)
153 + if ((line_length = cvs_getline (&line, &line_chars_allocated, fp)) > 0)
155 /* Remove any trailing newline. */
156 if (line[line_length - 1] == '\n')
157 @@ -1070,7 +1070,7 @@
161 - while (getline (&line, &line_allocated, fp) >= 0)
162 + while (cvs_getline (&line, &line_allocated, fp) >= 0)
166 diff -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
170 attrlist = getlist ();
173 - nread = getline (&line, &line_len, fp);
174 + nread = cvs_getline (&line, &line_len, fp);
177 /* Remove trailing newline. */
178 diff -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
182 error (0, errno, "cannot open %s", file);
185 - while (getline (&line, &line_allocated, fp) >= 0)
186 + while (cvs_getline (&line, &line_allocated, fp) >= 0)
187 ign_add (line, hold);
189 error (0, errno, "cannot read %s", file);
190 diff -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
195 /* Check each line to see if we have this entry already. */
197 - while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)
198 + while ((line_length = cvs_getline (&linebuf, &linebuf_len, fp)) >= 0)
201 password = password_entry_parseline(cvsroot_canonical, 1, line, linebuf);
203 error (1, errno, "unable to open temp file %s", tmp_name);
206 - while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)
207 + while ((line_length = cvs_getline (&linebuf, &linebuf_len, fp)) >= 0)
211 diff -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
218 - line_length = getline (&line, &line_chars_allocated, fp);
219 + line_length = cvs_getline (&line, &line_chars_allocated, fp);
220 if (line_length == -1)
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);
231 error (0, errno, "cannot read from stdin");
234 size_t line_chars_allocated = 0;
236 - while (getline (&line, &line_chars_allocated, tfp) >= 0)
237 + while (cvs_getline (&line, &line_chars_allocated, tfp) >= 0)
238 (void) fputs (line, fp);
240 error (0, errno, "warning: cannot read %s", template);
241 diff -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
246 * comment lines begin with '#'
248 - while (getline (&line, &line_allocated, fp) >= 0)
249 + while (cvs_getline (&line, &line_allocated, fp) >= 0)
251 /* skip lines starting with # */
253 diff -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
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)
269 - while (getline (&line, &line_allocated, fp_info) >= 0)
270 + while (cvs_getline (&line, &line_allocated, fp_info) >= 0)
274 diff -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
278 cvs_output ("\n", 1);
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)
290 /* spew the rest of the diff out */
292 - = getline (&line1, &line1_chars_allocated, fp))
293 + = cvs_getline (&line1, &line1_chars_allocated, fp))
295 cvs_output (line1, 0);
296 if (line_length < 0 && !feof (fp))
297 diff -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
304 - while ((line_length = getline (&line, &line_allocated, fp)) >= 0)
305 + while ((line_length = cvs_getline (&line, &line_allocated, fp)) >= 0)
307 if (strchr ("MARCZ", *line))
309 diff -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
313 error (1, save_errno, "cannot open %s", tmp);
316 - if (getline (&repos, &repos_allocated, fpin) < 0)
317 + if (cvs_getline (&repos, &repos_allocated, fpin) < 0)
319 /* FIXME: should be checking for end of file separately. */
320 error (0, 0, "in directory %s:", xupdate_dir);
321 diff -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
326 fpin = open_file (tmp, "r");
328 - if (getline (&root, &root_allocated, fpin) < 0)
329 + if (cvs_getline (&root, &root_allocated, fpin) < 0)
331 /* FIXME: should be checking for end of file separately; errno
332 is not set in that case. */
333 diff -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 @@
338 else /* successfully opened readers file */
340 - while ((num_red = getline (&linebuf, &linebuf_len, fp)) >= 0)
341 + while ((num_red = cvs_getline (&linebuf, &linebuf_len, fp)) >= 0)
343 /* Hmmm, is it worth importing my own readline
344 library into CVS? It takes care of chopping
345 @@ -2643,7 +2643,7 @@
349 - while ((num_red = getline (&linebuf, &linebuf_len, fp)) >= 0)
350 + while ((num_red = cvs_getline (&linebuf, &linebuf_len, fp)) >= 0)
352 /* Chop newline by hand, for strcmp()'s sake. */
353 if (linebuf[num_red - 1] == '\n')
354 diff -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
358 fp = CVS_FOPEN (finfo->file, "r");
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)
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 ||
366 diff -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;
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)
376 if ((cp = strrchr (line, '\n')) != NULL)
378 diff -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
382 error (0, errno, "cannot open %s", file);
385 - while (getline (&line, &line_allocated, fp) >= 0)
386 + while (cvs_getline (&line, &line_allocated, fp) >= 0)
387 wrap_add (line, temp);