GNOME Bugzilla – Bug 604565
[gstcheck] Update check to 0.9.8
Last modified: 2010-01-05 01:40:30 UTC
0.9.8 includes some fixes that make it easier to build on Windows
Created attachment 149717 [details] [review] Updates internal check to 0.9.8 (mostly) I've left AC_CHECK_DECLS() list as it is in check-0.9.8, though only the macro related to localtime_r is actually used in the source, because that's the only function missing on Windows. The code for others might be necessary to add from the lib subdirectory of check-0.9.8 for other platforms.
Created attachment 150036 [details] [review] alternative patch set, splits up previous patch into three plus some minor changes Could you check this patch series to make sure it still works for you? Basically I dropped in the code from the check-0.9.8 tarball, indented it, and then updated the autotools/Makefile stuff as you suggested (for the most part, I made some minor changes. like add/move defines into Makefile.am etc.).
Created attachment 150057 [details] [review] Fixed patch You forgot to use #if HAVE_DECL_LOCALTIME_R instead of #ifdef HAVE_DECL_LOCALTIME_R (because HAVE_DECL_LOCALTIME_R is defined to 0 rather than undefined when the condition is false) Otherwise - yes, everything's fine. Just in case, i've fixed my previous patch following the diff you've posted on the pastebin. Here it is.
That is, #if !HAVE_DECL_LOCALTIME_R
> You forgot to use #if HAVE_DECL_LOCALTIME_R instead of #ifdef > HAVE_DECL_LOCALTIME_R (because HAVE_DECL_LOCALTIME_R is defined to 0 rather > than undefined when the condition is false) > > Otherwise - yes, everything's fine. Oh, true. However, something seems wrong with AC_CHECK_DECL, because even on Linux I get that defined to 0 even though I'm pretty sure it's available. AC_CHECK_FUNCS on the other hand seems to yield the right result, so I think I'll use that instead.
Committed with fix for localtime_r. commit db1acc35207d1f894de324253a276c2832738269 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Sat Dec 19 14:27:05 2009 +0000 configure: always call our check checks for the SUBUNIT conditional The SUBUNIT conditional needs to be set even if check is disabled. Also remove a FIXME that is not needed any longer / after all. commit e08cb58aa8766470295c3d0bc429bdd6a0b4e8f2 Author: Руслан Ижбулатов <lrn1986@gmail.com> Date: Fri Dec 18 21:28:35 2009 +0000 check: patch internal check copy so it works with our build system Fixes #604565. commit dd77e42e91994af4f4f3afc8c049e9fe4ddc430d Author: Руслан Ижбулатов <lrn1986@gmail.com> Date: Fri Dec 18 21:26:01 2009 +0000 check: update autotools and docs stuff for new check version commit 8e5f17d07f2dd8a6728703b9250e6f649fa909f6 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Thu Dec 17 20:09:48 2009 +0000 check: update internal libcheck to 0.9.8
This seems to have broken something. fail_if (TRUE) does not make the tests fail any longer..
This fixes it again for me: commit 13160040c1605548e9da93f7f17d73deb3af15b6 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Tue Jan 5 01:35:41 2010 +0000 check: patch internal check copy some more so that failures actually fail Include unistd.h so that _POSIX_VERSION is actually defined when it should be defined. Without that, stuff like fail_if(1) doesn't actually fail, presumably because other parts of the code do include unistd.h and then have _POSIX_VERSION defined. Fixes #604565 even more. Could you double-check that fail_if(1) actually fails for you with MingW (where unistd.h is presumably not available, or does not define _POSIX_VERSION)?