]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
fgetwln: Add comment about lack of getwline(3) for recommendation
authorGuillem Jover <guillem@hadrons.org>
Tue, 23 Aug 2022 23:58:58 +0000 (01:58 +0200)
committerGuillem Jover <guillem@hadrons.org>
Tue, 4 Oct 2022 02:29:07 +0000 (04:29 +0200)
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.

src/fgetwln.c

index f2ea09405a87d60224008142db57d55b8a3cbbd5..0b8e7d9d5c9f31fa678448e0deff17ff51478a3d 100644 (file)
@@ -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.");