From cc907770bdadf49edaaebdfa31a82b3bffa1f46e Mon Sep 17 00:00:00 2001 From: Like Ma Date: Wed, 26 Aug 2020 03:10:06 +0800 Subject: [PATCH] Fix building on AIX 5.1 --- lib/common/mem.h | 6 +++++- lib/legacy/zstd_v01.c | 6 +++++- lib/legacy/zstd_v02.c | 6 +++++- lib/legacy/zstd_v03.c | 6 +++++- lib/legacy/zstd_v04.c | 6 +++++- lib/legacy/zstd_v05.c | 6 +++++- lib/legacy/zstd_v06.c | 6 +++++- lib/legacy/zstd_v07.c | 6 +++++- programs/timefn.h | 6 +++++- 9 files changed, 45 insertions(+), 9 deletions(-) diff --git a/lib/common/mem.h b/lib/common/mem.h index c8361ab1..4728ef76 100644 --- a/lib/common/mem.h +++ b/lib/common/mem.h @@ -45,7 +45,11 @@ extern "C" { * Basic Types *****************************************************************/ #if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) -# include +# if defined(_AIX) +# include +# else +# include /* intptr_t */ +# endif typedef uint8_t BYTE; typedef uint16_t U16; typedef int16_t S16; diff --git a/lib/legacy/zstd_v01.c b/lib/legacy/zstd_v01.c index eb236283..13115bec 100644 --- a/lib/legacy/zstd_v01.c +++ b/lib/legacy/zstd_v01.c @@ -1280,7 +1280,11 @@ static size_t HUF_decompress (void* dst, size_t maxDstSize, const void* cSrc, si * Basic Types *********************************************************/ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ -# include +# if defined(_AIX) +# include +# else +# include /* intptr_t */ +# endif typedef uint8_t BYTE; typedef uint16_t U16; typedef int16_t S16; diff --git a/lib/legacy/zstd_v02.c b/lib/legacy/zstd_v02.c index 32d45a6d..9abb6d03 100644 --- a/lib/legacy/zstd_v02.c +++ b/lib/legacy/zstd_v02.c @@ -89,7 +89,11 @@ extern "C" { * Basic Types *****************************************************************/ #if defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -# include +# if defined(_AIX) +# include +# else +# include /* intptr_t */ +# endif typedef uint8_t BYTE; typedef uint16_t U16; typedef int16_t S16; diff --git a/lib/legacy/zstd_v03.c b/lib/legacy/zstd_v03.c index b541eae2..a19cb205 100644 --- a/lib/legacy/zstd_v03.c +++ b/lib/legacy/zstd_v03.c @@ -90,7 +90,11 @@ extern "C" { * Basic Types *****************************************************************/ #if defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -# include +# if defined(_AIX) +# include +# else +# include /* intptr_t */ +# endif typedef uint8_t BYTE; typedef uint16_t U16; typedef int16_t S16; diff --git a/lib/legacy/zstd_v04.c b/lib/legacy/zstd_v04.c index 19fda898..77d52555 100644 --- a/lib/legacy/zstd_v04.c +++ b/lib/legacy/zstd_v04.c @@ -52,7 +52,11 @@ extern "C" { * Basic Types *****************************************************************/ #if defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -# include +# if defined(_AIX) +# include +# else +# include /* intptr_t */ +# endif typedef uint8_t BYTE; typedef uint16_t U16; typedef int16_t S16; diff --git a/lib/legacy/zstd_v05.c b/lib/legacy/zstd_v05.c index 243d2225..ca8d5c9b 100644 --- a/lib/legacy/zstd_v05.c +++ b/lib/legacy/zstd_v05.c @@ -80,7 +80,11 @@ extern "C" { * Basic Types *****************************************************************/ #if defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -# include +# if defined(_AIX) +# include +# else +# include /* intptr_t */ +# endif typedef uint8_t BYTE; typedef uint16_t U16; typedef int16_t S16; diff --git a/lib/legacy/zstd_v06.c b/lib/legacy/zstd_v06.c index c56f5827..c4ac7dba 100644 --- a/lib/legacy/zstd_v06.c +++ b/lib/legacy/zstd_v06.c @@ -82,7 +82,11 @@ extern "C" { * Basic Types *****************************************************************/ #if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) -# include +# if defined(_AIX) +# include +# else +# include /* intptr_t */ +# endif typedef uint8_t BYTE; typedef uint16_t U16; typedef int16_t S16; diff --git a/lib/legacy/zstd_v07.c b/lib/legacy/zstd_v07.c index 9f3a597f..049ba474 100644 --- a/lib/legacy/zstd_v07.c +++ b/lib/legacy/zstd_v07.c @@ -242,7 +242,11 @@ extern "C" { * Basic Types *****************************************************************/ #if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) -# include +# if defined(_AIX) +# include +# else +# include /* intptr_t */ +# endif typedef uint8_t BYTE; typedef uint16_t U16; typedef int16_t S16; diff --git a/programs/timefn.h b/programs/timefn.h index eb3c1309..5d2818e8 100644 --- a/programs/timefn.h +++ b/programs/timefn.h @@ -28,7 +28,11 @@ extern "C" { ******************************************/ #if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) -# include +# if defined(_AIX) +# include +# else +# include /* intptr_t */ +# endif typedef uint64_t PTime; /* Precise Time */ #else typedef unsigned long long PTime; /* does not support compilers without long long support */