[2517] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

pending/241: typedef/#define conflict in krb5-b7 between BIND and db-config.h

daemon@ATHENA.MIT.EDU (Paul Pomes)
Tue Nov 26 00:57:09 1996

Resent-From: gnats@rt-11.MIT.EDU (GNATS Management)
Resent-To: gnats-admin@rt-11.MIT.EDU
Resent-Reply-To: krb5-bugs@MIT.EDU, Paul Pomes <ppomes@Qualcomm.com>
Date: Mon, 25 Nov 1996 21:56:39 -0800
From: Paul Pomes <ppomes@Qualcomm.com>
To: krb5-bugs@MIT.EDU
Cc: bind-workers@vix.com


>Number:         241
>Category:       pending
>Synopsis:       typedef/#define conflict in krb5-b7 between BIND and db-config.h
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Tue Nov 26 00:57:01 EST 1996
>Last-Modified:
>Originator:
>Organization:
>Release:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Audit-Trail:
>Unformatted:
Under Solaris 2.4, Bind 4.9.5-rel installs the file sys/bitypes.h .  Typically
it's installed as /usr/local/include/bitypes.h .  This file is usually
pulled in from /usr/local/include/netdb.h .  The typedefs of interest are
at line 78:

	typedef /*signed*/ char            int8_t;
	typedef unsigned char            u_int8_t;
	typedef short                     int16_t;
	typedef unsigned short          u_int16_t;
	typedef int                       int32_t;
	typedef unsigned int            u_int32_t;

When the Kerberos configure script is told to look in /usr/local/include
via '--with-cppopts=-I/usr/local/include', compiles of several modules
(src/krb524/krb524d.c, src/appl/telnet/telnet/commands.c, etc) fail due
to the #define's in src/include/db-config.h replacing the right-hand side
of the typedefs above:

	#define int8_t signed char
	#define u_int8_t unsigned char
	#define int16_t short
	#define u_int16_t unsigned short
	#define int32_t int
	#define u_int32_t unsigned int

My fix for now is to edit the db-config.h file after configure is done
to wrap the #define's with the same wrapper used in bitypes.h:

	#ifndef __BIT_TYPES_DEFINED__
	#define __BIT_TYPES_DEFINED__
		[...]
	#endif	/* __BIT_TYPES_DEFINED__ */

Since the inclusion of one or both of the bitypes.h or db-config.h file
can occur in any order, I suggest that the configure utility be modify
to emit the above wrapper automatically when db-config.h is built.

/pbp

home help back first fref pref prev next nref lref last post