summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/libpq-int.h
diff options
context:
space:
mode:
authorDaniel Gustafsson2025-03-26 14:31:46 +0000
committerDaniel Gustafsson2025-03-26 14:31:46 +0000
commite92c0632c1473fe57383c58f0dfdde3bae7044f4 (patch)
treebcb999bdd5c24d320409bf0d60c4aef1fcaf04ab /src/interfaces/libpq/libpq-int.h
parent1eb399366ed658d41b8795a0a25599a8599bbcfb (diff)
Move GSSAPI includes into its own header
Due to a conflict in macro names on Windows between <wincrypt.h> and <openssl/ssl.h> these headers need to be included using a predictable pattern with an undef to handle that. The GSSAPI header <gssapi.h> does include <wincrypt.h> which cause problems with compiling PostgreSQL using MSVC when OpenSSL and GSSAPI are both enabled in the tree. Rather than fixing piecemeal for each file including gssapi headers, move the the includes and undef to a new file which should be used to centralize the logic. This patch is a reworked version of a patch by Imran Zaheer proposed earlier in the thread. Once this has proven effective in master we should look at backporting this as the problem exist at least since v16. Author: Daniel Gustafsson <[email protected]> Co-authored-by: Imran Zaheer <[email protected]> Reported-by: Dave Page <[email protected]> Reviewed-by: Andres Freund <[email protected]> Reviewed-by: vignesh C <[email protected]> Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/interfaces/libpq/libpq-int.h')
-rw-r--r--src/interfaces/libpq/libpq-int.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index f36f7f19d58..ade5ad82f07 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -44,15 +44,7 @@
#include "fe-auth-sasl.h"
#include "pqexpbuffer.h"
-/* IWYU pragma: begin_exports */
-#ifdef ENABLE_GSS
-#if defined(HAVE_GSSAPI_H)
-#include <gssapi.h>
-#else
-#include <gssapi/gssapi.h>
-#endif
-#endif
-/* IWYU pragma: end_exports */
+#include "libpq/pg-gssapi.h"
#ifdef ENABLE_SSPI
#define SECURITY_WIN32