Kerberos warnings on win32

Started by Magnus Haganderover 18 years ago4 messageshackers
Jump to latest
#1Magnus Hagander
magnus@hagander.net

When building with Kerberos support (or GSSAPI, but not SSPI) on Win32, a
whole bunch of warnings come out due to redefinitions of macros in the
kerberos headers. The reason for this is that Kerberos leaks the
HAVE_<something> macros from autoconf into the header files that are
included by PostgreSQL.

The attached file removes this by undefing the macros before we include the
kerberos files. But this is perhaps just too ugly to deal with and we
should live with the warnings instead?

For MSVC, we can suppress the warnings with a #pragma around the include,
but I don't know if that's possible in mingw/gcc. It'll look something likt
the second patch attached (only did that for one of the places that'd need
it, to show what it looks like)

Thoughts? Worth doing anything about?

//Magnus

Attachments:

krb_defs.difftext/plain; charset=us-asciiDownload+48-0
krb_defs_msvc.difftext/plain; charset=us-asciiDownload+6-0
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#1)
Re: Kerberos warnings on win32

Magnus Hagander <magnus@hagander.net> writes:

The attached file removes this by undefing the macros before we include the
kerberos files. But this is perhaps just too ugly to deal with and we
should live with the warnings instead?

Ick. I don't like any of these patches.

regards, tom lane

#3Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#2)
Re: Kerberos warnings on win32

Tom Lane wrote:

Magnus Hagander <magnus@hagander.net> writes:

The attached file removes this by undefing the macros before we include the
kerberos files. But this is perhaps just too ugly to deal with and we
should live with the warnings instead?

Ick. I don't like any of these patches.

You know, I kind of expected that response :-P

We'll just live with the warnings then, since they're not critical.
Meanwhile, I'll file a bug with the Kerberos folks.

//Magnus

#4Magnus Hagander
magnus@hagander.net
In reply to: Magnus Hagander (#3)
Re: Kerberos warnings on win32

On Tue, Jul 24, 2007 at 10:55:50PM +0200, Magnus Hagander wrote:

Tom Lane wrote:

Magnus Hagander <magnus@hagander.net> writes:

The attached file removes this by undefing the macros before we include the
kerberos files. But this is perhaps just too ugly to deal with and we
should live with the warnings instead?

Ick. I don't like any of these patches.

You know, I kind of expected that response :-P

We'll just live with the warnings then, since they're not critical.
Meanwhile, I'll file a bug with the Kerberos folks.

For the purpose of the archives, kfw bug 5601.

//Magnus