diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2012-03-21 23:44:36 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2012-03-21 23:44:36 +0000 |
commit | 6c8fdab4473fb1ea0bc0189a8c11a1f581ba4b3e (patch) | |
tree | d5516719feedfb8dac881ff3b48f5064434f6590 /include | |
parent | bec4c79143a9a3b2a6b939a4e009faeb84e68413 (diff) |
Implement getdelim(3) and getline(3).
Prompted in a mail to tech@ by Jan Klemkow (j-dot-klemkow-at-wemelug-dot-de)
but this is based on NetBSD's implementation instead with some tweaks by me.
Further improvements would happen in tree.
ok millert@; discussed with many others
ports cleanup by naddy@, sthen@. Antti Harri, Gonzalo L. R. and myself.
Diffstat (limited to 'include')
-rw-r--r-- | include/stdio.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/stdio.h b/include/stdio.h index c0689455bda..a885ff1ee0b 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdio.h,v 1.41 2011/07/18 17:29:49 matthew Exp $ */ +/* $OpenBSD: stdio.h,v 1.42 2012/03/21 23:44:35 fgsch Exp $ */ /* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */ /*- @@ -237,6 +237,12 @@ size_t fwrite(const void *, size_t, size_t, FILE *) __attribute__((__bounded__ (__size__,1,3,2))); int getc(FILE *); int getchar(void); +#if __POSIX_VISIBLE >= 200809 +ssize_t getdelim(char ** __restrict, size_t * __restrict, int, + FILE * __restrict); +ssize_t getline(char ** __restrict, size_t * __restrict, + FILE * __restrict); +#endif char *gets(char *); #if __BSD_VISIBLE && !defined(__SYS_ERRLIST) #define __SYS_ERRLIST |