File cvs-fix_getline.patch of Package cvs-stable
--- lib/getline.c.orig 2009-05-01 01:24:03.000000000 +0200
+++ lib/getline.c 2009-05-01 01:25:21.000000000 +0200
@@ -45,7 +45,7 @@
should check feof(), if not then errno has been set to indicate the
error. */
-int
+ssize_t
getstr (lineptr, n, stream, terminator, offset, limit)
char **lineptr;
size_t *n;
@@ -54,9 +54,9 @@
int offset;
int limit;
{
- int nchars_avail; /* Allocated but unused chars in *LINEPTR. */
+ ssize_t nchars_avail; /* Allocated but unused chars in *LINEPTR. */
char *read_pos; /* Where we're reading into *LINEPTR. */
- int ret;
+ ssize_t ret;
if (!lineptr || !n || !stream)
{
@@ -154,7 +154,7 @@
return ret;
}
-int
+ssize_t
getline (lineptr, n, stream)
char **lineptr;
size_t *n;
@@ -163,7 +163,7 @@
return getstr (lineptr, n, stream, '\n', 0, GETLINE_NO_LIMIT);
}
-int
+ssize_t
getline_safe (lineptr, n, stream, limit)
char **lineptr;
size_t *n;
--- lib/getline.h.orig 2009-05-01 01:23:25.000000000 +0200
+++ lib/getline.h 2009-05-01 01:24:01.000000000 +0200
@@ -11,12 +11,12 @@
#define GETLINE_NO_LIMIT -1
-int
+ssize_t
getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
-int
+ssize_t
getline_safe __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
int limit));
-int
+ssize_t
getstr __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
int _terminator, int _offset, int limit));