[BACK]Return to test-fgetln.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

File: [cvsweb.bsd.lv] / mandoc / Attic / test-fgetln.c (download)

Revision 1.1, Tue Dec 13 11:26:12 2011 UTC (9 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_12_3, VERSION_1_12_2, VERSION_1_12_1

Compatibility support fgetln() on Linux.  This uses the BSD-licensed
implementation from NetBSD tnftpd, Christos Zoulas (copyright message
retained in the compat_fgetln.c file).  Patch verified by schwarze@.  He
notes that you'll need -pthread for -static binaries (due to libdb), so
I've noted that -static should really only be used for BSD UNIX.

While here, add some forgotten goop to the Makefile, building and
cleaning extra manpages.

#include <stdio.h>
#include <stdlib.h>

int
main(void)
{
	char *cp;
	size_t sz;
	cp = fgetln(stdin, &sz);
	return 0;
}