[krbdev.mit.edu #2911] krb5-1.4 includes an include file that doesn't exist on alpha-dux40

Russ Allbery via RT rt-comment at krbdev.mit.edu
Thu Feb 3 13:41:57 EST 2005


Ken Raeburn via RT <rt-comment at krbdev.mit.edu> writes:
> 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.

Yes, it is.

> 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.)

> 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 at stanford.edu)             <http://www.eyrie.org/~eagle/>



More information about the krb5-bugs mailing list