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.");