From: Guillem Jover Date: Tue, 23 Aug 2022 23:58:58 +0000 (+0200) Subject: fgetwln: Add comment about lack of getwline(3) for recommendation X-Git-Tag: 0.11.7~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be327c6ebe408ae144e9c93aab9cb65fce116f33;p=thirdparty%2Flibbsd.git fgetwln: Add comment about lack of getwline(3) for recommendation Ideally we'd recommend getwline(3), but unfortunately even though it was part of the ISO/IEC TR 24731-2:2010 draft, it did not make it into C11 and is not widely implemented. --- diff --git a/src/fgetwln.c b/src/fgetwln.c index f2ea094..0b8e7d9 100644 --- a/src/fgetwln.c +++ b/src/fgetwln.c @@ -87,6 +87,9 @@ fgetwln(FILE *stream, size_t *lenp) *lenp = wused; return wused ? fb->wbuf : NULL; } +/* XXX: Ideally we'd recommend getwline(3), but unfortunately even though it + * was part of the ISO/IEC TR 24731-2:2010 draft, it did not make it into C11 + * and is not widely implemented. */ libbsd_link_warning(fgetwln, "The fgetwln() function cannot be safely ported, use fgetwc(3) " "instead, as it is supported by C99 and POSIX.1-2001.");