summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2007-05-28 16:49:41 +0000
committerEric Blake <ebb9@byu.net>2007-05-28 16:49:41 +0000
commitc0fea97ccf33a4e6b6f9116216b1634663f29474 (patch)
treef1690f3fc38b83b24c77c2b51cc4688fd743f22c
parent45c12937685ff16691ad6adb843444a2ef4265d7 (diff)
downloadgnulib-c0fea97ccf33a4e6b6f9116216b1634663f29474.tar.gz
Unconditionally include <config.h> in unit tests.
* tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H. * tests/test-allocsa.c, tests/test-arcfour.c, tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c, tests/test-array_list.c, tests/test-array_oset.c, tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c, test-avltreehash_list.c, test-base64.c, test-binary-io.c, test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c, test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c, test-carray_list.c, test-crc.c, test-des.c, test-dirname.c, test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c, test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c, test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c, test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c, test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c, test-iconv.c, test-linked_list.c, test-linkedhash_list.c, test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c, test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c, test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c, test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c, test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c, test-md5.c, test-memmem.c, test-printf-posix.c, test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c, test-read-file.c, test-rijndael.c, test-snprintf-posix.c, test-snprintf.c, test-sprintf-posix.c, test-stdint.c, test-strcasestr.c, test-striconv.c, test-striconveh.c, test-striconveha.c, test-tls.c, test-vasnprintf-posix.c, test-vasnprintf-posix2.c, test-vasnprintf.c, test-vasprintf-posix.c, test-vasprintf.c, test-verify.c, test-vfprintf-posix.c, test-vprintf-posix.c, test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c, test-xvasprintf.c: Likewise.
-rw-r--r--ChangeLog33
-rw-r--r--tests/test-alloca-opt.c4
-rw-r--r--tests/test-allocsa.c4
-rw-r--r--tests/test-arcfour.c4
-rw-r--r--tests/test-arctwo.c4
-rw-r--r--tests/test-argmatch.c5
-rw-r--r--tests/test-argp.c44
-rw-r--r--tests/test-array_list.c4
-rw-r--r--tests/test-array_oset.c4
-rw-r--r--tests/test-atexit.c4
-rw-r--r--tests/test-avltree_list.c4
-rw-r--r--tests/test-avltree_oset.c4
-rw-r--r--tests/test-avltreehash_list.c4
-rwxr-xr-xtests/test-base64.c4
-rw-r--r--tests/test-binary-io.c4
-rw-r--r--tests/test-c-ctype.c4
-rw-r--r--tests/test-c-strcasecmp.c4
-rw-r--r--tests/test-c-strcasestr.c4
-rw-r--r--tests/test-c-strncasecmp.c4
-rw-r--r--tests/test-c-strstr.c4
-rw-r--r--tests/test-canonicalize-lgpl.c4
-rw-r--r--tests/test-carray_list.c4
-rw-r--r--tests/test-crc.c4
-rw-r--r--tests/test-des.c4
-rw-r--r--tests/test-dirname.c4
-rwxr-xr-xtests/test-fflush.c4
-rw-r--r--tests/test-fprintf-posix.c4
-rw-r--r--tests/test-gc-arcfour.c4
-rw-r--r--tests/test-gc-arctwo.c4
-rw-r--r--tests/test-gc-des.c4
-rw-r--r--tests/test-gc-hmac-md5.c4
-rw-r--r--tests/test-gc-hmac-sha1.c4
-rw-r--r--tests/test-gc-md2.c4
-rw-r--r--tests/test-gc-md4.c4
-rw-r--r--tests/test-gc-md5.c4
-rw-r--r--tests/test-gc-pbkdf2-sha1.c4
-rw-r--r--tests/test-gc-rijndael.c4
-rw-r--r--tests/test-gc-sha1.c4
-rw-r--r--tests/test-gc.c4
-rw-r--r--tests/test-getpass.c4
-rw-r--r--tests/test-hmac-md5.c4
-rw-r--r--tests/test-hmac-sha1.c4
-rw-r--r--tests/test-iconv.c4
-rw-r--r--tests/test-linked_list.c4
-rw-r--r--tests/test-linkedhash_list.c4
-rw-r--r--tests/test-lock.c4
-rw-r--r--tests/test-mbscasecmp.c4
-rw-r--r--tests/test-mbscasestr1.c4
-rw-r--r--tests/test-mbscasestr2.c4
-rw-r--r--tests/test-mbscasestr3.c4
-rw-r--r--tests/test-mbscasestr4.c4
-rw-r--r--tests/test-mbschr.c4
-rw-r--r--tests/test-mbscspn.c4
-rw-r--r--tests/test-mbsncasecmp.c4
-rw-r--r--tests/test-mbspbrk.c4
-rw-r--r--tests/test-mbspcasecmp.c4
-rw-r--r--tests/test-mbsrchr.c4
-rw-r--r--tests/test-mbsspn.c4
-rw-r--r--tests/test-mbsstr1.c4
-rw-r--r--tests/test-mbsstr2.c4
-rw-r--r--tests/test-mbsstr3.c4
-rw-r--r--tests/test-md2.c4
-rw-r--r--tests/test-md4.c4
-rw-r--r--tests/test-md5.c4
-rw-r--r--tests/test-memmem.c4
-rw-r--r--tests/test-printf-posix.c4
-rw-r--r--tests/test-rbtree_list.c4
-rw-r--r--tests/test-rbtree_oset.c4
-rw-r--r--tests/test-rbtreehash_list.c4
-rw-r--r--tests/test-read-file.c4
-rw-r--r--tests/test-rijndael.c4
-rw-r--r--tests/test-snprintf-posix.c4
-rw-r--r--tests/test-snprintf.c4
-rw-r--r--tests/test-sprintf-posix.c4
-rw-r--r--tests/test-stdint.c4
-rw-r--r--tests/test-strcasestr.c4
-rw-r--r--tests/test-striconv.c4
-rw-r--r--tests/test-striconveh.c4
-rw-r--r--tests/test-striconveha.c4
-rw-r--r--tests/test-tls.c4
-rw-r--r--tests/test-vasnprintf-posix.c4
-rw-r--r--tests/test-vasnprintf-posix2.c4
-rw-r--r--tests/test-vasnprintf.c4
-rw-r--r--tests/test-vasprintf-posix.c4
-rw-r--r--tests/test-vasprintf.c4
-rw-r--r--tests/test-verify.c4
-rw-r--r--tests/test-vfprintf-posix.c4
-rw-r--r--tests/test-vprintf-posix.c4
-rw-r--r--tests/test-vsnprintf-posix.c4
-rw-r--r--tests/test-vsnprintf.c4
-rw-r--r--tests/test-vsprintf-posix.c4
-rw-r--r--tests/test-xvasprintf.c4
92 files changed, 144 insertions, 294 deletions
diff --git a/ChangeLog b/ChangeLog
index 0fd5a0b7bf..4f95bfc6a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,39 @@
2007-05-28 Eric Blake <ebb9@byu.net>
+ Unconditionally include <config.h> in unit tests.
+ * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
+ * tests/test-allocsa.c, tests/test-arcfour.c,
+ tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
+ tests/test-array_list.c, tests/test-array_oset.c,
+ tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
+ test-avltreehash_list.c, test-base64.c, test-binary-io.c,
+ test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
+ test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
+ test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
+ test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
+ test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
+ test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
+ test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
+ test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
+ test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
+ test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
+ test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
+ test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
+ test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
+ test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
+ test-md5.c, test-memmem.c, test-printf-posix.c,
+ test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
+ test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
+ test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
+ test-strcasestr.c, test-striconv.c, test-striconveh.c,
+ test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
+ test-vasnprintf-posix2.c, test-vasnprintf.c,
+ test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
+ test-vfprintf-posix.c, test-vprintf-posix.c,
+ test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
+ test-xvasprintf.c: Likewise.
+
* lib/allocsa.h (safe_alloca): Avoid compiler warning.
2007-05-28 Bruno Haible <bruno@clisp.org>
diff --git a/tests/test-alloca-opt.c b/tests/test-alloca-opt.c
index 65bc19f026..8b4abeeead 100644
--- a/tests/test-alloca-opt.c
+++ b/tests/test-alloca-opt.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <alloca.h>
diff --git a/tests/test-allocsa.c b/tests/test-allocsa.c
index 9d4144881a..0f53739723 100644
--- a/tests/test-allocsa.c
+++ b/tests/test-allocsa.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "allocsa.h"
diff --git a/tests/test-arcfour.c b/tests/test-arcfour.c
index 9540d01419..35ac6c8985 100644
--- a/tests/test-arcfour.c
+++ b/tests/test-arcfour.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-arctwo.c b/tests/test-arctwo.c
index 85df6d1bf0..8d5a8c9fdb 100644
--- a/tests/test-arctwo.c
+++ b/tests/test-arctwo.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-argmatch.c b/tests/test-argmatch.c
index e61b88fcce..2babc524e9 100644
--- a/tests/test-argmatch.c
+++ b/tests/test-argmatch.c
@@ -18,9 +18,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007, based on test code
by David MacKenzie <djm@gnu.ai.mit.edu>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "argmatch.h"
@@ -104,4 +102,3 @@ main (int argc, char *argv[])
return 0;
}
-
diff --git a/tests/test-argp.c b/tests/test-argp.c
index 98f507d0d9..d1f005499d 100644
--- a/tests/test-argp.c
+++ b/tests/test-argp.c
@@ -16,9 +16,7 @@
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "argp.h"
@@ -45,12 +43,12 @@ struct test_args
int group_1_1_option;
};
-static struct argp_option group1_option[] =
+static struct argp_option group1_option[] =
{
{ NULL, 0, NULL, 0, "Option Group 1", 0},
{ "verbose", 'v', NULL, 0, "Simple option without arguments", 1 },
{ "file", 'f', "FILE", 0, "Option with a mandatory argument", 1 },
- { "input", 0, NULL, OPTION_ALIAS, NULL, 1 },
+ { "input", 0, NULL, OPTION_ALIAS, NULL, 1 },
{ "hidden", 'H', "FILE", OPTION_HIDDEN, "Hidden option", 1 },
{ NULL, 0, NULL, 0, NULL, 0 }
};
@@ -65,15 +63,15 @@ group1_parser (int key, char *arg, struct argp_state *state)
case 'v':
args->verbose++;
break;
-
+
case 'f':
args->file = arg;
break;
-
+
case 'H':
args->hidden = arg;
break;
-
+
default:
return ARGP_ERR_UNKNOWN;
}
@@ -93,7 +91,7 @@ struct argp_child group1_child = {
};
-static struct argp_option group1_1_option[] =
+static struct argp_option group1_1_option[] =
{
{ NULL, 0, NULL, 0, "Option Group 1.1", 0},
{ "cantiga", 'C', NULL, 0, "create a cantiga" },
@@ -130,7 +128,7 @@ struct argp_child group1_1_child = {
};
-static struct argp_option group2_option[] =
+static struct argp_option group2_option[] =
{
{ NULL, 0, NULL, 0, "Option Group 2", 0},
{ "option", 'O', NULL, 0, "An option", 1 },
@@ -152,12 +150,12 @@ group2_parser (int key, char *arg, struct argp_state *state)
case 'O':
args->opt = 1;
break;
-
+
case 'o':
args->optional_set = 1;
args->optional = arg;
break;
-
+
default:
return ARGP_ERR_UNKNOWN;
}
@@ -177,7 +175,7 @@ struct argp_child group2_child = {
};
-static struct argp_option group2_1_option[] =
+static struct argp_option group2_1_option[] =
{
{ NULL, 0, NULL, 0, "Option Group 2.1", 0},
{ "poem", 'p', NULL, 0, "create a poem" },
@@ -212,12 +210,12 @@ struct argp_child group2_1_child = {
"",
2
};
-
+
static struct argp_option main_options[] =
{
{ NULL, 0, NULL, 0, "Main options", 0},
- { "test", 't', NULL, 0, NULL, 1 },
+ { "test", 't', NULL, 0, NULL, 1 },
{ NULL, 0, NULL, 0, NULL, 0 }
};
@@ -226,7 +224,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
{
struct test_args *args = state->input;
int i;
-
+
switch (key)
{
case ARGP_KEY_INIT:
@@ -237,7 +235,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
case 't':
args->test = 1;
break;
-
+
default:
return ARGP_ERR_UNKNOWN;
}
@@ -403,7 +401,7 @@ test10(struct argp *argp)
INIT_TEST2 (10, "--optional", "ARG");
test_optional(argp, argc, argv, &test_args, NULL, "ARG");
}
-
+
void
test11(struct argp *argp)
{
@@ -416,7 +414,7 @@ test12(struct argp *argp)
{
INIT_TEST3 (12, "--option", "--optional=OPT", "FILE");
test_optional(argp, argc, argv, &test_args, "OPT", "FILE");
-}
+}
void
test13(struct argp *argp)
@@ -465,7 +463,7 @@ main (int argc, char **argv)
group2_children[0] = group2_1_child;
group2_children[1].argp = NULL;
group2_argp.children = group2_children;
-
+
argp_children[0] = group1_child;
argp_children[1] = group2_child;
argp_children[2].argp = NULL;
@@ -473,11 +471,11 @@ main (int argc, char **argv)
if (argc > 0)
{
- struct test_args test_args;
- init_args(test_args);
+ struct test_args test_args;
+ init_args(test_args);
return argp_parse (&test_argp, argc, argv, 0, NULL, &test_args);
}
-
+
for (fun = test_fun; *fun; fun++)
(*fun) (&test_argp);
diff --git a/tests/test-array_list.c b/tests/test-array_list.c
index 1d831f9a35..7dc66b5590 100644
--- a/tests/test-array_list.c
+++ b/tests/test-array_list.c
@@ -16,9 +16,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "gl_array_list.h"
diff --git a/tests/test-array_oset.c b/tests/test-array_oset.c
index a7d1f001da..9769cb178f 100644
--- a/tests/test-array_oset.c
+++ b/tests/test-array_oset.c
@@ -16,9 +16,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "gl_array_oset.h"
diff --git a/tests/test-atexit.c b/tests/test-atexit.c
index 2bf4822549..81e19cefba 100644
--- a/tests/test-atexit.c
+++ b/tests/test-atexit.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/tests/test-avltree_list.c b/tests/test-avltree_list.c
index 8105c8ee4b..9cf71c369e 100644
--- a/tests/test-avltree_list.c
+++ b/tests/test-avltree_list.c
@@ -16,9 +16,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "gl_avltree_list.h"
diff --git a/tests/test-avltree_oset.c b/tests/test-avltree_oset.c
index e901774504..bdcaadc933 100644
--- a/tests/test-avltree_oset.c
+++ b/tests/test-avltree_oset.c
@@ -16,9 +16,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "gl_avltree_oset.h"
diff --git a/tests/test-avltreehash_list.c b/tests/test-avltreehash_list.c
index 65ab49a999..28697fec5f 100644
--- a/tests/test-avltreehash_list.c
+++ b/tests/test-avltreehash_list.c
@@ -16,9 +16,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "gl_avltreehash_list.h"
diff --git a/tests/test-base64.c b/tests/test-base64.c
index cb6ba9ff02..ea45e062bc 100755
--- a/tests/test-base64.c
+++ b/tests/test-base64.c
@@ -16,9 +16,7 @@
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stddef.h>
#include <stdio.h>
diff --git a/tests/test-binary-io.c b/tests/test-binary-io.c
index 677db703ea..98fe3e192a 100644
--- a/tests/test-binary-io.c
+++ b/tests/test-binary-io.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "binary-io.h"
diff --git a/tests/test-c-ctype.c b/tests/test-c-ctype.c
index e691ba2e69..24ee4341f9 100644
--- a/tests/test-c-ctype.c
+++ b/tests/test-c-ctype.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "c-ctype.h"
diff --git a/tests/test-c-strcasecmp.c b/tests/test-c-strcasecmp.c
index 2fa0f5981d..fa18efaa67 100644
--- a/tests/test-c-strcasecmp.c
+++ b/tests/test-c-strcasecmp.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "c-strcase.h"
diff --git a/tests/test-c-strcasestr.c b/tests/test-c-strcasestr.c
index 427653b54a..939cf1b71c 100644
--- a/tests/test-c-strcasestr.c
+++ b/tests/test-c-strcasestr.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "c-strcasestr.h"
diff --git a/tests/test-c-strncasecmp.c b/tests/test-c-strncasecmp.c
index 76a003e815..de6848364d 100644
--- a/tests/test-c-strncasecmp.c
+++ b/tests/test-c-strncasecmp.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "c-strcase.h"
diff --git a/tests/test-c-strstr.c b/tests/test-c-strstr.c
index 204e0a5fed..f8d965cec5 100644
--- a/tests/test-c-strstr.c
+++ b/tests/test-c-strstr.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "c-strstr.h"
diff --git a/tests/test-canonicalize-lgpl.c b/tests/test-canonicalize-lgpl.c
index 738482b2bc..714220175d 100644
--- a/tests/test-canonicalize-lgpl.c
+++ b/tests/test-canonicalize-lgpl.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "canonicalize.h"
diff --git a/tests/test-carray_list.c b/tests/test-carray_list.c
index 3234baf3f6..e36587044e 100644
--- a/tests/test-carray_list.c
+++ b/tests/test-carray_list.c
@@ -16,9 +16,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "gl_carray_list.h"
diff --git a/tests/test-crc.c b/tests/test-crc.c
index 72bb25db10..3c62e289b1 100644
--- a/tests/test-crc.c
+++ b/tests/test-crc.c
@@ -18,9 +18,7 @@
/* Written by Simon Josefsson. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "crc.h"
diff --git a/tests/test-des.c b/tests/test-des.c
index d93a41bcbd..af1cb653df 100644
--- a/tests/test-des.c
+++ b/tests/test-des.c
@@ -19,9 +19,7 @@
/* Adapted for gnulib by Simon Josefsson, based on Libgcrypt. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-dirname.c b/tests/test-dirname.c
index 4114b77024..eac91622f4 100644
--- a/tests/test-dirname.c
+++ b/tests/test-dirname.c
@@ -15,9 +15,7 @@
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "dirname.h"
diff --git a/tests/test-fflush.c b/tests/test-fflush.c
index e4468c2eae..ef43ad7dfe 100755
--- a/tests/test-fflush.c
+++ b/tests/test-fflush.c
@@ -17,9 +17,7 @@
/* Written by Eric Blake, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <unistd.h>
diff --git a/tests/test-fprintf-posix.c b/tests/test-fprintf-posix.c
index eaf093104d..b5315b734b 100644
--- a/tests/test-fprintf-posix.c
+++ b/tests/test-fprintf-posix.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
diff --git a/tests/test-gc-arcfour.c b/tests/test-gc-arcfour.c
index 9a92da40dc..7ddeb58491 100644
--- a/tests/test-gc-arcfour.c
+++ b/tests/test-gc-arcfour.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-gc-arctwo.c b/tests/test-gc-arctwo.c
index 4df5c4dcd5..5680a3cf6e 100644
--- a/tests/test-gc-arctwo.c
+++ b/tests/test-gc-arctwo.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-gc-des.c b/tests/test-gc-des.c
index 2c1ae559f0..0945512dcb 100644
--- a/tests/test-gc-des.c
+++ b/tests/test-gc-des.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-gc-hmac-md5.c b/tests/test-gc-hmac-md5.c
index b8cc3bfaa4..b594d91726 100644
--- a/tests/test-gc-hmac-md5.c
+++ b/tests/test-gc-hmac-md5.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-gc-hmac-sha1.c b/tests/test-gc-hmac-sha1.c
index 788076dbfb..d39f3c5412 100644
--- a/tests/test-gc-hmac-sha1.c
+++ b/tests/test-gc-hmac-sha1.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-gc-md2.c b/tests/test-gc-md2.c
index b52879da00..17c3410a76 100644
--- a/tests/test-gc-md2.c
+++ b/tests/test-gc-md2.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-gc-md4.c b/tests/test-gc-md4.c
index e3815c33ca..206d3d218f 100644
--- a/tests/test-gc-md4.c
+++ b/tests/test-gc-md4.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-gc-md5.c b/tests/test-gc-md5.c
index 01f918b8e3..b5985e6b53 100644
--- a/tests/test-gc-md5.c
+++ b/tests/test-gc-md5.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-gc-pbkdf2-sha1.c b/tests/test-gc-pbkdf2-sha1.c
index d4f9dc86a7..933af951e8 100644
--- a/tests/test-gc-pbkdf2-sha1.c
+++ b/tests/test-gc-pbkdf2-sha1.c
@@ -18,9 +18,7 @@
/* Written by Simon Josefsson. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "gc.h"
diff --git a/tests/test-gc-rijndael.c b/tests/test-gc-rijndael.c
index eb8448d84b..ab7aebdd36 100644
--- a/tests/test-gc-rijndael.c
+++ b/tests/test-gc-rijndael.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-gc-sha1.c b/tests/test-gc-sha1.c
index 6e2923be87..63c111c272 100644
--- a/tests/test-gc-sha1.c
+++ b/tests/test-gc-sha1.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-gc.c b/tests/test-gc.c
index a9e1cb2b29..204142e3f6 100644
--- a/tests/test-gc.c
+++ b/tests/test-gc.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-getpass.c b/tests/test-getpass.c
index 52d2ee2fe5..f8e7fb20af 100644
--- a/tests/test-getpass.c
+++ b/tests/test-getpass.c
@@ -16,9 +16,7 @@
with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include "getpass.h"
diff --git a/tests/test-hmac-md5.c b/tests/test-hmac-md5.c
index fd5059a351..8aca505fb9 100644
--- a/tests/test-hmac-md5.c
+++ b/tests/test-hmac-md5.c
@@ -18,9 +18,7 @@
/* Written by Simon Josefsson. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-hmac-sha1.c b/tests/test-hmac-sha1.c
index f24193db26..b4b4929627 100644
--- a/tests/test-hmac-sha1.c
+++ b/tests/test-hmac-sha1.c
@@ -18,9 +18,7 @@
/* Written by Simon Josefsson. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-iconv.c b/tests/test-iconv.c
index 520b96b5a3..0a0c2aab14 100644
--- a/tests/test-iconv.c
+++ b/tests/test-iconv.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#if HAVE_ICONV
# include <iconv.h>
diff --git a/tests/test-linked_list.c b/tests/test-linked_list.c
index 71d96c164e..80c1907ef7 100644
--- a/tests/test-linked_list.c
+++ b/tests/test-linked_list.c
@@ -16,9 +16,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "gl_linked_list.h"
diff --git a/tests/test-linkedhash_list.c b/tests/test-linkedhash_list.c
index 765811ac7f..b51d9b938e 100644
--- a/tests/test-linkedhash_list.c
+++ b/tests/test-linkedhash_list.c
@@ -16,9 +16,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "gl_linkedhash_list.h"
diff --git a/tests/test-lock.c b/tests/test-lock.c
index 2153f223e8..417388eb8f 100644
--- a/tests/test-lock.c
+++ b/tests/test-lock.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS
diff --git a/tests/test-mbscasecmp.c b/tests/test-mbscasecmp.c
index f4d8e859c9..801f57a720 100644
--- a/tests/test-mbscasecmp.c
+++ b/tests/test-mbscasecmp.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbscasestr1.c b/tests/test-mbscasestr1.c
index 1e65856770..843716f132 100644
--- a/tests/test-mbscasestr1.c
+++ b/tests/test-mbscasestr1.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbscasestr2.c b/tests/test-mbscasestr2.c
index 548818756b..d9d0a0ee93 100644
--- a/tests/test-mbscasestr2.c
+++ b/tests/test-mbscasestr2.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbscasestr3.c b/tests/test-mbscasestr3.c
index 24ace449b1..18555dc2e4 100644
--- a/tests/test-mbscasestr3.c
+++ b/tests/test-mbscasestr3.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbscasestr4.c b/tests/test-mbscasestr4.c
index 146b3fe5c4..420c5c623f 100644
--- a/tests/test-mbscasestr4.c
+++ b/tests/test-mbscasestr4.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbschr.c b/tests/test-mbschr.c
index bf29ee8cbc..3caada69d7 100644
--- a/tests/test-mbschr.c
+++ b/tests/test-mbschr.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbscspn.c b/tests/test-mbscspn.c
index 4403927a7f..6088434c53 100644
--- a/tests/test-mbscspn.c
+++ b/tests/test-mbscspn.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbsncasecmp.c b/tests/test-mbsncasecmp.c
index 6170dffc66..f393e19eab 100644
--- a/tests/test-mbsncasecmp.c
+++ b/tests/test-mbsncasecmp.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbspbrk.c b/tests/test-mbspbrk.c
index a6a1404da8..121d2bb477 100644
--- a/tests/test-mbspbrk.c
+++ b/tests/test-mbspbrk.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbspcasecmp.c b/tests/test-mbspcasecmp.c
index 5000dfce07..6f4bfb2c69 100644
--- a/tests/test-mbspcasecmp.c
+++ b/tests/test-mbspcasecmp.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbsrchr.c b/tests/test-mbsrchr.c
index 35b865c6cb..c47afad6b1 100644
--- a/tests/test-mbsrchr.c
+++ b/tests/test-mbsrchr.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbsspn.c b/tests/test-mbsspn.c
index 3170a6a941..a6d075514d 100644
--- a/tests/test-mbsspn.c
+++ b/tests/test-mbsspn.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbsstr1.c b/tests/test-mbsstr1.c
index d1b079a712..ebf2e3bcc4 100644
--- a/tests/test-mbsstr1.c
+++ b/tests/test-mbsstr1.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbsstr2.c b/tests/test-mbsstr2.c
index 8ce3be7128..d45690f412 100644
--- a/tests/test-mbsstr2.c
+++ b/tests/test-mbsstr2.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-mbsstr3.c b/tests/test-mbsstr3.c
index 9f65520cd6..92673382d1 100644
--- a/tests/test-mbsstr3.c
+++ b/tests/test-mbsstr3.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-md2.c b/tests/test-md2.c
index 0cfc529af3..314764b35d 100644
--- a/tests/test-md2.c
+++ b/tests/test-md2.c
@@ -18,9 +18,7 @@
/* Written by Simon Josefsson. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-md4.c b/tests/test-md4.c
index 25af6e38c5..2bf6d730c9 100644
--- a/tests/test-md4.c
+++ b/tests/test-md4.c
@@ -19,9 +19,7 @@
/* Written by Simon Josefsson. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-md5.c b/tests/test-md5.c
index ba8c96621c..f54e206362 100644
--- a/tests/test-md5.c
+++ b/tests/test-md5.c
@@ -19,9 +19,7 @@
/* Written by Simon Josefsson. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-memmem.c b/tests/test-memmem.c
index 2308bbb543..c1a006567d 100644
--- a/tests/test-memmem.c
+++ b/tests/test-memmem.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-printf-posix.c b/tests/test-printf-posix.c
index e4d5e874d6..b2541d9051 100644
--- a/tests/test-printf-posix.c
+++ b/tests/test-printf-posix.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
diff --git a/tests/test-rbtree_list.c b/tests/test-rbtree_list.c
index c8cd526aae..bb6c5897cc 100644
--- a/tests/test-rbtree_list.c
+++ b/tests/test-rbtree_list.c
@@ -16,9 +16,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "gl_rbtree_list.h"
diff --git a/tests/test-rbtree_oset.c b/tests/test-rbtree_oset.c
index 2ecb81f4a5..2bf5e592eb 100644
--- a/tests/test-rbtree_oset.c
+++ b/tests/test-rbtree_oset.c
@@ -16,9 +16,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "gl_rbtree_oset.h"
diff --git a/tests/test-rbtreehash_list.c b/tests/test-rbtreehash_list.c
index deb9cdef58..f67ff7439b 100644
--- a/tests/test-rbtreehash_list.c
+++ b/tests/test-rbtreehash_list.c
@@ -16,9 +16,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "gl_rbtreehash_list.h"
diff --git a/tests/test-read-file.c b/tests/test-read-file.c
index 423b19e3a8..f904e27d50 100644
--- a/tests/test-read-file.c
+++ b/tests/test-read-file.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "read-file.h"
diff --git a/tests/test-rijndael.c b/tests/test-rijndael.c
index e060d40f48..e31eafa3df 100644
--- a/tests/test-rijndael.c
+++ b/tests/test-rijndael.c
@@ -17,9 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/tests/test-snprintf-posix.c b/tests/test-snprintf-posix.c
index 563835d9ce..901525646d 100644
--- a/tests/test-snprintf-posix.c
+++ b/tests/test-snprintf-posix.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
diff --git a/tests/test-snprintf.c b/tests/test-snprintf.c
index 543e027040..58e3823ea7 100644
--- a/tests/test-snprintf.c
+++ b/tests/test-snprintf.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
diff --git a/tests/test-sprintf-posix.c b/tests/test-sprintf-posix.c
index 5070106248..07a556f827 100644
--- a/tests/test-sprintf-posix.c
+++ b/tests/test-sprintf-posix.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
diff --git a/tests/test-stdint.c b/tests/test-stdint.c
index 7dbc062643..39fc51ca19 100644
--- a/tests/test-stdint.c
+++ b/tests/test-stdint.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2006. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
/* Whether to enable pedantic checks. */
#define DO_PEDANTIC 0
diff --git a/tests/test-strcasestr.c b/tests/test-strcasestr.c
index 3d18c06d37..6ecdb5287b 100644
--- a/tests/test-strcasestr.c
+++ b/tests/test-strcasestr.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <string.h>
diff --git a/tests/test-striconv.c b/tests/test-striconv.c
index 90c2ed38de..2cc96a674e 100644
--- a/tests/test-striconv.c
+++ b/tests/test-striconv.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "striconv.h"
diff --git a/tests/test-striconveh.c b/tests/test-striconveh.c
index 8810dfe3ed..f99a69934d 100644
--- a/tests/test-striconveh.c
+++ b/tests/test-striconveh.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "striconveh.h"
diff --git a/tests/test-striconveha.c b/tests/test-striconveha.c
index e3d120cc42..fab21c34fd 100644
--- a/tests/test-striconveha.c
+++ b/tests/test-striconveha.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "striconveha.h"
diff --git a/tests/test-tls.c b/tests/test-tls.c
index 4eda5011c0..f8c971ca07 100644
--- a/tests/test-tls.c
+++ b/tests/test-tls.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS
diff --git a/tests/test-vasnprintf-posix.c b/tests/test-vasnprintf-posix.c
index 5db0589faf..3d20a83af1 100644
--- a/tests/test-vasnprintf-posix.c
+++ b/tests/test-vasnprintf-posix.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "vasnprintf.h"
diff --git a/tests/test-vasnprintf-posix2.c b/tests/test-vasnprintf-posix2.c
index aa68216cda..65f3c6cfab 100644
--- a/tests/test-vasnprintf-posix2.c
+++ b/tests/test-vasnprintf-posix2.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "vasnprintf.h"
diff --git a/tests/test-vasnprintf.c b/tests/test-vasnprintf.c
index 80a2543bbb..488e93fdf4 100644
--- a/tests/test-vasnprintf.c
+++ b/tests/test-vasnprintf.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "vasnprintf.h"
diff --git a/tests/test-vasprintf-posix.c b/tests/test-vasprintf-posix.c
index 8cf802158e..7ff05daca4 100644
--- a/tests/test-vasprintf-posix.c
+++ b/tests/test-vasprintf-posix.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
diff --git a/tests/test-vasprintf.c b/tests/test-vasprintf.c
index 70fca148ae..1a3f366a3b 100644
--- a/tests/test-vasprintf.c
+++ b/tests/test-vasprintf.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
diff --git a/tests/test-verify.c b/tests/test-verify.c
index ee84c0b952..178bee907c 100644
--- a/tests/test-verify.c
+++ b/tests/test-verify.c
@@ -18,9 +18,7 @@
/* Written by Bruno Haible. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "verify.h"
diff --git a/tests/test-vfprintf-posix.c b/tests/test-vfprintf-posix.c
index 95c3017f64..1b2648456b 100644
--- a/tests/test-vfprintf-posix.c
+++ b/tests/test-vfprintf-posix.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
diff --git a/tests/test-vprintf-posix.c b/tests/test-vprintf-posix.c
index 57b6740161..871adffda1 100644
--- a/tests/test-vprintf-posix.c
+++ b/tests/test-vprintf-posix.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
diff --git a/tests/test-vsnprintf-posix.c b/tests/test-vsnprintf-posix.c
index 6e7f5d326a..0c3d807f81 100644
--- a/tests/test-vsnprintf-posix.c
+++ b/tests/test-vsnprintf-posix.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
diff --git a/tests/test-vsnprintf.c b/tests/test-vsnprintf.c
index e57e982e50..08aca8868b 100644
--- a/tests/test-vsnprintf.c
+++ b/tests/test-vsnprintf.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
diff --git a/tests/test-vsprintf-posix.c b/tests/test-vsprintf-posix.c
index ecbd256e9e..d0297bbff8 100644
--- a/tests/test-vsprintf-posix.c
+++ b/tests/test-vsprintf-posix.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
diff --git a/tests/test-xvasprintf.c b/tests/test-xvasprintf.c
index 41e22e47b2..236b8dd0cd 100644
--- a/tests/test-xvasprintf.c
+++ b/tests/test-xvasprintf.c
@@ -17,9 +17,7 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "xvasprintf.h"