Workaround for what apparently is a bug in MSYS: returning -1 from main()

2008-07-22  Tor Lillqvist  <tml@novell.com>

	* configure.in: Workaround for what apparently is a bug in MSYS:
	returning -1 from main() is misinterpreted as exit status 0, so
	make sure we return 0 or 1.


svn path=/trunk/; revision=20895
This commit is contained in:
Tor Lillqvist 2008-07-22 20:14:01 +00:00 committed by Tor Lillqvist
parent ef3e772fbb
commit c9d31fc022
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2008-07-22 Tor Lillqvist <tml@novell.com>
* configure.in: Workaround for what apparently is a bug in MSYS:
returning -1 from main() is misinterpreted as exit status 0, so
make sure we return 0 or 1.
2008-07-22 Sven Herzberg <sven@imendio.com> 2008-07-22 Sven Herzberg <sven@imendio.com>
Add a test for my fixes from July 20th. Add a test for my fixes from July 20th.

View File

@ -1045,7 +1045,7 @@ main (int argc, char **argv)
{ {
char *content_type; char *content_type;
content_type = g_content_type_guess (NULL, data, data_size, NULL); content_type = g_content_type_guess (NULL, data, data_size, NULL);
return strcmp (content_type, "image/png"); return !!strcmp (content_type, "image/png");
}]])], }]])],
[gio_can_sniff=yes [gio_can_sniff=yes
AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])], AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])],