Sign in Join
Wiki copytemporary

Platform defines: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Useful tips before using platform defines
22
33- [Marco van de Voort: Development Tutorial (a.k.a Build FAQ)](https://www.stack.nl/~marcov/buildfaq.pdf) – general building guidelines
44- [Marco van de Voort: Creating a portable Pascal codebase.](https://www.stack.nl/~marcov/porting.pdf) – general porting guidelines
55- if you need to cast a [[Pointer|pointer]] to an integer for arithmetic or you want to provide a spare field (like [`tag`](https://www.freepascal.org/docs-html/rtl/classes/tcomponent.tag.html) in [`TComponent`](https://www.freepascal.org/docs-html/rtl/classes/tcomponent.html)) that may be used to store a pointer, use [`PtrInt`](https://www.freepascal.org/docs-html/rtl/system/ptrint.html) as signed type, or better [`PtrUInt`](https://www.freepascal.org/docs-html/rtl/system/ptruint.html) as unsigned type.
66
77## Architecture defines
88
99> **Note:** This is a copy of the official [FPC documentation](http://www.freepascal.org/docs-html/prog/progap7.html#x333-348000G) which is the authorative version for the stable FPC version.
1010
11-<thead>
12-
13-</thead>
14-<tbody>
15-
16-</tbody>
11+| define(s) | meaning |
12+|---|---|
13+| General | |
14+| ENDIAN_BIG | big endian |
15+| ENDIAN_LITTLE | little endian |
16+| CPU16 | 16 bit CPU |
17+| CPU32 | 32 bit CPU |
18+| CPU64 | 64 bit CPU |
19+| Specific | |
20+| CPU86 | Intel 8086 and compatible (original PC) |
21+| CPU87 | Intel 8086 and compatible (original PC) |
22+| CPU386, CPUi386 | 386 and compatible (32 bit PC) |
23+| CPUAMD64, CPUX86_64 | AMD64 or Intel 64-bit processor |
24+| CPUIA64 | Intel itanium 64-bit processor |
25+| CPU68 | Motorola 680x0 or compatible CPU |
26+| CPU68K, CPUM68K | Motorola 680x0 or compatible CPU |
27+| CPUM68020 | Motorola 68020 or compatible CPU |
28+| CPUPOWERPC | [[PPC Calling conventions\|PowerPC processor]] (32 or 64 bit) |
29+| CPUPOWERPC32 | PowerPC processor (32 bit) |
30+| CPUPOWERPC64 | PowerPC processor (64 bit) |
31+| CPUSPARC, CPUSPARC32 | SPARC v7 or compatible |
32+| CPUARM | ARM 32 bit processor |
33+| CPUAARCH64 | ARM 64 bit processor |
34+| CPUAVR | AVR 8/16-bit processor |
35+| FPU | |
36+| FPUSOFT | Software emulation of FPU (all types) |
37+| FPUSSE64 | SSE64 FPU on Intel I386 and higher, AMD64. |
38+| FPUSSE | SSE instructions on Intel I386 and higher. |
39+| FPUSSE2 | SSE 2 instructions on Intel I386 and higher. |
40+| FPUSSE3 | SSE 3 instructions on Intel I386 and higher, AMD64. |
41+| FPULIBGCC | GCC library FPU emulation on ARM and M68K. |
42+| FPU68881 | 68881 on M68K. |
43+| FPUFPA | FPA on ARM. |
44+| FPUFPA10 | FPA 10 on ARM. |
45+| FPUFPA11 | FPA 11 on ARM. |
46+| FPUVFP | VFP on ARM. |
47+| FPUX87 | X87 FPU on Intel I386 and higher. |
48+| FPUITANIUM | On Intel Itanium. |
49+| FPUSTANDARD | On PowerPC (32/64 bit). |
50+| FPUHARD | On Sparc. |
1751
1852## Operating system defines
1953
2054In the following tree, you have to follow leaves to their respective roots, in order to determine all defines. To check this information, refer to files in FPC sources: "compiler/systems/i_*.pas".
2155
2256- `ATARI`
2357- `DPMI`: MS-DOS
2458 - `GO32V2`
2559 - `WATCOM`
2660- `EMACS`
2761- `embedded`
2862- `HASAMIGA`
2963 - `AMIGA`
3064 - `AMIGA68K`
3165 - `AMIGAOS4`
3266 - `AROS`
3367 - `MorphOS`
3468- `GBA`: GameBoy Advance
3569- `Java`
3670- `MACOS`: Classic Macintosh (System 7 etc.)
3771- `MSDOS` MS-DOS 16-bit real mode (defined since FPC version 2.7.1)
3872- `NATIVENT`: [[Target NativeNT|NativeNT]]
3973- `NDS`: Nintendo DS
4074- `NETWARE`: NetWare
4175 - `NETWARE_CLIB`: NetWare with classic libc
4276 - `NETWLIBC`, `NETWARE_LIBC`: NetWare with modern libc
4377- `OS2`: OS/2
4478 - `EMX`: emx
4579- `PALMOS`: PalmOS and Garnet OS
4680- `Symbian`: Symbian OS
4781- `UNIX`
4882 - `AIX`
4983 - `ANDROID`
5084 - `BEOS`
5185 - `HAIKU`
5286 - `BSD`
5387 - `DARWIN`: [[Portal:Mac|macOS]] and [[Portal:iOS|iOS]]
5488 - `iPhoneSim`
5589 - `DragonFly`: DragonFlyBSD
5690 - `FREEBSD`: FreeBSD
5791 - `NETBSD`: NetBSD
5892 - `OPENBSD`: OpenBSD
5993 - `LINUX`
6094 - `SUNOS`
6195 - `SOLARIS`
6296 - `QNX`
6397- `WDOSX`
6498- `Wii`
6599- `WINDOWS`: all [[Portal:Windows|Windows]]
66100 - `MSWINDOWS`
67101 - `WIN16`: 16-bit Windows 3.x
68102 - `WIN32`: 32-bit Windows
69103 - `WIN64`: 64-bit Windows
70104 - `WINCE`, `UNDER_CE`, `UNICODE`: Windows CE, Windows mobile
71105
72106## Notes
73107
74108`UNICODE` was defined till FPC 3.0.0, see [[User Changes 3.0|User changes 3.0 § “define UNICODE was changed to FPC_OS_UNICODE”]].
75109
76110## See also
77111
78112- [Delphi Wikia article “FreePascal detection and versioning”](https://delphi.wikia.com/wiki/FreePascal_detection_and_versioning)
79113- [Free Pascal Documentation: Appendix G: Compiler defines during compilation](https://www.freepascal.org/docs-html/prog/progap7.html)
80114
81115---
82116*From the Free Pascal wiki, page "Platform defines", as it stood on 2021-04-01 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
83117Category: Directives

Back to history