Re: Windows: openssl & gssapi dislike each other

2025-03-31 Thread Dave Page
On Wed, 26 Mar 2025 at 16:32, Daniel Gustafsson wrote: > > On 26 Mar 2025, at 17:15, Tom Lane wrote: > > > > Daniel Gustafsson writes: > >> Thanks for review! Pushed after making the above changes and taking it > for > >> another CI run. > > > > CF entry should be marked closed no? > > Yep, ju

Re: Windows: openssl & gssapi dislike each other

2025-03-26 Thread vignesh C
On Fri, 31 Jan 2025 at 21:05, Daniel Gustafsson wrote: > > > On 31 Jan 2025, at 16:29, Andres Freund wrote: > > >> #ifdef ENABLE_GSS > >> -#if defined(HAVE_GSSAPI_H) > >> -#include > >> -#else > >> -#include > >> -#endif /* HAVE_GSSAPI_H */ > >> +#include "libpq/pg-gssapi.h" > >> #endif /* ENAB

Re: Windows: openssl & gssapi dislike each other

2025-03-26 Thread Daniel Gustafsson
> On 26 Mar 2025, at 17:15, Tom Lane wrote: > > Daniel Gustafsson writes: >> Thanks for review! Pushed after making the above changes and taking it for >> another CI run. > > CF entry should be marked closed no? Yep, just wanted to allow some time to see how the buildfarm liked it before clos

Re: Windows: openssl & gssapi dislike each other

2025-03-26 Thread Tom Lane
Daniel Gustafsson writes: > Thanks for review! Pushed after making the above changes and taking it for > another CI run. CF entry should be marked closed no? https://commitfest.postgresql.org/patch/5060/ regards, tom lane

Re: Windows: openssl & gssapi dislike each other

2025-03-26 Thread Daniel Gustafsson
> On 26 Mar 2025, at 09:53, vignesh C wrote: > On Fri, 31 Jan 2025 at 21:05, Daniel Gustafsson wrote: >> >>> On 31 Jan 2025, at 16:29, Andres Freund wrote: >>> This #ifdef ENABLE_GSS probably isn't necessary anymore. >> >> Yeah, I only left it for code documentation reasons to keep readers fr

Re: Windows: openssl & gssapi dislike each other

2025-03-26 Thread Andrew Dunstan
On 2025-03-26 We 4:53 AM, vignesh C wrote: On Fri, 31 Jan 2025 at 21:05, Daniel Gustafsson wrote: On 31 Jan 2025, at 16:29, Andres Freund wrote: #ifdef ENABLE_GSS -#if defined(HAVE_GSSAPI_H) -#include -#else -#include -#endif /* HAVE_GSSAPI_H */ +#include "libpq/pg-gssapi.h" #endif /* ENA

Re: Windows: openssl & gssapi dislike each other

2025-01-31 Thread Daniel Gustafsson
> On 31 Jan 2025, at 16:29, Andres Freund wrote: >> #ifdef ENABLE_GSS >> -#if defined(HAVE_GSSAPI_H) >> -#include >> -#else >> -#include >> -#endif /* HAVE_GSSAPI_H */ >> +#include "libpq/pg-gssapi.h" >> #endif /* ENABLE_GSS */ > > This #ifdef ENABLE_GSS probably isn't necessary anymore. Yeah

Re: Windows: openssl & gssapi dislike each other

2025-01-31 Thread Andres Freund
Hi, On 2025-01-31 15:54:45 +0100, Daniel Gustafsson wrote: > > On 24 Jan 2025, at 22:45, Daniel Gustafsson wrote: > > > >> On 24 Jan 2025, at 21:07, Andrew Dunstan wrote: > >> On 2025-01-22 We 4:25 AM, Dave Page wrote: > > > >>> Anyway, no fix was committed as far as I know. I would suggest it

Re: Windows: openssl & gssapi dislike each other

2025-01-31 Thread Daniel Gustafsson
> On 24 Jan 2025, at 22:45, Daniel Gustafsson wrote: > >> On 24 Jan 2025, at 21:07, Andrew Dunstan wrote: >> On 2025-01-22 We 4:25 AM, Dave Page wrote: > >>> Anyway, no fix was committed as far as I know. I would suggest it should be >>> back-patched as well. >> >> I'm quite partial to the ap

Re: Windows: openssl & gssapi dislike each other

2025-01-24 Thread Daniel Gustafsson
> On 24 Jan 2025, at 21:07, Andrew Dunstan wrote: > On 2025-01-22 We 4:25 AM, Dave Page wrote: >> Anyway, no fix was committed as far as I know. I would suggest it should be >> back-patched as well. > > I'm quite partial to the approach suggested upthread by Andres (a separate > pg_gssapi.h f

