add WOLF_C89 clauses to the W64LIT() definitions in wolfssl/wolfcrypt/types.h, and wrap several long long numeric literals with W64LIT() in wolfcrypt/src/{aes.c,blake2b.c,siphash.c};

add WOLF_C89 handling to SP_ULONG_BITS and SP_ULLONG_BITS setup in wolfssl/wolfcrypt/sp_int.h.
This commit is contained in:
Daniel Pouzzner
2023-04-13 16:56:38 -05:00
parent bc3d070629
commit edf95dbcbd
5 changed files with 45 additions and 21 deletions

View File

@@ -174,17 +174,29 @@ decouple library dependencies with standard string, memory and so on.
typedef unsigned long long word64;
#elif defined(SIZEOF_LONG) && SIZEOF_LONG == 8
#define WORD64_AVAILABLE
#define W64LIT(x) x##LL
#ifdef WOLF_C89
#define W64LIT(x) x##L
#else
#define W64LIT(x) x##LL
#endif
typedef long sword64;
typedef unsigned long word64;
#elif defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG == 8
#define WORD64_AVAILABLE
#define W64LIT(x) x##LL
#ifdef WOLF_C89
#define W64LIT(x) x##L
#else
#define W64LIT(x) x##LL
#endif
typedef long long sword64;
typedef unsigned long long word64;
#elif defined(__SIZEOF_LONG_LONG__) && __SIZEOF_LONG_LONG__ == 8
#define WORD64_AVAILABLE
#define W64LIT(x) x##LL
#ifdef WOLF_C89
#define W64LIT(x) x##L
#else
#define W64LIT(x) x##LL
#endif
typedef long long sword64;
typedef unsigned long long word64;
#endif
@@ -971,7 +983,7 @@ typedef struct w64wrapper {
DYNAMIC_TYPE_SNIFFER_PB_BUFFER = 1003,
DYNAMIC_TYPE_SNIFFER_TICKET_ID = 1004,
DYNAMIC_TYPE_SNIFFER_NAMED_KEY = 1005,
DYNAMIC_TYPE_SNIFFER_KEY = 1006,
DYNAMIC_TYPE_SNIFFER_KEY = 1006
};
/* max error buffer string size */