Add a testcase for bug 659866
authorMatthias Clasen <mclasen@redhat.com>
Sat, 24 Sep 2011 04:39:59 +0000 (00:39 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 24 Sep 2011 04:39:59 +0000 (00:39 -0400)
Mere inclusion of glib headers should not require you to define
any XYZ_SOURCE macros.

glib/tests/Makefile.am
glib/tests/include.c [new file with mode: 0644]

index 7fe68e5..2846699 100644 (file)
@@ -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 (file)
index 0000000..acd7631
--- /dev/null
@@ -0,0 +1,17 @@
+/* Test case for bug 659866 */
+
+#define _POSIX_C_SOURCE 0
+#undef _GNU_SOURCE
+#undef _XOPEN_SOURCE
+#include <pthread.h>
+#include <glib.h>
+
+int
+main (int argc, char *argv[])
+{
+  GRWLock lock;
+
+  g_rw_lock_init (&lock);
+
+  return 0;
+}