__BEGIN_DECLS
const char *fmtcheck(const char *, const char *);
-char *fgetln(FILE *fp, size_t *lenp);
+/* XXX: The function requires cooperation from the system libc to store the
+ * line buffer in the FILE struct itself. */
+char *fgetln(FILE *fp, size_t *lenp)
+ __attribute__((deprecated("This functions cannot be safely ported, "
+ "use getline(3) instead, as it is supported "
+ "by GNU and POSIX.1-2008.")));
/*
* Note: We diverge from the FreeBSD, OpenBSD and DragonFlyBSD declarations,
#include <sys/types.h>
#include <string.h>
+#include "local-link.h"
+
#ifdef HAVE_GETLINE
struct filebuf {
FILE *fp;
return fb->buf;
}
}
+libbsd_link_warning(fgetln,
+ "This functions cannot be safely ported, use getline(3) "
+ "instead, as it is supported by GNU and POSIX.1-2008.")
#else
#error "Function fgetln() needs to be ported."
#endif
endif
fgetln_SOURCES = test-stream.c test-stream.h fgetln.c
+fgetln_CFLAGS = -Wno-deprecated-declarations
fparseln_SOURCES = test-stream.c test-stream.h fparseln.c
proctitle_init_SOURCES = proctitle.c