It is a header-only library to detect current platform in C and C++ programming languages.
Considering:
- It does not
#include
header files to check for macros as much as possible. - It does not support obsolete compilers or operating systems.
Conditionally defined macros:
PLATFORM_UNIX
PLATFORM_POSIX
PLATFORM_LINUX
PLATFORM_GNULINUX
PLATFORM_ANDROID
PLATFORM_BSD
PLATFORM_FREEBSD
PLATFORM_NETBSD
PLATFORM_OPENBSD
PLATFORM_DRAGONFLY
PLATFORM_DARWIN
PLATFORM_MACOS
PLATFORM_IPHONE
PLATFORM_IOS
PLATFORM_WATCHOS
PLATFORM_TVOS
PLATFORM_SOLARIS
PLATFORM_MINIX
PLATFORM_AIX
PLATFORM_HPUX
PLATFORM_WINDOWS
PLATFORM_WINDOWS_X64
PLATFORM_WINDOWS_X32
PLATFORM_UNKNOWN
You can simply #include
the header file.
Copyright (C) 2017-2018 Mohamad Sadeq Hojat-ol Eslami
License LGPLv3+: GNU Lesser GPL version 3 or later http://gnu.org/licenses/lgpl.html
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
See LICENSE
file for more information.
Bug-reporting email: [email protected]
Project page: https://github.com/msadeqhe/platform-id/