On mingw, the test-tsearch program does not link, because this platform does not have the 'initstate' function.
I don't want to spend time on random number generators at this point, so here's a patch to make the test compile. 2008-04-20 Bruno Haible <[EMAIL PROTECTED]> * tests/test-tsearch.c (main): Don't use initstate if it is missing. * modules/tsearch-tests (configure.ac): Test for initstate function. *** modules/tsearch-tests.orig 2008-04-20 13:12:50.000000000 +0200 --- modules/tsearch-tests 2008-04-20 10:51:19.000000000 +0200 *************** *** 15,20 **** --- 15,21 ---- double x;], [x = log (x);], , [TEST_TSEARCH_LIBM=-lm]) AC_SUBST([TEST_TSEARCH_LIBM]) + AC_CHECK_FUNCS([initstate]) Makefile.am: TESTS += test-tsearch.sh *** tests/test-tsearch.c.orig 2008-04-20 13:12:50.000000000 +0200 --- tests/test-tsearch.c 2008-04-20 10:50:39.000000000 +0200 *************** *** 1,5 **** /* Test program for tsearch et al. ! Copyright (C) 1997, 2000, 2001, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software: you can redistribute it and/or --- 1,5 ---- /* Test program for tsearch et al. ! Copyright (C) 1997, 2000-2001, 2007-2008 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software: you can redistribute it and/or *************** *** 256,262 **** --- 256,264 ---- void *root = NULL; int i, j; + #if HAVE_INITSTATE initstate (SEED, state, 8); + #endif for (i = 0; i < SIZE; ++i) x[i] = i;