Re: Windows: openssl & gssapi dislike each other

2025-01-24 Thread Dave Page
On Fri, 24 Jan 2025 at 20:07, Andrew Dunstan wrote: > > On 2025-01-22 We 4:25 AM, Dave Page wrote: > > > > On Wed, 22 Jan 2025 at 09:17, Daniel Gustafsson wrote: > >> > On 10 Jul 2024, at 19:06, Imran Zaheer wrote: >> >> (Reviving an old thread to give them a chance to finish before v18) >> >>

Re: Windows: openssl & gssapi dislike each other

2025-01-24 Thread Andrew Dunstan
On 2025-01-22 We 4:25 AM, Dave Page wrote: On Wed, 22 Jan 2025 at 09:17, Daniel Gustafsson wrote: > On 10 Jul 2024, at 19:06, Imran Zaheer wrote: (Reviving an old thread to give them a chance to finish before v18) > For now maybe we can do the future proofing for gssapi & open

Re: Windows: openssl & gssapi dislike each other

2025-01-22 Thread Dave Page
On Wed, 22 Jan 2025 at 09:17, Daniel Gustafsson wrote: > > On 10 Jul 2024, at 19:06, Imran Zaheer wrote: > > (Reviving an old thread to give them a chance to finish before v18) > > > For now maybe we can do the future proofing for gssapi & openssl includes > > and do testing if openssl clashes w

Re: Windows: openssl & gssapi dislike each other

2025-01-22 Thread Daniel Gustafsson
> On 10 Jul 2024, at 19:06, Imran Zaheer wrote: (Reviving an old thread to give them a chance to finish before v18) > For now maybe we can do the future proofing for gssapi & openssl includes > and do testing if openssl clashes with some other lib too. Where did this end up, is compilation on W

Re: Windows: openssl & gssapi dislike each other

2024-07-10 Thread Imran Zaheer
On Tue, Jul 9, 2024 at 2:32 AM Andres Freund wrote: > > Hi, > > > On 2024-06-13 00:12:51 +0900, Imran Zaheer wrote: > > I removed the macro from the sslinfo.c as suggested by Andrew. Then I > > was thinking maybe we can undo some other similar code. > > What precisely do you mean by that? Just get

Re: Windows: openssl & gssapi dislike each other

2024-07-08 Thread Andres Freund
Hi, On 2024-06-13 00:12:51 +0900, Imran Zaheer wrote: > I removed the macro from the sslinfo.c as suggested by Andrew. Then I > was thinking maybe we can undo some other similar code. What precisely do you mean by that? Just getting rid of the "ordered include" of openssl headers in {fe,be}-secu

Re: Windows: openssl & gssapi dislike each other

2024-06-12 Thread Imran Zaheer
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 lo

Re: Windows: openssl & gssapi dislike each other

2024-06-11 Thread Dave Page
On Tue, 11 Jun 2024 at 12:22, Andrew Dunstan wrote: > > On 2024-06-11 Tu 05:19, Dave Page wrote: > > Hi > > On Sun, 9 Jun 2024 at 08:29, Imran Zaheer 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 a

Re: Windows: openssl & gssapi dislike each other

2024-06-11 Thread Andrew Dunstan
On 2024-06-11 Tu 05:19, Dave Page wrote: Hi On Sun, 9 Jun 2024 at 08:29, Imran Zaheer 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 m

Re: Windows: openssl & gssapi dislike each other

2024-06-11 Thread Dave Page
Hi On Sun, 9 Jun 2024 at 08:29, Imran Zaheer 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 com

Re: Windows: openssl & gssapi dislike each other

2024-06-09 Thread Imran Zaheer
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 er

Re: Windows: openssl & gssapi dislike each other

2024-06-08 Thread Tom Lane
Andrew Dunstan 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

Re: Windows: openssl & gssapi dislike each other

2024-06-08 Thread Andrew Dunstan
On 2024-06-08 Sa 06:22, Imran Zaheer wrote: I was able to reproduce the gssapi & openssl error on windows. I tried on PG16 with msvc build system and on PG17 with meson build system. The error was reproducible when enabling both openssl and gssapi from the configurations. Turns out that it was

Re: Windows: openssl & gssapi dislike each other

2024-06-08 Thread Imran Zaheer
I was able to reproduce the gssapi & openssl error on windows. I tried on PG16 with msvc build system and on PG17 with meson build system. The error was reproducible when enabling both openssl and gssapi from the configurations. Turns out that it was due to the conflicting macros. "be-secure-open