Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit568620d

Browse files
committed
contrib/sslinfo needs a fix too to make hamerkop happy.
Re-ordering the #include's is a bit problematic here becauselibpq/libpq-be.h needs to include <openssl/ssl.h>. Instead,let's #undef the unwanted macro after all the #includes.This is definitely uglier than the other way, but it shouldwork despite possible future header rearrangements.(A look at the openssl headers indicates that X509_NAME is theonly conflicting symbol that we use.)In passing, remove a related but long-incorrect comment inpg_backup_archiver.h.Discussion:https://postgr.es/m/1051867.1635720347@sss.pgh.pa.us
1 parent27ef132 commit568620d

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

‎contrib/sslinfo/sslinfo.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@
1919
#include"miscadmin.h"
2020
#include"utils/builtins.h"
2121

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+
#ifdefX509_NAME
30+
#undef X509_NAME
31+
#endif
32+
2233
PG_MODULE_MAGIC;
2334

2435
staticDatumX509_NAME_field_to_text(X509_NAME*name,text*fieldName);

‎src/bin/pg_dump/pg_backup_archiver.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@
3232

3333
#defineLOBBUFSIZE 16384
3434

35-
/*
36-
* Note: zlib.h must be included *after* libpq-fe.h, because the latter may
37-
* include ssl.h, which has a naming conflict with zlib.h.
38-
*/
3935
#ifdefHAVE_LIBZ
4036
#include<zlib.h>
4137
#defineGZCLOSE(fh) gzclose(fh)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp