This removes some redudant includes, and will also make it easier to
introduce "#define _GNU_SOURCE", which must come before all system
includes.
test_expect_success "NOTMUCH_NEW"
cat <<EOF > c_head
test_expect_success "NOTMUCH_NEW"
cat <<EOF > c_head
-#include <stdio.h>
-#include <notmuch.h>
#include <notmuch-test.h>
#include <notmuch-test.h>
int main (int argc, char** argv)
{
notmuch_database_t *db;
int main (int argc, char** argv)
{
notmuch_database_t *db;
test_expect_success "NOTMUCH_NEW"
cat <<EOF > c_head
test_expect_success "NOTMUCH_NEW"
cat <<EOF > c_head
-#include <stdio.h>
-#include <notmuch.h>
#include <notmuch-test.h>
#include <notmuch-test.h>
int main (int argc, char** argv)
{
notmuch_database_t *db;
int main (int argc, char** argv)
{
notmuch_database_t *db;
test_expect_success "NOTMUCH_NEW"
cat <<EOF > c_head
test_expect_success "NOTMUCH_NEW"
cat <<EOF > c_head
-#include <stdio.h>
-#include <notmuch.h>
#include <notmuch-test.h>
#include <notmuch-test.h>
int main (int argc, char** argv)
{
notmuch_database_t *db;
int main (int argc, char** argv)
{
notmuch_database_t *db;
-#include <stdio.h>
-#include <notmuch.h>
#include <notmuch-test.h>
#include <notmuch-test.h>
int main (int argc, char** argv)
{
notmuch_database_t *db;
int main (int argc, char** argv)
{
notmuch_database_t *db;
-#include <stdio.h>
-#include <notmuch.h>
#include <notmuch-test.h>
#include <notmuch-test.h>
int main (int argc, char** argv)
{
notmuch_database_t *db;
int main (int argc, char** argv)
{
notmuch_database_t *db;
-#include <string.h>
-#include <stdlib.h>
#include <notmuch-test.h>
int main (int argc, char** argv)
#include <notmuch-test.h>
int main (int argc, char** argv)
test_expect_equal_file EXPECTED OUTPUT
cat <<EOF > c_head2
test_expect_equal_file EXPECTED OUTPUT
cat <<EOF > c_head2
-#include <string.h>
-#include <stdlib.h>
#include <notmuch-test.h>
int main (int argc, char** argv)
#include <notmuch-test.h>
int main (int argc, char** argv)
add_email_corpus
cat <<EOF > c_head
add_email_corpus
cat <<EOF > c_head
-#include <string.h>
-#include <stdlib.h>
#include <notmuch-test.h>
int main (int argc, char** argv)
#include <notmuch-test.h>
int main (int argc, char** argv)
add_email_corpus
cat <<EOF > c_head
add_email_corpus
cat <<EOF > c_head
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <talloc.h>
#include <notmuch-test.h>
void print_properties (notmuch_message_t *message, const char *prefix, notmuch_bool_t exact) {
#include <notmuch-test.h>
void print_properties (notmuch_message_t *message, const char *prefix, notmuch_bool_t exact) {
test_subtest_known_broken
fi
test_C ${MAIL_DIR} <<'EOF'
test_subtest_known_broken
fi
test_C ${MAIL_DIR} <<'EOF'
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/wait.h>
#include <notmuch-test.h>
void
#include <notmuch-test.h>
void
first_id=$(notmuch search --output=messages '*'| head -1 | sed s/^id://)
test_C ${MAIL_DIR} <<EOF
first_id=$(notmuch search --output=messages '*'| head -1 | sed s/^id://)
test_C ${MAIL_DIR} <<EOF
-#include <unistd.h>
-#include <stdlib.h>
#include <notmuch-test.h>
#include <notmuch-test.h>
-#include <talloc.h>
-#include <assert.h>
int
main (int argc, char **argv)
{
int
main (int argc, char **argv)
{
#ifndef _NOTMUCH_TEST_H
#define _NOTMUCH_TEST_H
#ifndef _NOTMUCH_TEST_H
#define _NOTMUCH_TEST_H
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <talloc.h>
+#include <unistd.h>
+
#include <notmuch.h>
inline static void
#include <notmuch.h>
inline static void