+2006-03-30 Ken Raeburn <raeburn@mit.edu>
+
+ * configure.in: Check for inttypes.h and handle it like xom.h and
+ stdint.h. Don't check sizes of any types.
+
2005-08-20 Ken Raeburn <raeburn@mit.edu>
* configure.in: Use K5_AC_INIT instead of AC_INIT.
AC_PROG_AWK
AC_CHECK_HEADERS(stdlib.h sys/types.h limits.h memory.h)
AC_TYPE_SIZE_T
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
AC_CHECK_HEADER(stdint.h,[
include_stdint='awk '\''END{printf("%cinclude <stdint.h>\n", 35);}'\'' < /dev/null'],
include_stdint='echo "/* no stdint.h */"')
AC_SUBST(include_stdint)
+AC_CHECK_HEADER(inttypes.h,[
+ include_inttypes='awk '\''END{printf("%cinclude <inttypes.h>\n", 35);}'\'' < /dev/null'],
+ include_inttypes='echo "/* no inttypes.h */"')
+AC_SUBST(include_inttypes)
AC_CHECK_HEADER(xom.h,[
include_xom='awk '\''END{printf("%cinclude <xom.h>\n", 35);}'\'' < /dev/null'], [
include_xom='echo "/* no xom.h */"'])
2006-03-30 Ken Raeburn <raeburn@mit.edu>
+ * gssapiP_generic.h [!_WIN32]: Include autoconf.h.
+
+ * Makefile.in (include_stdint, include_inttypes): New make
+ macros.
+ (gssapi.h): Use them. Don't pull SIZEOF_ macros from autoconf.h.
+
+ * gssapi.hin (gss_uint32, gss_int32): Define as uint32_t and
+ int32_t, respectively.
+
* util_token.c: Include limits.h.
(der_length_size, der_write_length): Test INT_MAX instead of
SIZEOF_INT.
gssapi_err_generic.h: gssapi_err_generic.et
gssapi_err_generic.c: gssapi_err_generic.et
+include_stdint=@include_stdint@
+include_inttypes=@include_inttypes@
include_xom=@include_xom@
+##DOS##include_stdint=rem
+##DOS##include_inttypes=rem
##DOS##include_xom=rem
gssapi.h: gssapi.hin $(BUILDTOP)/include/autoconf.h
@echo "Creating gssapi.h" ; \
h=gss$$$$; $(RM) $$h; \
(echo "/* This is the gssapi.h prologue. */"; \
- echo "/* It contains some choice pieces of autoconf.h */"; \
- sed -n "/SIZEOF/s//GSS_&/p" < $(BUILDTOP)/include/autoconf.h && \
- $(include_xom)&& \
+ $(include_stdint) && \
+ $(include_inttypes) && \
+ $(include_xom) && \
echo "/* End of gssapi.h prologue. */"&& \
cat $(srcdir)/gssapi.hin )> $$h && \
(set -x; $(MV) $$h $@) ; e=$$?; $(RM) $$h; exit $$e
#if defined(_MSDOS) || defined(_WIN32)
#include <win-mac.h>
-#define GSS_SIZEOF_SHORT SIZEOF_SHORT
-#define GSS_SIZEOF_LONG SIZEOF_LONG
-#define GSS_SIZEOF_INT SIZEOF_INT
#endif
#ifndef KRB5_CALLCONV
* The following type must be defined as the smallest natural unsigned integer
* supported by the platform that has at least 32 bits of precision.
*/
-#if (GSS_SIZEOF_SHORT == 4)
-typedef unsigned short gss_uint32;
-typedef short gss_int32;
-#elif (GSS_SIZEOF_INT == 4)
-typedef unsigned int gss_uint32;
-typedef int gss_int32;
-#elif (GSS_SIZEOF_LONG == 4)
-typedef unsigned long gss_uint32;
-typedef long gss_int32;
-#endif
+typedef uint32_t gss_uint32;
+typedef int32_t gss_int32;
#ifdef OM_STRING
/*
#if defined(_WIN32)
#include "k5-int.h"
#else
+#include "autoconf.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif