Allows configure to set defines such as _POSIX_SOURCE in config.h
that affect functions exposed by system headers and get consistent
results across all the source files.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
_h('')
_h('#include "xcb.h"')
+ _c('#ifdef HAVE_CONFIG_H')
+ _c('#include "config.h"')
+ _c('#endif')
_c('#include <stdlib.h>')
_c('#include <string.h>')
_c('#include <assert.h>')
/* Connection management: the core of XCB. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <assert.h>
#include <string.h>
#include <stdio.h>
/* A cache for QueryExtension results. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <string.h>
/* Stuff that reads stuff from the server. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <assert.h>
#include <string.h>
#include <stdlib.h>
/* A generic implementation of a list of void-pointers. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include "xcb.h"
/* Stuff that sends stuff to the server. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
/* Utility functions implementable using only public APIs. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <assert.h>
#include <sys/types.h>
#include <limits.h>
#include "xcbext.h"
#include "xcbint.h"
-/* must be after "xcbint.h" to get autoconf #defines */
#if defined(HAVE_TSOL_LABEL_H) && defined(HAVE_IS_SYSTEM_LABELED)
# include <tsol/label.h>
# include <sys/stat.h>
/* XID allocators. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <assert.h>
#include <stdlib.h>
#include "xcb.h"