mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 15:47:35 +00:00
AK: Add Platform.h with an ARCH() macro.
You can currently use this to detect the CPU architecture like so: #if ARCH(I386) ... #elif ARCH(X86_64) ... #else ... #endif This will be helpful for separating out architecture-specific code blocks.
This commit is contained in:
parent
149fd7e045
commit
c452aa891f
2 changed files with 13 additions and 1 deletions
12
AK/Platform.h
Normal file
12
AK/Platform.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef __i386__
|
||||
#define AK_ARCH_I386 1
|
||||
#endif
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define AK_ARCH_X86_64 1
|
||||
#endif
|
||||
|
||||
#define ARCH(arch) (defined(AK_ARCH_##arch) && AK_ARCH_##arch)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue