Skip Menu |
 

Date: Wed, 02 Feb 2005 12:47:17 -0800
From: Quanah Gibson-Mount <quanah@stanford.edu>
To: krb5-bugs@mit.edu
Subject: krb5-1.4 includes an include file that doesn't exist on alpha-dux40
Download (untitled) / with headers
text/plain 1.9KiB
When building krb5-1.4 on our DEC alpha box:

cp gssapi_krb5.h "../../../include/gssapi/gssapi_krb5.h"
/usr/pubsw/bin/gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\"
-DKRB5_KRB4_COMPAT=1 -DHAVE_BT_RSEQ=1 -DKRB5_PRIVATE=1 -DKRB5_DEPRECATED=1
-DKRB5_DNS_LOOKUP_KDC=1 -DKRB5_DNS_LOOKUP=1 -DHAVE_LIBRESOLV=1
-DHAVE_RES_SEARCH=1 -DHAVE_DN_SKIPNAME=1 -DDELAY_INITIALIZER=1
-DCONSTRUCTOR_ATTR_WORKS=1 -DDESTRUCTOR_ATTR_WORKS=1
-DUSE_LINKER_INIT_OPTION=1 -DUSE_LINKER_FINI_OPTION=1 -DENABLE_THREADS=1
-DHAVE_PTHREAD=1 -DHAVE_PTHREAD_RWLOCK_INIT=1
-DHAVE_PTHREAD_RWLOCK_INIT_IN_THREAD_LIB=1 -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1
-DHAVE_STDLIB_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MEMORY_H=1
-DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=8 -I../../../include
-I../../../../../lib/gssapi/krb5/../../../include -I../../../include/krb5
-I../../../../../lib/gssapi/krb5/../../../include/krb5 -I.
-I../../../../../lib/gssapi/krb5 -I../../../../../lib/gssapi/krb5/..
-I../generic -I../../../../../lib/gssapi/krb5/../generic -O2 -DSTANFORD
-D_REENTRANT -pthread -c
../../../../../lib/gssapi/krb5/accept_sec_context.c
In file included from ../../../../../lib/gssapi/krb5/gssapiP_krb5.h:69,
from
../../../../../lib/gssapi/krb5/accept_sec_context.c:74:
gssapi_krb5.h:98:22: inttypes.h: No such file or directory

tru64-build:/afs/ir/src/pubsw/kerberos/krb5-1.4> ls -l /usr/include/int*
ls: No match.

--Quanah

--
Quanah Gibson-Mount
Principal Software Developer
ITSS/Shared Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html

"These censorship operations against schools and libraries are stronger
than ever in the present religio-political climate. They often focus on
fantasy and sf books, which foster that deadly enemy to bigotry and blind
faith, the imagination." -- Ursula K. Le Guin
Date: Wed, 02 Feb 2005 13:44:03 -0800
From: Quanah Gibson-Mount <quanah@stanford.edu>
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #2911] AutoReply: krb5-1.4 includes an include file that doesn't exist on alpha-dux40
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.1KiB


--On Wednesday, February 02, 2005 4:39 PM -0500 krb5 <rt@krbdev.mit.edu>
wrote:


I've found that for alpha, the solution to the problem is to:

typedef unsigned long long gss_uint64;

in gssapi_krb5.h


so perhaps instead of:

#if defined(_WIN32)
typedef unsigned __int64 gss_uint64;
#else /*windows*/
#include <inttypes.h>
typedef uint64_t gss_uint64;
#endif

it should be:

#if defined(_WIN32) /* windows */
typedef unsigned __int64 gss_uint64;
#elsif ALPHA /*alpha*/
typedef unsigned long long gss_uint64;
#else /*not windows or alpha*/
#include <inttypes.h>
typedef uint64_t gss_uint64;
#endif


Where ALPHA is whatever macro is defined to note that this build is
happening on an alpha system.

--Quanah

--
Quanah Gibson-Mount
Principal Software Developer
ITSS/Shared Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html

