From cf9623767a721607cb972d300440e91dc8a57861 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 24 Sep 2011 00:39:59 -0400 Subject: [PATCH] Add a testcase for bug 659866 Mere inclusion of glib headers should not require you to define any XYZ_SOURCE macros. --- glib/tests/Makefile.am | 6 ++++++ glib/tests/include.c | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 glib/tests/include.c diff --git a/glib/tests/Makefile.am b/glib/tests/Makefile.am index 7fe68e5..2846699 100644 --- a/glib/tests/Makefile.am +++ b/glib/tests/Makefile.am @@ -212,6 +212,12 @@ rwlock_LDADD = $(progs_ldadd) TEST_PROGS += once once_LDADD = $(progs_ldadd) +TEST_PROGS += cond +cond_LDADD = $(progs_ldadd) + +#TEST_PROGS += include +#include_LDADD = $(progs_ldadd) + # some testing of gtester funcitonality XMLLINT=xmllint gtester-xmllint-check: # check testreport xml with xmllint if present diff --git a/glib/tests/include.c b/glib/tests/include.c new file mode 100644 index 0000000..acd7631 --- /dev/null +++ b/glib/tests/include.c @@ -0,0 +1,17 @@ +/* Test case for bug 659866 */ + +#define _POSIX_C_SOURCE 0 +#undef _GNU_SOURCE +#undef _XOPEN_SOURCE +#include +#include + +int +main (int argc, char *argv[]) +{ + GRWLock lock; + + g_rw_lock_init (&lock); + + return 0; +} -- 2.7.4