use a consistent style for fixed-size int types

The stdint.h types don't cover 128-bit integers and the underscore makes
them ill suited to usage in function suffixes. Instead, use the common
naming style in the Linux kernel and elsewhere including the ChaCha8
implementation included here.
This commit is contained in:
Daniel Micay 2018-10-04 14:25:16 -04:00
parent 92a33182fb
commit dcd969ae04
6 changed files with 44 additions and 43 deletions

7
util.h
View file

@ -1,6 +1,7 @@
#ifndef UTIL_H
#define UTIL_H
#include <stdint.h>
#include <stdnoreturn.h>
#define likely(x) __builtin_expect(!!(x), 1)
@ -19,4 +20,10 @@ static inline int ffzl(long x) {
COLD noreturn void fatal_error(const char *s);
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef unsigned __int128 u128;
#endif