Skip to content

Commit

Permalink
fix include for AIX
Browse files Browse the repository at this point in the history
apparently, AIX does not support <stdint.h>
even though it advertises being C99 compliant.
  • Loading branch information
Cyan4973 committed Mar 9, 2024
1 parent da79cc1 commit 681dc1d
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions xxhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,11 @@ typedef uint32_t XXH32_hash_t;
#elif !defined (__VMS) \
&& (defined (__cplusplus) \
|| (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) )
# include <stdint.h>
# ifdef _AIX
# include <inttypes.h>
# else
# include <stdint.h>
# endif
typedef uint32_t XXH32_hash_t;

#else
Expand Down Expand Up @@ -863,7 +867,11 @@ typedef uint64_t XXH64_hash_t;
#elif !defined (__VMS) \
&& (defined (__cplusplus) \
|| (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) )
# include <stdint.h>
# ifdef _AIX
# include <inttypes.h>
# else
# include <stdint.h>
# endif
typedef uint64_t XXH64_hash_t;
#else
# include <limits.h>
Expand Down Expand Up @@ -2479,10 +2487,14 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size)
#if !defined (__VMS) \
&& (defined (__cplusplus) \
|| (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) )
# include <stdint.h>
typedef uint8_t xxh_u8;
# ifdef _AIX
# include <inttypes.h>
# else
# include <stdint.h>
# endif
typedef uint8_t xxh_u8;
#else
typedef unsigned char xxh_u8;
typedef unsigned char xxh_u8;
#endif
typedef XXH32_hash_t xxh_u32;

Expand Down

0 comments on commit 681dc1d

Please sign in to comment.