#include "miscadmin.h"
#include "utils/builtins.h"
+/*
+ * On Windows, includes a #define for X509_NAME, which breaks our
+ * ability to use OpenSSL's version of that symbol if is pulled
+ * in after ... and, at least on some builds, it is. We
+ * can't reliably fix that by re-ordering #includes, because libpq/libpq-be.h
+ * #includes . Instead, just zap the #define again here.
+ */
+#ifdef X509_NAME
+#undef X509_NAME
+#endif
+
PG_MODULE_MAGIC;
static Datum X509_NAME_field_to_text(X509_NAME *name, text *fieldName);
#define LOBBUFSIZE 16384
-/*
- * Note: zlib.h must be included *after* libpq-fe.h, because the latter may
- * include ssl.h, which has a naming conflict with zlib.h.
- */
#ifdef HAVE_LIBZ
#include
#define GZCLOSE(fh) gzclose(fh)