# include <stddef.h>
# include <stdio.h>
+/* Get ssize_t. */
+# include <sys/types.h>
+
/* glibc2 has these functions declared in <stdio.h>. Avoid redeclarations. */
# if __GLIBC__ < 2
-int getline (char **_lineptr, size_t *_n, FILE *_stream);
+extern ssize_t getline (char **_lineptr, size_t *_linesize, FILE *_stream);
-int getdelim (char **_lineptr, size_t *_n, int _delimiter, FILE *_stream);
+extern ssize_t getdelim (char **_lineptr, size_t *_linesize, int _delimiter,
+ FILE *_stream);
# endif