"These censorship operations against schools and libraries are stronger
than ever in the present religio-political climate. They often focus on
fantasy and sf books, which foster that deadly enemy to bigotry and blind
faith, the imagination." -- Ursula K. Le Guin
From: Ken Raeburn <raeburn@MIT.EDU>
Subject: Re: [krbdev.mit.edu #2911] krb5-1.4 includes an include file that doesn't exist on alpha-dux40
Date: Wed, 2 Feb 2005 17:03:31 -0500
To: rt@krbdev.mit.edu
RT-Send-Cc:
On Feb 2, 2005, at 16:44, Quanah Gibson-Mount via RT wrote:
Show quoted text
> I've found that for alpha, the solution to the problem is to:
>
> typedef unsigned long long gss_uint64;
>
> in gssapi_krb5.h

Actually, on an Alpha, "unsigned long" is probably good enough.

Show quoted text
> Where ALPHA is whatever macro is defined to note that this build is
> happening on an alpha system.

Which we've mostly managed to avoid, so far, with the major exception
of Windows.

Does your system have stdint.h, or anything else that might define a
uint64_t type?

We're sort of moving a little towards requiring more of the C99
features of the host system when it simplifies things for us, but we
don't have a formalized list at the moment. None of our current test
systems is missing inttypes.h, except Windows. (Obviously, Digital
UNIX 4.0 is not among them, though we do have Tru64 5.1.)

Ken
Date: Wed, 02 Feb 2005 14:05:50 -0800
From: Quanah Gibson-Mount <quanah@stanford.edu>
To: rt-comment@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #2911] krb5-1.4 includes an include file that doesn't exist on alpha-dux40
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.5KiB


--On Wednesday, February 02, 2005 5:03 PM -0500 Ken Raeburn via RT
<rt-comment@krbdev.mit.edu> wrote:

Show quoted text
> On Feb 2, 2005, at 16:44, Quanah Gibson-Mount via RT wrote:
>> I've found that for alpha, the solution to the problem is to:
>>
>> typedef unsigned long long gss_uint64;
>>
>> in gssapi_krb5.h
>
> Actually, on an Alpha, "unsigned long" is probably good enough.
>
>> Where ALPHA is whatever macro is defined to note that this build is
>> happening on an alpha system.
>
> Which we've mostly managed to avoid, so far, with the major exception
> of Windows.
>
> Does your system have stdint.h, or anything else that might define a
> uint64_t type?
>
> We're sort of moving a little towards requiring more of the C99
> features of the host system when it simplifies things for us, but we
> don't have a formalized list at the moment. None of our current test
> systems is missing inttypes.h, except Windows. (Obviously, Digital
> UNIX 4.0 is not among them, though we do have Tru64 5.1.)

Yeah, I found the unsigned long long definition in /usr/include for
u_int64_t:

db.h:typedef unsigned long long u_int64_t;

which I assume is the same as uint64_t. ;)

--Quanah

--
Quanah Gibson-Mount
Principal Software Developer
ITSS/Shared Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html

"These censorship operations against schools and libraries are stronger
than ever in the present religio-political climate. They often focus on
fantasy and sf books, which foster that deadly enemy to bigotry and blind
faith, the imagination." -- Ursula K. Le Guin
From: Ken Raeburn <raeburn@MIT.EDU>
Subject: Re: [krbdev.mit.edu #2911] krb5-1.4 includes an include file that doesn't exist on alpha-dux40
Date: Wed, 2 Feb 2005 18:44:36 -0500
To: rt@krbdev.mit.edu
RT-Send-Cc:
On Feb 2, 2005, at 17:05, Quanah Gibson-Mount via RT wrote:
Show quoted text
> Yeah, I found the unsigned long long definition in /usr/include for
> u_int64_t:
>
> db.h:typedef unsigned long long u_int64_t;
>
> which I assume is the same as uint64_t. ;)

Well, it's close, but it's not the same name. And db.h probably isn't
anything we want to include for getting integer type definitions....
Date: Wed, 02 Feb 2005 16:17:27 -0800
From: Quanah Gibson-Mount <quanah@stanford.edu>
To: rt-comment@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #2911] krb5-1.4 includes an include file that doesn't exist on alpha-dux40
RT-Send-Cc:


--On Wednesday, February 02, 2005 6:44 PM -0500 Ken Raeburn via RT
<rt-comment@krbdev.mit.edu> wrote:

Show quoted text
> On Feb 2, 2005, at 17:05, Quanah Gibson-Mount via RT wrote:
>> Yeah, I found the unsigned long long definition in /usr/include for
>> u_int64_t:
>>
>> db.h:typedef unsigned long long u_int64_t;
>>
>> which I assume is the same as uint64_t. ;)
>
> Well, it's close, but it's not the same name. And db.h probably isn't
> anything we want to include for getting integer type definitions....

Yeah. Unfortunately, there is nothing defining uint64_t that I can find in
either /usr/include/ or /usr/include/sys/

:(

--Quanah

--
Quanah Gibson-Mount
Principal Software Developer
ITSS/Shared Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html

"These censorship operations against schools and libraries are stronger
than ever in the present religio-political climate. They often focus on
fantasy and sf books, which foster that deadly enemy to bigotry and blind
faith, the imagination." -- Ursula K. Le Guin
Date: Thu, 03 Feb 2005 10:23:09 -0800
From: Quanah Gibson-Mount <quanah@stanford.edu>
To: rt-comment@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #2911] krb5-1.4 includes an include file that doesn't exist on alpha-dux40
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.1KiB


--On Wednesday, February 02, 2005 6:44 PM -0500 Ken Raeburn via RT
<rt-comment@krbdev.mit.edu> wrote:

Show quoted text
> On Feb 2, 2005, at 17:05, Quanah Gibson-Mount via RT wrote:
>> Yeah, I found the unsigned long long definition in /usr/include for
>> u_int64_t:
>>
>> db.h:typedef unsigned long long u_int64_t;
>>
>> which I assume is the same as uint64_t. ;)
>
> Well, it's close, but it's not the same name. And db.h probably isn't
> anything we want to include for getting integer type definitions....

