diff options
author | Werner Koch <wk@gnupg.org> | 2015-03-16 11:32:07 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-03-16 11:32:29 +0100 |
commit | f0f60c1a04d664936bcf52e8f46705bdc63e7ad9 (patch) | |
tree | 45df52c478ae34aab2dff0032eb2d2901bf65ed0 /src/types.h | |
parent | 97db8e1a6400d711da65eff93bb418cf55bba12e (diff) | |
download | libgcrypt-f0f60c1a04d664936bcf52e8f46705bdc63e7ad9.tar.gz |
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 <wk@gnupg.org>
Diffstat (limited to 'src/types.h')
-rw-r--r-- | src/types.h | 13 |
1 files changed, 13 insertions, 0 deletions
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 <sys/types.h> +/* Provide uintptr_t */ +#ifdef HAVE_STDINT_H +# include <stdint.h> /* uintptr_t */ +#elif defined(HAVE_INTTYPES_H) +# include <inttypes.h> +#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. */ |