Skip to content

Commit 00b1c9a

Browse files
committed
FIX: trying to fix some of lzma related issues reported by Travis
1 parent 9029737 commit 00b1c9a

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

src/include/sys-lzma.h

+23-15
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,15 @@ typedef unsigned char Byte;
134134
typedef short Int16;
135135
typedef unsigned short UInt16;
136136

137+
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
138+
#include <stdint.h>
139+
typedef uint16_t u16;
140+
typedef int32_t i32;
141+
typedef uint32_t u32;
142+
typedef int64_t i64;
143+
typedef uint64_t u64;
144+
#else
145+
137146
#ifdef __LP64__
138147
typedef int i32;
139148
typedef unsigned int u32;
@@ -144,25 +153,24 @@ typedef unsigned long u32;
144153

145154
#ifdef _SZ_NO_INT_64
146155

147-
/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers.
148-
NOTES: Some code will work incorrectly in that case! */
149-
150-
typedef long i64;
151-
typedef unsigned long u64;
156+
/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers.
157+
NOTES: Some code will work incorrectly in that case! */
152158

153-
#else
159+
typedef long i64;
160+
typedef unsigned long u64;
154161

155-
#if defined(_MSC_VER) || defined(__BORLANDC__)
156-
typedef __int64 i64;
157-
typedef unsigned __int64 u64;
158-
#define UINT64_CONST(n) n
159162
#else
160-
typedef long long int i64;
161-
typedef unsigned long long int u64;
162-
#define UINT64_CONST(n) n ## ULL
163-
#endif
164-
163+
#if defined(_MSC_VER) || defined(__BORLANDC__)
164+
typedef __int64 i64;
165+
typedef unsigned __int64 u64;
166+
#define UINT64_CONST(n) n
167+
#else
168+
typedef long long int i64;
169+
typedef unsigned long long int u64;
170+
#define UINT64_CONST(n) n ## ULL
171+
#endif
165172
#endif
173+
#endif //defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
166174

167175
#ifdef _LZMA_NO_SYSTEM_SIZE_T
168176
typedef u32 SizeT;

0 commit comments

Comments
 (0)