Just a note, but configure checks for inttypes.h existence:

/* Define to 1 if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */


but the results of this is apparently not used in that if/else statement. ;)

--Quanah

--
Quanah Gibson-Mount
Principal Software Developer
ITSS/Shared Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html

"These censorship operations against schools and libraries are stronger
than ever in the present religio-political climate. They often focus on
fantasy and sf books, which foster that deadly enemy to bigotry and blind
faith, the imagination." -- Ursula K. Le Guin
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #2911] krb5-1.4 includes an include file that doesn't exist on alpha-dux40
From: Russ Allbery <rra@stanford.edu>
Date: Thu, 03 Feb 2005 10:41:51 -0800
RT-Send-Cc:
Download (untitled) / with headers
text/plain 3.2KiB
Ken Raeburn via RT <rt-comment@krbdev.mit.edu> writes:
Show quoted text
> On Feb 2, 2005, at 16:44, Quanah Gibson-Mount via RT wrote:

Show quoted text
>> I've found that for alpha, the solution to the problem is to:
>>
>> typedef unsigned long long gss_uint64;
>>
>> in gssapi_krb5.h

Show quoted text
> Actually, on an Alpha, "unsigned long" is probably good enough.

Yes, it is.

Show quoted text
> Does your system have stdint.h, or anything else that might define a
> uint64_t type?

Alas, Tru64 4.0F has no such concept. (We're hoping to completely retire
Tru64 support once one last department moves off of it, which is why we've
not gone to the trouble of trying to upgrade to 5.x.)

Show quoted text
> We're sort of moving a little towards requiring more of the C99 features
> of the host system when it simplifies things for us, but we don't have a
> formalized list at the moment. None of our current test systems is
> missing inttypes.h, except Windows. (Obviously, Digital UNIX 4.0 is not
> among them, though we do have Tru64 5.1.)

It's not particularly difficult to fix up uintX_t, if that's the only
problem. Here's what we do for INN for int32_t and uint32_t; something
roughly equivalent should work:

dnl int32.m4 -- Find an appropriate int32_t and uint32_t.
dnl $Id: int32.m4,v 1.1 2003/12/26 03:23:28 rra Exp $
dnl
dnl The public macro exposed by this file is INN_TYPE_INT32_T. This macro
dnl locates the appropriate header files to include for int32_t and uint32_t
dnl or determines how to define those types, and then both includes the
dnl appropriate defines into the generated config.h.

dnl Used to build the type cache name.
AC_DEFUN([_INN_TYPE_CACHE], translit([ac_cv_sizeof_$1], [ *], [_p]))

dnl A modified version of AC_CHECK_SIZEOF that doesn't always AC_DEFINE, but
dnl instead lets you execute shell code based on success or failure. This is
dnl to avoid config.h clutter.
AC_DEFUN([_INN_IF_SIZEOF],
[AC_MSG_CHECKING([size of $1])
AC_CACHE_VAL(_INN_TYPE_CACHE([$1]),
[AC_TRY_RUN([#include <stdio.h>
main()
{
FILE *f = fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof($1));
exit(0);
}], _INN_TYPE_CACHE([$1])=`cat conftestval`, _INN_TYPE_CACHE([$1])=0,
ifelse([$2], , , _INN_TYPE_CACHE([$1])=$2))
])dnl
AC_MSG_RESULT($_INN_TYPE_CACHE([$1]))
if test x"$_INN_TYPE_CACHE([$1])" = x"$3" ; then
ifelse([$4], , :, [$4])
else
ifelse([$5], , :, [$5])
fi
])

dnl This is the beginning of the macro called by the user.
AC_DEFUN([INN_TYPE_INT32_T],
[

dnl Find a 32 bit type, by trying likely candidates. First, check for the
dnl C9X int32_t, then look for something else with a size of four bytes.
_INN_IF_SIZEOF(int, 4, 4, INN_INT32=int,
[_INN_IF_SIZEOF(long, 4, 4, INN_INT32=long,
[_INN_IF_SIZEOF(short, 2, 4, INN_INT32=short)])])

dnl Now, check to see if we need to define int32_t and uint32_t ourselves.
dnl This has to be done after the probes for an appropriately sized integer
dnl type so that we can pass that type to AC_DEFINE_UNQUOTED.
AC_CHECK_TYPE(int32_t, ,
[AC_DEFINE_UNQUOTED([int32_t], [$INN_INT32],
[Define to a 4-byte signed type if <inttypes.h> does not define.])])
AC_CHECK_TYPE(uint32_t, ,
[AC_DEFINE_UNQUOTED([uint32_t], [unsigned $INN_INT32],
[Define to a 4-byte unsigned type if <inttypes.h> does not define.])])
])

--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>