This page mostly concerns the platforms.h header.
Its main purpose in is to let you easily identify which compiler, OS and ISA is being targeted to potentially implement platform-specific code.
External references:
● https://sourceforge.net/p/predef/wiki/Architectures/
● https://sourceforge.net/p/predef/wiki/Compilers/
● https://sourceforge.net/p/predef/wiki/OperatingSystems/
Tested with MSVC v143 from Visual Studio Community 2022.
NP_COMPILER_MSVC
Works, but needs more testing.
NP_COMPILER_CLANG
Works, but needs more testing.
NP_COMPILER_GNUC
NP_COMPILER_MINGW
Supersedes:
NP_COMPILER_GNUC
Tested with Qt's Jom in ReactOS 0.4.14, and nmake on Windows 11 22H2
NP_COMPILER_TCC
NP_COMPILER_UNKNOWN
Tested on Windows 11 22H2 with MSVC.
NP_OS_WINDOWS
NP_ARCH_x64
Tested on Windows 11 22H2 with TCC.
NP_OS_WINDOWS
NP_ARCH_x86
Tested via strings
on Windows 11 22H2 with MSVC amd64_arm64
target.
NP_OS_WINDOWS
NP_ARCH_ARM
NP_ARCH_ARMv8
NP_ARCH_AARCH64
Tested via strings
on Windows 11 22H2 with MSVC amd64_arm
target.
Doesn't compile properly just yet !
NP_OS_WINDOWS
NP_ARCH_ARM
NP_ARCH_ARM_GENERIC
Tested and returned NP_COMPILER_GNUC
as the compiler, needs more testing.
NP_OS_CYGWIN
Tested on ReactOS 0.4.14 x86.
NP_OS_WINDOWS
(May change in the future)NP_ARCH_x86
Tested on Kubuntu 23.10 in a VM with GCC & CLang.
NP_OS_UNIX
NP_OS_LINUX
NP_ARCH_x64
Untested.
Tested on NanoPi R4S with Armbian (23.02.2).
NP_OS_UNIX
NP_OS_LINUX
NP_ARCH_ARM
NP_ARCH_ARMv8
NP_ARCH_AARCH64
Untested, will be done soon.
NP_OS_UNIX
NP_OS_LINUX
NP_ARCH_ARM
NP_ARCH_ARM_GENERIC
NP_OS_UNKNOWN
NP_ARCH_UNKNOWN
NP_DLL_EXPORT
If UNICODE
or _UNICODE
are defined, the non-suffixed text-related will have the macro pointing to their unicode
variant as is expected on Windows platforms.