0
0
mirror of https://github.com/lz4/lz4 synced 2026-01-18 17:21:30 +01:00

Merge pull request #1581 from KSSAB/dev

Replaced uint8_t with unsigned char in BYTE typedef for post C99/C++
This commit is contained in:
Yann Collet
2025-06-01 13:32:01 -07:00
committed by GitHub
2 changed files with 10 additions and 10 deletions

View File

@@ -301,12 +301,12 @@ static int LZ4_isAligned(const void* ptr, size_t alignment)
#include <limits.h>
#if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
# include <stdint.h>
typedef uint8_t BYTE;
typedef uint16_t U16;
typedef uint32_t U32;
typedef int32_t S32;
typedef uint64_t U64;
typedef uintptr_t uptrval;
typedef unsigned char BYTE; /*uint8_t not necessarily blessed to alias arbitrary type*/
typedef uint16_t U16;
typedef uint32_t U32;
typedef int32_t S32;
typedef uint64_t U64;
typedef uintptr_t uptrval;
#else
# if UINT_MAX != 4294967295UL
# error "LZ4 code (when not C++ or C99) assumes that sizeof(int) == 4"

View File

@@ -700,10 +700,10 @@ int LZ4_compress_destSize_extState(void* state, const char* src, char* dst, int*
#if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
# include <stdint.h>
typedef int8_t LZ4_i8;
typedef uint8_t LZ4_byte;
typedef uint16_t LZ4_u16;
typedef uint32_t LZ4_u32;
typedef int8_t LZ4_i8;
typedef unsigned char LZ4_byte;
typedef uint16_t LZ4_u16;
typedef uint32_t LZ4_u32;
#else
typedef signed char LZ4_i8;
typedef unsigned char LZ4_byte;