aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2011-06-16 22:30:24 -0400
committerAndrew Dunstan <andrew@dunslane.net>2011-06-16 22:30:24 -0400
commit236a11dc65906cc200bce4e6db26d20b299cd1b0 (patch)
tree6920d9ed78077d1e37207bbf3356b0be2742522b /src
parentbfcb9328e51eaaa21c92a1f2d7262758afb843e8 (diff)
downloadpostgresql-236a11dc65906cc200bce4e6db26d20b299cd1b0.tar.gz
postgresql-236a11dc65906cc200bce4e6db26d20b299cd1b0.zip
Define FLEXIBLE_ARRAY_MEMBER for MSVC.
Diffstat (limited to 'src')
-rw-r--r--src/include/pg_config.h.win329
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32
index e9a04f66db6..56559162240 100644
--- a/src/include/pg_config.h.win32
+++ b/src/include/pg_config.h.win32
@@ -46,6 +46,15 @@
/* Define to the default TCP port number as a string constant. */
#define DEF_PGPORT_STR "5432"
+/* Define to nothing if C supports flexible array members, and to 1 if it does
+ not. That way, with a declaration like `struct s { int n; double
+ d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
+ compilers. When computing the size of such an object, don't use 'sizeof
+ (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
+ instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
+ MSVC and with C++ compilers. */
+#define FLEXIBLE_ARRAY_MEMBER 1
+
/* Define to 1 if you want National Language Support. (--enable-nls) */
/* #undef ENABLE_NLS */