aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/c.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/include/c.h b/src/include/c.h
index 734626e75a8..13bb39fdef3 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -46,11 +46,14 @@
#ifndef C_H
#define C_H
-#include "postgres_ext.h"
-
+/*
+ * These headers must be included before any system headers, because on some
+ * platforms they affect the behavior of the system headers (for example, by
+ * defining _FILE_OFFSET_BITS).
+ */
#include "pg_config.h"
#include "pg_config_manual.h" /* must be after pg_config.h */
-#include "pg_config_os.h" /* must be before any system header files */
+#include "pg_config_os.h" /* config from include/port/PORTNAME.h */
/* System header files that should be available everywhere in Postgres */
#include <inttypes.h>
@@ -76,6 +79,9 @@
#include <libintl.h>
#endif
+ /* Pull in fundamental symbols that we also expose to applications */
+#include "postgres_ext.h"
+
/* Define before including zlib.h to add const decorations to zlib API. */
#ifdef HAVE_LIBZ
#define ZLIB_CONST