diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2022-07-21 13:08:10 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2022-07-21 13:08:10 +0900 |
commit | 3494140847cb8056d017418fefa25e7bbcfaa32c (patch) | |
tree | a8168ee17b9245633a27a6ab02b5227f741a6e01 /src/types.h | |
parent | 434a58d0e784958d56ad4eceebec10ee97933108 (diff) | |
download | libgcrypt-3494140847cb8056d017418fefa25e7bbcfaa32c.tar.gz |
Cleanup for type definitions of byte, ushort, u32, and u64.
* src/types.h: Use macros defined by configure script.
* src/hmac256.c: Fix for HAVE_U32.
* cipher/poly1305.c: Fix for HAVE_U64.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'src/types.h')
-rw-r--r-- | src/types.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/types.h b/src/types.h index b4f28bc4..8b69dce9 100644 --- a/src/types.h +++ b/src/types.h @@ -54,23 +54,23 @@ -#ifndef HAVE_TYPE_BYTE +#ifndef HAVE_BYTE # undef byte /* In case there is a macro with that name. */ # if !(defined(_WIN32) && defined(cbNDRContext)) /* Windows typedefs byte in the rpc headers. Avoid warning about double definition. */ typedef unsigned char byte; # endif -# define HAVE_TYPE_BYTE +# define HAVE_BYTE #endif -#ifndef HAVE_TYPE_USHORT +#ifndef HAVE_USHORT # undef ushort /* In case there is a macro with that name. */ typedef unsigned short ushort; -# define HAVE_TYPE_USHORT +# define HAVE_USHORT #endif -#ifndef HAVE_TYPE_U16 +#ifndef HAVE_U16 # undef u16 /* In case there is a macro with that name. */ # if SIZEOF_UNSIGNED_INT == 2 typedef unsigned int u16; @@ -79,10 +79,10 @@ # else # error no typedef for u16 # endif -# define HAVE_TYPE_U16 +# define HAVE_U16 #endif -#ifndef HAVE_TYPE_U32 +#ifndef HAVE_U32 # undef u32 /* In case there is a macro with that name. */ # if SIZEOF_UNSIGNED_INT == 4 typedef unsigned int u32; @@ -91,7 +91,7 @@ # else # error no typedef for u32 # endif -# define HAVE_TYPE_U32 +# define HAVE_U32 #endif /* @@ -99,24 +99,24 @@ * the dummy code in cipher/md.c is not available. Examples are * Solaris and IRIX. */ -#ifndef HAVE_TYPE_U64 +#ifndef HAVE_U64 # undef u64 /* In case there is a macro with that name. */ # if SIZEOF_UINT64_T == 8 typedef uint64_t u64; # define U64_C(c) (UINT64_C(c)) -# define HAVE_TYPE_U64 +# define HAVE_U64 # elif SIZEOF_UNSIGNED_INT == 8 typedef unsigned int u64; # define U64_C(c) (c ## U) -# define HAVE_TYPE_U64 +# define HAVE_U64 # elif SIZEOF_UNSIGNED_LONG == 8 typedef unsigned long u64; # define U64_C(c) (c ## UL) -# define HAVE_TYPE_U64 +# define HAVE_U64 # elif SIZEOF_UNSIGNED_LONG_LONG == 8 typedef unsigned long long u64; # define U64_C(c) (c ## ULL) -# define HAVE_TYPE_U64 +# define HAVE_U64 # else # error No way to declare a 64 bit integer type # endif |