From 5736db219e7ec71bf50ad0d66e436aa8724cd9df Mon Sep 17 00:00:00 2001 From: Przemyslaw Skibinski Date: Wed, 21 Dec 2016 09:26:00 +0100 Subject: [PATCH] fix basic types redefinition --- lib/common/mem.h | 3 +++ programs/util.h | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/common/mem.h b/lib/common/mem.h index 32c63dd1..fb73ef09 100644 --- a/lib/common/mem.h +++ b/lib/common/mem.h @@ -46,6 +46,8 @@ MEM_STATIC void MEM_check(void) { MEM_STATIC_ASSERT((sizeof(size_t)==4) || (size /*-************************************************************** * Basic Types *****************************************************************/ +#ifndef BASIC_TYPES_DEFINED +#define BASIC_TYPES_DEFINED #if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) # include typedef uint8_t BYTE; @@ -66,6 +68,7 @@ MEM_STATIC void MEM_check(void) { MEM_STATIC_ASSERT((sizeof(size_t)==4) || (size typedef signed long long S64; typedef ptrdiff_t iPtrDiff; #endif +#endif /*-************************************************************** diff --git a/programs/util.h b/programs/util.h index 3e8aaf5d..409f6d7c 100644 --- a/programs/util.h +++ b/programs/util.h @@ -84,7 +84,9 @@ extern "C" { /*-************************************************************** * Basic Types *****************************************************************/ -#if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) +#ifndef BASIC_TYPES_DEFINED +#define BASIC_TYPES_DEFINED +#if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) # include typedef uint8_t BYTE; typedef uint16_t U16; @@ -101,7 +103,8 @@ extern "C" { typedef signed int S32; typedef unsigned long long U64; typedef signed long long S64; -#endif +#endif +#endif /*-****************************************