From f0f60c1a04d664936bcf52e8f46705bdc63e7ad9 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 16 Mar 2015 11:32:07 +0100 Subject: Make uintptr_t global available. * cipher/bufhelp.h: Move include for uintptr_t to ... * src/types.h: here. Check that config.h has been included. Signed-off-by: Werner Koch --- src/types.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/types.h') diff --git a/src/types.h b/src/types.h index 561b74d1..dcdba4ff 100644 --- a/src/types.h +++ b/src/types.h @@ -21,6 +21,9 @@ #ifndef GCRYPT_TYPES_H #define GCRYPT_TYPES_H +#ifndef _GCRYPT_CONFIG_H_INCLUDED +# error config.h must be included before types.h +#endif /* The AC_CHECK_SIZEOF() in configure fails for some machines. * we provide some fallback values here */ @@ -40,6 +43,16 @@ #include +/* Provide uintptr_t */ +#ifdef HAVE_STDINT_H +# include /* uintptr_t */ +#elif defined(HAVE_INTTYPES_H) +# include +#else +/* In this case, uintptr_t is provided by config.h. */ +#endif + + #ifndef HAVE_BYTE_TYPEDEF # undef byte /* In case there is a macro with that name. */ -- cgit v1.2.1