macro
If there is a corresponding OS environment, it is 1, otherwise it is 0.
The 'xxx' here refers to the OS name, and details can be found in the src/platforms.h source code.
Note: An compile environment may contain multiple environments at the same time. e.g. Cygwin Environment is a Unix-like environment, but it is also a Windows environment.
| Platform | Macro |
|---|---|
| AIX | __has_aix__ |
| Android | __has_android__ |
| Amdahl UTS | __has_amdahl_uts__ |
| AmigaOS | __has_amiga__ |
| Apollo AEGIS | __has_aegis__ |
| Apollo Domain/OS | __has_apollo__ |
| BeOS | __has_beos__ |
| Blue Gene | __has_blue_gene__ |
| BSD | __has_bsd__ |
| ConvexOS | __has_convex__ |
| Cygwin Environment | __has_cygwin__ |
| DG/UX | __has_dgux__ |
| DYNIX/ptx | __has_dynix_ptx__ |
| eCos | __has_ecos__ |
| EMX Environment | __has_emx__ |
| Haiku | __has_haiku__ |
| HI-UX MPP | __has_hiux_mpp__ |
| HP-US | __has_hpux__ |
| IBM OS/400 | __has_os_400__ |
| INTEGRITY | __has_integrity__ |
| Interix Environment | __has_interix__ |
| IRIX | __has_irix__ |
| Linux | __has_linux__ |
| LynxOS | __has_lunx__ |
| MacOS | __has_mac_os__ |
| Microware OS-9 | __has_microware_os_9__ |
| MINIX | __has_minix__ |
| MinGW | __has_mingw__ |
| MorphOS | __has_morph_os__ |
| MPE/iX | __has_mpe_ix__ |
| MSDOS | __has_dos__ |
| NonStop | __has_non_stop__ |
| Nucleus RTOS | __has_nucleus__ |
| OS/2 | __has_os2__ |
| Palm OS | __has_palmos__ |
| EPLAN9 | __has_eplan9__ |
| Pyramid DC/OSx | __has_pyr__ |
| QNX | __has_qnx__ |
| Reliant UNIX | __has_reliant_unix__ |
| sun | __has_sun__ |
| Solaris | __has_solaris__ |
| SunOS | __has_sunos__ |
| Stratus VOS | __has_vos__ |
| SVR4 Environment | __has_svr4__ |
| Syllable | __has_syllable__ |
| Symbian OS | __has_symbianos__ |
| OSF/1 | __has_ofs1__ |
| Ultrix | __has_ultrix__ |
| UNICOS | __has_unicos__ |
| UNICOS/mp | __has_unicos_mp__ |
| UNIX Enviroment | __has_unix__ |
| UnixWare | __has_unix_ware__ |
| U/Win Environment | __has_uwin__ |
| VMS | __has_vms__ |
| VxWorks | __has_vxworks__ |
| Windows | __has_windows__ |
| Windows CE | __has_windows_ce__ |
| Wind/U Environment | __has_windu__ |
| z/OS | __has_zos__ |
#include <cppp/cppp-platform.h>
#if __has_windows__
#error "We do not support Windows!"
#endif
int main()
{
return 0;
}