Sorry for following up to myself once more...
On Wed, 12 Jan 2005 at 19:36, Reinhard Max wrote:
> The problem is, that the heimdal implementation of kerberos5 used on
> sles8 needs an extra include statement for com_err.h in
> src/interfaces/libpq/fe-auth.c to get the prototype for
> error_message(), while on newer SUSE-releases using the MIT
> Kerberos5 implementation this prototype is provided by krb5.h
> itself.
after finding and reading the thread on HACKERS about com_err.h from
last December, I think either should configure check if including
krb5.h is sufficient for getting the prototype of error_message(), or
a conditional include for krb5.h should be added to
src/interfaces/libpq/fe-auth.c.
A proposed patch to achieve the latter is attached to this mail.
Either way will lead to a build time error when error_message() isn't
declared or com_err.h can't be found, which is better than the current
situation where only a warning about a missing prototype is issued,
but compilation continues resulting in a broken libpq.
cu
Reinhard
--- src/interfaces/libpq/fe-auth.c
+++ src/interfaces/libpq/fe-auth.c
@@ -244,6 +244,11 @@
#include <krb5.h>
+#if !defined(__COM_ERR_H) && !defined(__COM_ERR_H__)
+/* if krb5.h didn't include it already */
+#include <com_err.h>
+#endif
+
/*
* pg_an_to_ln -- return the local name corresponding to an authentication
* name
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend