Re: Windows: openssl & gssapi dislike each other

From: Imran Zaheer <imran(dot)zhir(at)gmail(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Windows: openssl & gssapi dislike each other
Date: 2024-06-12 15:12:51
Message-ID: CA+UBfakE1K40Qna1ZYk5EyLz=kgiB44Of0JkibuM_rA9NDaKNA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

I removed the macro from the sslinfo.c as suggested by Andrew. Then I
was thinking maybe we can undo some other similar code.

I rearranged the headers to their previous position in
be-secure-openssl.c and in fe-secure-openssl.c. I was able to compile
with gssapi and openssl enabled. You can look into the original commits. [1,
2]
Is it ok if we undo the changes from these commits?

I am attaching two new patches.
One with macro guards removed from ssinfo.c.
Second patch will additionally rearrange headers for
be-secure-openssl.c and in fe-secure-openssl.c to their previous
position.

Thanks
Imran Zaheer
Bitnine

[1]: https://github.com/postgres/postgres/commit/1241fcbd7e649414f09f9858ba73e63975dcff64
[2]: https://github.com/postgres/postgres/commit/568620dfd6912351b4127435eca5309f823abde8

On Wed, Jun 12, 2024 at 12:34 AM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>
>
> On Tue, 11 Jun 2024 at 12:22, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>>
>>
>> On 2024-06-11 Tu 05:19, Dave Page wrote:
>>
>> Hi
>>
>> On Sun, 9 Jun 2024 at 08:29, Imran Zaheer <imran(dot)zhir(at)gmail(dot)com> wrote:
>>>
>>> Hi
>>>
>>> I am submitting two new patches. We can undefine the macro at two locations
>>>
>>> 1). As be-secure-openssl.c [1] was the actual
>>> file where the conflict happened so I undefined the macro here before
>>> the ssl includes. I changed the comment a little to make it understandable.
>>> I am also attaching the error generated with ninja build.
>>>
>>> OR
>>>
>>> 2). Right after the gssapi includes in libpq-be.h
>>
>>
>> Thank you for working on this. I can confirm the undef version compiles and passes tests with 16.3.
>>
>>
>>
>> Thanks for testing.
>>
>> I think I prefer approach 2, which should also allow us to remove the #undef in sslinfo.c so we only need to do this in one place.
>
> OK, well that version compiles and passes tests as well :-)
>
> Thanks!
>
> --
> Dave Page
> pgAdmin: https://www.pgadmin.org
> PostgreSQL: https://www.postgresql.org
> EDB: https://www.enterprisedb.com
>

Attachment Content-Type Size
v02-0002-approach02-rearrange-the-headers.patch application/octet-stream 2.1 KB
v02-0001-approach02-remove-macro-guard-from-sslinfo.patch application/octet-stream 1.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-06-12 15:20:32 Re: Proposal: Document ABI Compatibility
Previous Message David E. Wheeler 2024-06-12 15:04:22 Re: Proposal: Document ABI Compatibility