Go to the documentation of this file.
14#if defined(WIN64) || defined(_WIN64)
16#define CONF_FAMILY_WINDOWS 1
17#define CONF_FAMILY_STRING "windows"
18#define CONF_PLATFORM_WIN64 1
19#define PLATFORM_STRING "win64"
20#elif defined(WIN32) || defined(_WIN32) || defined(__CYGWIN32__) || defined(__MINGW32__)
21#define CONF_FAMILY_WINDOWS 1
22#define CONF_FAMILY_STRING "windows"
23#define CONF_PLATFORM_WIN32 1
24#define PLATFORM_STRING "win32"
28#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
29#define CONF_FAMILY_UNIX 1
30#define CONF_FAMILY_STRING "unix"
31#define CONF_PLATFORM_FREEBSD 1
32#define PLATFORM_STRING "freebsd"
35#if defined(__NetBSD__)
36#define CONF_FAMILY_UNIX 1
37#define CONF_FAMILY_STRING "unix"
38#define CONF_PLATFORM_NETBSD 1
39#define PLATFORM_STRING "netbsd"
42#if defined(__OpenBSD__)
43#define CONF_FAMILY_UNIX 1
44#define CONF_FAMILY_STRING "unix"
45#define CONF_PLATFORM_OPENBSD 1
46#define PLATFORM_STRING "openbsd"
49#if(defined(__LINUX__) || defined(__linux__) || defined(CONF_WEBASM)) && !defined(__ANDROID__)
50#define CONF_FAMILY_UNIX 1
51#define CONF_FAMILY_STRING "unix"
52#define CONF_PLATFORM_LINUX 1
53#define PLATFORM_STRING "linux"
54#define CONF_BACKEND_OPENGL_ES3 1
57#define CONF_BACKEND_OPENGL_ES 1
61#if defined(__ANDROID__)
62#define CONF_FAMILY_UNIX 1
63#define CONF_FAMILY_STRING "unix"
64#define CONF_PLATFORM_ANDROID 1
65#define PLATFORM_STRING "android"
66#define CONF_BACKEND_OPENGL_ES 1
67#define CONF_BACKEND_OPENGL_ES3 1
70#if defined(__GNU__) || defined(__gnu__)
71#define CONF_FAMILY_UNIX 1
72#define CONF_FAMILY_STRING "unix"
73#define CONF_PLATFORM_HURD 1
74#define PLATFORM_STRING "gnu"
77#if defined(MACOSX) || defined(__APPLE__) || defined(__DARWIN__)
78#define CONF_FAMILY_UNIX 1
79#define CONF_FAMILY_STRING "unix"
80#define CONF_PLATFORM_MACOS 1
81#define PLATFORM_STRING "macos"
85#define CONF_FAMILY_UNIX 1
86#define CONF_FAMILY_STRING "unix"
87#define CONF_PLATFORM_SOLARIS 1
88#define PLATFORM_STRING "solaris"
92#if defined(__BeOS) || defined(__BEOS__)
93#define CONF_FAMILY_BEOS 1
94#define CONF_FAMILY_STRING "beos"
95#define CONF_PLATFORM_BEOS 1
96#define PLATFORM_STRING "beos"
100#define CONF_FAMILY_UNIX 1
101#define CONF_FAMILY_STRING "unix"
102#define CONF_PLATFORM_HAIKU 1
103#define PLATFORM_STRING "haiku"
107#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__MINGW32__) && !defined(__sun)
108#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
109#include <sys/endian.h>
114#if __BYTE_ORDER == __LITTLE_ENDIAN
115#define CONF_ARCH_ENDIAN_LITTLE 1
116#elif __BYTE_ORDER == __BIG_ENDIAN
117#define CONF_ARCH_ENDIAN_BIG 1
122#if defined(i386) || defined(__i386__) || defined(__x86__) || defined(CONF_PLATFORM_WIN32)
123#define CONF_ARCH_IA32 1
124#define CONF_ARCH_STRING "ia32"
125#if !defined(CONF_ARCH_ENDIAN_LITTLE) && !defined(CONF_ARCH_ENDIAN_BIG)
126#define CONF_ARCH_ENDIAN_LITTLE 1
130#if defined(__ia64__) || defined(_M_IA64)
131#define CONF_ARCH_IA64 1
132#define CONF_ARCH_STRING "ia64"
133#if !defined(CONF_ARCH_ENDIAN_LITTLE) && !defined(CONF_ARCH_ENDIAN_BIG)
134#define CONF_ARCH_ENDIAN_LITTLE 1
138#if defined(__amd64__) || defined(__x86_64__) || defined(_M_X64)
139#define CONF_ARCH_AMD64 1
140#define CONF_ARCH_STRING "amd64"
141#if !defined(CONF_ARCH_ENDIAN_LITTLE) && !defined(CONF_ARCH_ENDIAN_BIG)
142#define CONF_ARCH_ENDIAN_LITTLE 1
146#if defined(__powerpc__) || defined(__ppc__)
147#define CONF_ARCH_PPC 1
148#define CONF_ARCH_STRING "ppc"
149#if !defined(CONF_ARCH_ENDIAN_LITTLE) && !defined(CONF_ARCH_ENDIAN_BIG)
150#define CONF_ARCH_ENDIAN_BIG 1
154#if defined(__sparc__)
155#define CONF_ARCH_SPARC 1
156#define CONF_ARCH_STRING "sparc"
157#if !defined(CONF_ARCH_ENDIAN_LITTLE) && !defined(CONF_ARCH_ENDIAN_BIG)
158#define CONF_ARCH_ENDIAN_BIG 1
162#if defined(__ARMEB__)
163#define CONF_ARCH_ARM 1
164#define CONF_ARCH_STRING "arm"
165#define CONF_ARCH_ENDIAN_BIG 1
166#elif defined(__ARMEL__)
167#define CONF_ARCH_ARM 1
168#define CONF_ARCH_STRING "arm"
169#define CONF_ARCH_ENDIAN_LITTLE 1
170#elif defined(__aarch64__) || defined(__arm64__) || defined(__ARM_ARCH_ISA_A64)
171#define CONF_ARCH_ARM64 1
172#define CONF_ARCH_STRING "arm64"
173#if defined(__ARM_BIG_ENDIAN)
174#define CONF_ARCH_ENDIAN_BIG 1
176#define CONF_ARCH_ENDIAN_LITTLE 1
180#ifndef CONF_FAMILY_STRING
181#define CONF_FAMILY_STRING "unknown"
184#ifndef PLATFORM_STRING
185#define PLATFORM_STRING "unknown"
188#ifndef PLATFORM_SUFFIX
189#define PLATFORM_SUFFIX ""
192#define CONF_PLATFORM_STRING PLATFORM_STRING PLATFORM_SUFFIX
194#ifndef CONF_ARCH_STRING
195#define CONF_ARCH_STRING "unknown"
198#if defined(CONF_ARCH_ENDIAN_LITTLE)
199#define CONF_ARCH_ENDIAN_STRING "little endian"
200#elif defined(CONF_ARCH_ENDIAN_BIG)
201#define CONF_ARCH_ENDIAN_STRING "big endian"
203#error "Unsupported endianness"