[HACKERS] segfault caused by heimdal (was: SUSE port)

2005-01-12 Thread Reinhard Max
On Wed, 12 Jan 2005 at 18:20, Reinhard Max wrote: I am still not sure whether the kerberos library, glibc, or PostgreSQL is to blame, or if it's a combination of bugs in these components that triggers the segfault. The problem is, that the heimdal implementation of kerberos5 used on sles8

Re: [HACKERS] segfault caused by heimdal (was: SUSE port)

2005-01-12 Thread Reinhard Max
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

Re: [HACKERS] segfault caused by heimdal (was: SUSE port)

2005-01-12 Thread Kurt Roeckx
On Wed, Jan 12, 2005 at 07:36:52PM +0100, 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

Re: [HACKERS] segfault caused by heimdal (was: SUSE port)

2005-01-12 Thread Reinhard Max
On Wed, 12 Jan 2005 at 20:28, Kurt Roeckx wrote: This is because the proper prototype is: extern char const *error_message (long); And C automaticly generates a prototype with in int instead. On 32 bit platforms this ussualy isn't a problem since both int and long are ussualy both 32

Re: [HACKERS] segfault caused by heimdal (was: SUSE port)

2005-01-12 Thread Tom Lane
Reinhard Max max@suse.de writes: --- 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 + /* *

Re: [HACKERS] segfault caused by heimdal (was: SUSE port)

2005-01-12 Thread Reinhard Max
On Wed, 12 Jan 2005 at 14:59, Tom Lane wrote: That looks like a reasonable fix, but isn't it needed in backend/libpq/auth.c as well? Yes, indeed: auth.c: In function `pg_krb5_init': auth.c:202: warning: implicit declaration of function `com_err' cu Reinhard

Re: [HACKERS] segfault caused by heimdal (was: SUSE port)

2005-01-12 Thread Tom Lane
Reinhard Max max@suse.de writes: On Wed, 12 Jan 2005 at 14:59, Tom Lane wrote: That looks like a reasonable fix, but isn't it needed in backend/libpq/auth.c as well? Yes, indeed: auth.c: In function `pg_krb5_init': auth.c:202: warning: implicit declaration of function `com_err' OK, patch