File tree 5 files changed +46
-30
lines changed
5 files changed +46
-30
lines changed Original file line number Diff line number Diff line change 19
19
#include "miscadmin.h"
20
20
#include "utils/builtins.h"
21
21
22
- /*
23
- * On Windows, <wincrypt.h> includes a #define for X509_NAME, which breaks our
24
- * ability to use OpenSSL's version of that symbol if <wincrypt.h> is pulled
25
- * in after <openssl/ssl.h> ... and, at least on some builds, it is. We
26
- * can't reliably fix that by re-ordering #includes, because libpq/libpq-be.h
27
- * #includes <openssl/ssl.h>. Instead, just zap the #define again here.
28
- */
29
- #ifdef X509_NAME
30
- #undef X509_NAME
31
- #endif
32
-
33
22
PG_MODULE_MAGIC ;
34
23
35
24
static Datum X509_NAME_field_to_text (X509_NAME * name , text * fieldName );
Original file line number Diff line number Diff line change 16
16
17
17
#ifdef ENABLE_GSS
18
18
19
- #if defined(HAVE_GSSAPI_H )
20
- #include <gssapi.h>
21
- #include <gssapi_ext.h>
22
- #else
23
- #include <gssapi/gssapi.h>
24
- #include <gssapi/gssapi_ext.h>
25
- #endif
19
+ #include "libpq/pg-gssapi.h"
26
20
27
21
extern void pg_GSS_error (const char * errmsg ,
28
22
OM_uint32 maj_stat , OM_uint32 min_stat );
Original file line number Diff line number Diff line change 28
28
#include <netinet/tcp.h>
29
29
30
30
#ifdef ENABLE_GSS
31
- #if defined(HAVE_GSSAPI_H )
32
- #include <gssapi.h>
33
- #else
34
- #include <gssapi/gssapi.h>
35
- #endif /* HAVE_GSSAPI_H */
31
+ #include "libpq/pg-gssapi.h"
36
32
#endif /* ENABLE_GSS */
37
33
38
34
#ifdef ENABLE_SSPI
Original file line number Diff line number Diff line change
1
+ /*-------------------------------------------------------------------------
2
+ *
3
+ * pg-gssapi.h
4
+ * Definitions for including GSSAPI headers
5
+ *
6
+ * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
7
+ * Portions Copyright (c) 1994, Regents of the University of California
8
+ *
9
+ * src/include/libpq/pg-gssapi.h
10
+ *
11
+ *-------------------------------------------------------------------------
12
+ */
13
+
14
+ #ifndef PG_GSSAPI_H
15
+ #define PG_GSSAPI_H
16
+
17
+ #ifdef ENABLE_GSS
18
+
19
+ /* IWYU pragma: begin_exports */
20
+ #if defined(HAVE_GSSAPI_H )
21
+ #include <gssapi.h>
22
+ #include <gssapi_ext.h>
23
+ #else
24
+ #include <gssapi/gssapi.h>
25
+ #include <gssapi/gssapi_ext.h>
26
+ #endif
27
+ /* IWYU pragma: end_exports */
28
+
29
+ /*
30
+ * On Windows, <wincrypt.h> includes a #define for X509_NAME, which breaks our
31
+ * ability to use OpenSSL's version of that symbol if <wincrypt.h> is pulled
32
+ * in after <openssl/ssl.h> ... and, at least on some builds, it is. We
33
+ * can't reliably fix that by re-ordering #includes, because libpq/libpq-be.h
34
+ * #includes <openssl/ssl.h>. Instead, just zap the #define again here.
35
+ */
36
+ #ifdef X509_NAME
37
+ #undef X509_NAME
38
+ #endif
39
+
40
+ #endif /* ENABLE_GSS */
41
+
42
+ #endif /* PG_GSSAPI_H */
43
+
Original file line number Diff line number Diff line change 44
44
#include "fe-auth-sasl.h"
45
45
#include "pqexpbuffer.h"
46
46
47
- /* IWYU pragma: begin_exports */
48
47
#ifdef ENABLE_GSS
49
- #if defined(HAVE_GSSAPI_H )
50
- #include <gssapi.h>
51
- #else
52
- #include <gssapi/gssapi.h>
53
- #endif
48
+ #include "libpq/pg-gssapi.h"
54
49
#endif
55
- /* IWYU pragma: end_exports */
56
50
57
51
#ifdef ENABLE_SSPI
58
52
#define SECURITY_WIN32
You can’t perform that action at this time.
0 commit comments