Add a testcase for bug 659866

Mere inclusion of glib headers should not require you to define
any XYZ_SOURCE macros.
This commit is contained in:
Matthias Clasen 2011-09-24 00:39:59 -04:00
parent e1f68c1292
commit cf9623767a
2 changed files with 23 additions and 0 deletions

View 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

17
glib/tests/include.c Normal file
View File

@ -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;
}