#endif /* KRB5_AUTOCONF_H */
])
-# Not used yet, but let's find out what we've got on the platforms
-# we're working with....
-AC_CHECK_HEADERS(inttypes.h stdint.h)
-AC_CHECK_TYPES([uint32_t, int32_t, uint64_t, int64_t, uint_least32_t, uintptr_t, uintmax_t, long long], , , [
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#elif defined(HAVE_INTTYPES_H)
-# include <inttypes.h>
-#endif
-])
AC_CHECK_TYPES([struct cmsghdr, struct in_pktinfo, struct in6_pktinfo, struct sockaddr_storage], , , [
#include <sys/types.h>
#include <sys/socket.h>
AC_CHECK_PROG(PERL,perl,perl)
# lib/gssapi
-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 */"'])
AC_SUBST(GSSRPC__SYS_PARAM_H)
AC_SUBST(GSSRPC__NETDB_H)
-AC_CACHE_CHECK([for uint32_t in sys/types.h],
- [krb5_cv_header_sys_types_h_uint32_t],
- [AC_TRY_COMPILE([#include <sys/types.h>],
- [uint32_t i = 0;],
- [krb5_cv_header_sys_types_h_uint32_t=yes],
- [krb5_cv_header_sys_types_h_uint32_t=no])])
-AC_CACHE_CHECK([for uint32_t in stdint.h],
- [krb5_cv_header_stdint_h_uint32_t],
- [AC_TRY_COMPILE([#include <stdint.h>],
- [uint32_t i = 0;],
- [krb5_cv_header_stdint_h_uint32_t=yes],
- [krb5_cv_header_stdint_h_uint32_t=no])])
-AC_CACHE_CHECK([for uint32_t in inttypes.h],
- [krb5_cv_header_inttypes_h_uint32_t],
- [AC_TRY_COMPILE([#include <inttypes.h>],
- [uint32_t i = 0;],
- [krb5_cv_header_inttypes_h_uint32_t=yes],
- [krb5_cv_header_inttypes_h_uint32_t=no])])
-GSSRPC__STDINT_H='/* #include <stdint.h> */'
-GSSRPC__INTTYPES_H='/* #include <inttypes.h> */'
-GSSRPC__FAKE_UINT32='/* #undef GSSRPC__FAKE_INT32 */'
-if test $krb5_cv_header_sys_types_h_uint32_t = yes; then
- : # already included sys/types.h
-else
- if test $krb5_cv_header_stdint_h_uint32_t = yes; then
- GSSRPC__STDINT_H='#include <stdint.h>'
- else
- if test $krb5_cv_header_inttypes_h_uint32_t = yes; then
- GSSRPC__INTTYPES_H='#include <inttypes.h>'
- else
- AC_MSG_WARN([can't find a fixed-width 32-bit type anywhere; faking it])
- GSSRPC__FAKE_UINT32='#define GSSRPC__FAKE_UINT32 1'
- fi
- fi
-fi
-AC_SUBST(GSSRPC__STDINT_H)
-AC_SUBST(GSSRPC__INTTYPES_H)
-AC_SUBST(GSSRPC__FAKE_UINT32)
-
AC_CACHE_CHECK([for BSD type aliases], [krb5_cv_type_bsdaliases],
[AC_TRY_COMPILE(
[#include <sys/types.h>
#include <netinet/in.h>
#include <stdlib.h>
-
-/*
- * Pull in typedefs for fixed-width integers somehow, if they weren't
- * in sys/types.h.
- */
-@GSSRPC__STDINT_H@
-@GSSRPC__INTTYPES_H@
-/* Define if there is no uint32_t in system headers. */
-@GSSRPC__FAKE_UINT32@
-
+#include <stdint.h>
#include <limits.h>
#ifndef GSSRPC__BEGIN_DECLS
#error "Bytes must be exactly 8 bits."
#endif
-/*
- * If no uint32_t in system headers, fake it by looking for a 32-bit
- * two's-complement type. Yes, this stomps on POSIX namespace, but if
- * we get here, we're on a system that's far from being
- * POSIX-compliant anyway.
- */
-#if GSSRPC__FAKE_UINT32
-#if (UINT_MAX == 0xffffffffUL) && (INT_MAX == 0x7fffffffL) \
- && (INT_MIN == -INT_MAX-1)
-typedef int int32_t;
-typedef unsigned int uint32_t;
-#else
-#if (ULONG_MAX == 0xffffffffUL) && (LONG_MAX == 0x7fffffffL) \
- && (LONG_MIN == -LONG_MAX-1)
-typedef long int32_t;
-typedef unsigned long uint32_t;
-#else
-#if (USHRT_MAX == 0xffffffffUL) && (SHRT_MAX == 0x7fffffffL) \
- && (SHRT_MIN == -SHRT_MAX-1)
-typedef short int32_t;
-typedef unsigned short uint32_t;
-#else
-#error "Can't fake up uint32_t."
-#endif
-#endif
-#endif
-#endif /* GSSRPC__FAKE_UINT32 */
-
-#if (LONG_MIN != -LONG_MAX-1) || (INT_MIN != -INT_MAX-1) \
- || (SHRT_MIN != -SHRT_MAX-1)
-#error "Integer types must be two's-complement."
-#endif
-
/* Define if we need to fake up some BSD type aliases. */
#ifndef GSSRPC__BSD_TYPEALIASES /* Allow application to override. */
@GSSRPC__BSD_TYPEALIASES@
#include <assert.h>
#include <string.h>
#include <stdarg.h>
+#include <stdint.h>
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#endif
-
-/* 64-bit support: krb5_ui_8 and krb5_int64.
-
- This should move to krb5.h eventually, but without the namespace
- pollution from the autoconf macros. */
-#if defined(HAVE_STDINT_H) || defined(HAVE_INTTYPES_H)
-# ifdef HAVE_STDINT_H
-# include <stdint.h>
-# endif
-# ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-# endif
-# define INT64_TYPE int64_t
-# define UINT64_TYPE uint64_t
-# define INT64_FMT PRId64
-# define UINT64_FMT PRIu64
-#elif defined(_WIN32)
-# define INT64_TYPE signed __int64
-# define UINT64_TYPE unsigned __int64
-# define INT64_FMT "I64d"
-# define UINT64_FMT "I64u"
-#else /* not Windows, and neither stdint.h nor inttypes.h */
-# define INT64_TYPE signed long long
-# define UINT64_TYPE unsigned long long
-# define INT64_FMT "lld"
-# define UINT64_FMT "llu"
-#endif
+#define INT64_TYPE int64_t
+#define UINT64_TYPE uint64_t
#ifndef SIZE_MAX
# define SIZE_MAX ((size_t)((size_t)0 - 1))
#endif
-#ifndef UINT64_MAX
-# define UINT64_MAX ((UINT64_TYPE)((UINT64_TYPE)0 - 1))
-#endif
-
#ifdef _WIN32
# define SSIZE_MAX ((ssize_t)(SIZE_MAX/2))
#endif
#endif
}
-#ifdef _WIN32
-#define UINT16_TYPE unsigned __int16
-#define UINT32_TYPE unsigned __int32
-#else
#define UINT16_TYPE uint16_t
#define UINT32_TYPE uint32_t
-#endif
static inline void
store_16_n (unsigned int val, void *vp)
#define KRB5_CALLCONV_C
#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#elif defined(HAVE_INTTYPES_H)
-# include <inttypes.h>
-#endif
-
#include "k5-err.h"
/*
#include <stdlib.h>
#include <limits.h> /* for *_MAX */
#include <stdarg.h>
+#include <stdint.h>
#ifndef KRB5INT_BEGIN_DECLS
#if defined(__cplusplus)
* Word-size related definition.
*/
-typedef unsigned char krb5_octet;
-
-#if INT_MAX == 0x7fff
-typedef int krb5_int16;
-typedef unsigned int krb5_ui_2;
-#elif SHRT_MAX == 0x7fff
-typedef short krb5_int16;
-typedef unsigned short krb5_ui_2;
-#else
-#error undefined 16 bit type
-#endif
-
-#if INT_MAX == 0x7fffffffL
-typedef int krb5_int32;
-typedef unsigned int krb5_ui_4;
-#elif LONG_MAX == 0x7fffffffL
-typedef long krb5_int32;
-typedef unsigned long krb5_ui_4;
-#elif SHRT_MAX == 0x7fffffffL
-typedef short krb5_int32;
-typedef unsigned short krb5_ui_4;
-#else
-#error: undefined 32 bit type
-#endif
+typedef uint8_t krb5_octet;
+typedef int16_t krb5_int16;
+typedef uint16_t krb5_ui_2;
+typedef int32_t krb5_int32;
+typedef uint32_t krb5_ui_4;
#define VALID_INT_BITS INT_MAX
#define VALID_UINT_BITS UINT_MAX
gssapi_err_generic.c: gssapi_err_generic.et
##DOS##!if 0
-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
@echo "Creating gssapi.h" ; \
h=gss$$$$; $(RM) $$h; \
(echo "/* This is the gssapi.h prologue. */"; \
- $(include_stdint) && \
- $(include_inttypes) && \
$(include_xom) && \
echo "/* End of gssapi.h prologue. */"&& \
cat $(srcdir)/gssapi.hin )> $$h && \
generate-files-mac: gssapi_krb5.h error_map.h
-##DOS##!if 0
-gssapi_krb5.h: gssapi_krb5.hin
- @echo "Creating gssapi.h" ; \
- h=gss$$$$; $(RM) $$h; \
- (echo "/* This is the gssapi_krb5.h prologue. */"; \
- $(include_stdint) ; \
- echo "/* End of gssapi_krb5.h prologue. */"; \
- cat $(srcdir)/gssapi_krb5.hin )> $$h && \
- (set -x; $(MV) $$h $@) ; e=$$?; $(RM) $$h; exit $$e
-##DOS##!endif
-##DOS### No prologue needed for Windows, the support is
-##DOS### in gssapi_krb5.hin already.
-##DOS##gssapi_krb5.h: gssapi_krb5.hin
-##DOS## $(CP) gssapi_krb5.hin gssapi_krb5.h
+gssapi_krb5.h: $(srcdir)/gssapi_krb5.hin
+ $(CP) $(srcdir)/gssapi_krb5.hin $@
install-headers-unix install::
@set -x; for f in $(EXPORTED_HEADERS) ; \
#include <gssapi/gssapi.h>
#include <gssapi/gssapi_ext.h>
#include <krb5.h>
+#include <stdint.h>
/* C++ friendlyness */
#ifdef __cplusplus
#define gss_krb5_nt_machine_uid_name gss_nt_machine_uid_name
#define gss_krb5_nt_string_uid_name gss_nt_string_uid_name
-
-#if defined(_WIN32)
-typedef unsigned __int64 gss_uint64;
-#else /*windows*/
-#include <inttypes.h>
-typedef uint64_t gss_uint64;
-#endif
-
+typedef uint64_t gss_uint64;
typedef struct gss_krb5_lucid_key {
OM_uint32 type; /* key encryption type */
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
-#ifdef HAVE_STDINT_H
#include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-/* Tru64 5.1: int8_t is defined here, and stdint.h doesn't exist. */
-#include <inttypes.h>
-#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
#endif
#include <errno.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
typedef int32_t prof_int32;
/* Create a vtable profile, possibly with a library handle. The new profile
#include <errno.h>
#include <limits.h>
#include <string.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
struct <NAME>__header {
size_t allocated;