mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-21 19:21:44 +00:00
compat.h: Update u/native_t by introducing reg_t from LZ4.
git-svn-id: https://svn.eduke32.com/eduke32@6374 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
366ccd7900
commit
d5f8c7a028
1 changed files with 14 additions and 5 deletions
|
@ -719,12 +719,21 @@ struct Dummy FINAL
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CXXSTD >= 2011 || EDUKE32_MSVC_PREREQ(1800)
|
#if defined(__x86_64__)
|
||||||
using native_t = typename integers_of_size<sizeof(size_t)>::i;
|
// for 32-bit pointers in x86_64 code, such as `gcc -mx32`
|
||||||
using unative_t = typename integers_of_size<sizeof(size_t)>::u;
|
typedef uint64_t reg_t;
|
||||||
|
typedef int64_t sreg_t;
|
||||||
#else
|
#else
|
||||||
typedef ssize_t native_t;
|
typedef size_t reg_t;
|
||||||
typedef size_t unative_t;
|
typedef ssize_t sreg_t
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CXXSTD >= 2011 || EDUKE32_MSVC_PREREQ(1800)
|
||||||
|
using native_t = typename integers_of_size<sizeof(reg_t)>::i;
|
||||||
|
using unative_t = typename integers_of_size<sizeof(reg_t)>::u;
|
||||||
|
#else
|
||||||
|
typedef sreg_t native_t;
|
||||||
|
typedef reg_t unative_t;
|
||||||
#endif
|
#endif
|
||||||
EDUKE32_STATIC_ASSERT(sizeof(native_t) == sizeof(unative_t));
|
EDUKE32_STATIC_ASSERT(sizeof(native_t) == sizeof(unative_t));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue