From d8192a4d7f0ece2a916364b079752e55754d3929 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 6 Apr 2010 11:12:10 -0700 Subject: 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). --- compat/README | 16 ++++++++++++++++ compat/have_getline.c | 13 +++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 compat/README create mode 100644 compat/have_getline.c (limited to 'compat') diff --git a/compat/README b/compat/README new file mode 100644 index 00000000..cd32c56f --- /dev/null +++ b/compat/README @@ -0,0 +1,16 @@ +notmuch/comapt + +This directory consists of two things: + +1. Small programs used by the notmuch configure script to test for the + availability of certain system features, (library functions, etc.). + + For example: have_getline.c + +2. Compatibility implementations of those system features for systems + that don't provide their own versions. + + For example: getline.c + + The compilation of these files is made conditional on the output of + the test programs from [1]. 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 +#include + +int main() +{ + ssize_t count = 0; + size_t n = 0; + char **lineptr = NULL; + FILE *stream = NULL; + + count = getline(lineptr, &n, stream); +} -- cgit v1.2.3