ladybird/AK/Platform.h
Andreas Kling c452aa891f 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.
2019-07-09 15:48:04 +02:00

12 lines
176 B
C

#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)