Re: Windows: openssl & gssapi dislike each other

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

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

Thanks
Imran Zaheer
Bitnine

[1]: https://github.com/postgres/postgres/blob/00ac25a3c365004821e819653c3307acd3294818/src/backend/libpq/be-secure-openssl.c#L46

On Sun, Jun 9, 2024 at 7:21 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > On 2024-06-08 Sa 06:22, Imran Zaheer wrote:
> >> Now this can either be solved by just just undefine the macro defined
> >> by wincrypt.h as done here [3]
> >> Or we should rearrange our headers. Openssl header should be at the
> >> bottom (after the gssapi includes).
>
> > Let's be consistent and use the #undef from [3].
>
> +1. Depending on header order is not great, especially when you have
> to make it depend on an order that is directly contradictory to
> project conventions [0].
>
> regards, tom lane
>
> [0] https://wiki.postgresql.org/wiki/Committing_checklist#Policies

Attachment Content-Type Size
ninja-build-pg-with-openssl-gssapi.txt text/plain 5.5 KB
v01-0001-approach02-undefine-macro-after-gssapi-includes.patch application/octet-stream 700 bytes
v01-0001-approach03-undefine-macro-before-ssl-includes.patch application/octet-stream 1.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message cca5507 2024-06-09 09:39:25 Format the code in xact_decode
Previous Message Isaac Morland 2024-06-09 02:13:27 Re: Wrong security context for deferred triggers?