dl
dl_platform.h
浏览该文件的文档.
1
12#pragma once
13
14#define DL_PLATFORM_ERROR 0
15#define DL_PLATFORM_WIN32 1
16#define DL_PLATFORM_LINUX 2
17#define DL_PLATFORM_ANDROID 3
18
19#define DL_PLATFORM DL_PLATFORM_ERROR
20
21#ifdef _WIN32
22#undef DL_PLATFORM
23#define DL_PLATFORM DL_PLATFORM_WIN32
24#endif
25
26#ifdef __linux__
27#undef DL_PLATFORM
28#define DL_PLATFORM DL_PLATFORM_LINUX
29#endif
30
31#ifdef __ANDROID__
32#undef DL_PLATFORM
33#define DL_PLATFORM DL_PLATFORM_ANDROID
34#endif
35
37consteval bool is_x64()
38{
39 return sizeof(void*) == 8;
40}
41
42#define DL_ENDIAN_LITTLE can-not-use
consteval bool is_x64()
是否64位
Definition: dl_platform.h:37