From: Norbert Lange Date: Tue, 14 Dec 2021 21:33:39 +0000 (+0100) Subject: Add typedefs for 8bit (un)signed X-Git-Tag: v1.5.1~1^2~14^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99923dfc1a93479d7024289a87ac5a4749c701a7;p=thirdparty%2Fzstd.git Add typedefs for 8bit (un)signed To make code more expressive, add U8 and S8 typedefs --- diff --git a/contrib/linux-kernel/mem.h b/contrib/linux-kernel/mem.h index dcdd586a9..1d9cc0392 100644 --- a/contrib/linux-kernel/mem.h +++ b/contrib/linux-kernel/mem.h @@ -30,6 +30,8 @@ * Basic Types *****************************************************************/ typedef uint8_t BYTE; +typedef uint8_t U8; +typedef int8_t S8; typedef uint16_t U16; typedef int16_t S16; typedef uint32_t U32; diff --git a/lib/common/mem.h b/lib/common/mem.h index 1c61b7e52..85581c384 100644 --- a/lib/common/mem.h +++ b/lib/common/mem.h @@ -51,6 +51,8 @@ extern "C" { # include /* intptr_t */ # endif typedef uint8_t BYTE; + typedef uint8_t U8; + typedef int8_t S8; typedef uint16_t U16; typedef int16_t S16; typedef uint32_t U32; @@ -63,6 +65,8 @@ extern "C" { # error "this implementation requires char to be exactly 8-bit type" #endif typedef unsigned char BYTE; + typedef unsigned char U8; + typedef signed char S8; #if USHRT_MAX != 65535 # error "this implementation requires short to be exactly 16-bit type" #endif