aboutsummaryrefslogtreecommitdiffhomepage
path: root/compat/have_getline.c
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-04-06 11:12:10 -0700
committerGravatar Carl Worth <cworth@cworth.org>2010-04-06 14:36:31 -0700
commitd8192a4d7f0ece2a916364b079752e55754d3929 (patch)
treeb87513615fa4e61a9a16caf1a5ff8f9f651052c9 /compat/have_getline.c
parentb5d8fe278425f7be49b6819e8187efffdffbd836 (diff)
Move "config" test programs to "compat".
It makes sense to me to have the little tests for functionality right next to the comptability implementations of that same functionality. But also, this means I can now tab-complete ./configure from the three initial characters (rather than the seven required previously).
Diffstat (limited to 'compat/have_getline.c')
-rw-r--r--compat/have_getline.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/compat/have_getline.c b/compat/have_getline.c
new file mode 100644
index 00000000..a8bcd17e
--- /dev/null
+++ b/compat/have_getline.c
@@ -0,0 +1,13 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <sys/types.h>
+
+int main()
+{
+ ssize_t count = 0;
+ size_t n = 0;
+ char **lineptr = NULL;
+ FILE *stream = NULL;
+
+ count = getline(lineptr, &n, stream);
+}