aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test-fgetln.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-01-04 01:11:00 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-01-04 01:11:00 +0000
commit6d55934c65607a0db77403b6b364af25e7ae1a70 (patch)
treee8de91439269693965fab1cfabe18975512e7763 /test-fgetln.c
parent25d3bfdfd1b1a2da2d820f6bbb0406ef7dd2466c (diff)
downloadmandoc-6d55934c65607a0db77403b6b364af25e7ae1a70.tar.gz
mandoc-6d55934c65607a0db77403b6b364af25e7ae1a70.tar.zst
mandoc-6d55934c65607a0db77403b6b364af25e7ae1a70.zip
Clean up feature tests:
* Split the configure steering script out of the Makefile. * Let the configure step depend on the test sources. * Clean up the test programs such that they can be run.
Diffstat (limited to 'test-fgetln.c')
-rw-r--r--test-fgetln.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test-fgetln.c b/test-fgetln.c
index 90869cd8..ac225a17 100644
--- a/test-fgetln.c
+++ b/test-fgetln.c
@@ -1,11 +1,11 @@
+#include <sys/types.h>
#include <stdio.h>
-#include <stdlib.h>
+#include <unistd.h>
int
main(void)
{
- char *cp;
size_t sz;
- cp = fgetln(stdin, &sz);
- return 0;
+ fclose(stdin);
+ return(NULL != fgetln(stdin, &sz));
}