new: meet armv7 bus alignment requirements

fixed: ambiguous variable names.
This commit is contained in:
skywind3000
2019-07-23 14:20:31 +08:00
parent 19dbf3af05
commit a4b6748cb5
2 changed files with 18 additions and 7 deletions

13
ikcp.h
View File

@@ -225,7 +225,7 @@ typedef struct IQUEUEHEAD iqueue_head;
//---------------------------------------------------------------------
// WORD ORDER
// BYTE ORDER & ALIGNMENT
//---------------------------------------------------------------------
#ifndef IWORDS_BIG_ENDIAN
#ifdef _BIG_ENDIAN_
@@ -248,6 +248,17 @@ typedef struct IQUEUEHEAD iqueue_head;
#endif
#endif
#ifndef IWORDS_MUST_ALIGN
#if defined(__i386__) || defined(__i386) || defined(_i386_)
#define IWORDS_MUST_ALIGN 0
#elif defined(_M_IX86) || defined(_X86_) || defined(__x86_64__)
#define IWORDS_MUST_ALIGN 0
#elif defined(__amd64) || defined(__amd64__)
#define IWORDS_MUST_ALIGN 0
#else
#define IWORDS_MUST_ALIGN 1
#endif
#endif
//=====================================================================