Platform defines: what changed
Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | 1 | ## Useful tips before using platform defines | |
| 2 | 2 | ||
| 3 | 3 | - [Marco van de Voort: Development Tutorial (a.k.a Build FAQ)](https://www.stack.nl/~marcov/buildfaq.pdf) – general building guidelines | |
| 4 | 4 | - [Marco van de Voort: Creating a portable Pascal codebase.](https://www.stack.nl/~marcov/porting.pdf) – general porting guidelines | |
| 5 | 5 | - 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. | |
| 6 | 6 | ||
| 7 | 7 | ## Architecture defines | |
| 8 | 8 | ||
| 9 | 9 | > **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. | |
| 10 | 10 | ||
| 11 | - | ||
| 12 | 11 | <thead> | |
| 13 | - | ||
| 14 | - | ||
| 15 | - | ||
| 16 | - | ||
| 12 | + | ||
| 17 | 13 | </thead> | |
| 18 | 14 | <tbody> | |
| 19 | - | ||
| 20 | - | ||
| 21 | - | ||
| 22 | - | ||
| 23 | - | ||
| 24 | - | ||
| 25 | - | ||
| 26 | - | ||
| 27 | - | ||
| 28 | - | ||
| 29 | - | ||
| 30 | - | ||
| 31 | - | ||
| 32 | - | ||
| 33 | - | ||
| 34 | - | ||
| 35 | - | ||
| 36 | - | ||
| 37 | - | ||
| 38 | - | ||
| 39 | - | ||
| 40 | - | ||
| 41 | - | ||
| 42 | - | ||
| 43 | - | ||
| 44 | - | ||
| 45 | - | ||
| 46 | - | ||
| 47 | - | ||
| 48 | - | ||
| 49 | - | ||
| 50 | - | ||
| 51 | - | ||
| 52 | - | ||
| 53 | - | ||
| 54 | - | ||
| 55 | - | ||
| 56 | - | ||
| 57 | - | ||
| 58 | - | ||
| 59 | - | ||
| 60 | - | ||
| 61 | - | ||
| 62 | - | ||
| 63 | - | ||
| 64 | - | ||
| 65 | - | ||
| 66 | - | ||
| 67 | - | ||
| 68 | - | ||
| 69 | - | ||
| 70 | - | ||
| 71 | - | ||
| 72 | - | ||
| 73 | - | ||
| 74 | - | ||
| 75 | - | ||
| 76 | - | ||
| 77 | - | ||
| 78 | - | ||
| 79 | - | ||
| 80 | - | ||
| 81 | - | ||
| 82 | - | ||
| 83 | - | ||
| 84 | - | ||
| 85 | - | ||
| 86 | - | ||
| 87 | - | ||
| 88 | - | ||
| 89 | - | ||
| 90 | - | ||
| 91 | - | ||
| 92 | - | ||
| 93 | - | ||
| 94 | - | ||
| 95 | - | ||
| 96 | - | ||
| 97 | - | ||
| 98 | - | ||
| 99 | - | ||
| 100 | - | ||
| 101 | - | ||
| 102 | - | ||
| 103 | - | ||
| 104 | - | ||
| 105 | - | ||
| 106 | - | ||
| 107 | - | ||
| 108 | - | ||
| 109 | - | ||
| 110 | - | ||
| 111 | - | ||
| 112 | - | ||
| 113 | - | ||
| 114 | - | ||
| 115 | - | ||
| 116 | - | ||
| 117 | - | ||
| 118 | - | ||
| 119 | - | ||
| 120 | - | ||
| 121 | - | ||
| 122 | - | ||
| 123 | - | ||
| 124 | - | ||
| 125 | - | ||
| 126 | - | ||
| 127 | - | ||
| 128 | - | ||
| 129 | - | ||
| 130 | - | ||
| 131 | - | ||
| 132 | - | ||
| 133 | - | ||
| 134 | - | ||
| 135 | - | ||
| 136 | - | ||
| 137 | - | ||
| 138 | - | ||
| 139 | - | ||
| 140 | - | ||
| 141 | - | ||
| 142 | - | ||
| 143 | - | ||
| 144 | - | ||
| 145 | - | ||
| 146 | - | ||
| 147 | - | ||
| 148 | - | ||
| 149 | - | ||
| 150 | - | ||
| 151 | - | ||
| 152 | - | ||
| 153 | - | ||
| 154 | - | ||
| 155 | - | ||
| 156 | - | ||
| 157 | - | ||
| 158 | - | ||
| 159 | - | ||
| 160 | - | ||
| 161 | - | ||
| 162 | - | ||
| 163 | - | ||
| 164 | - | ||
| 165 | - | ||
| 166 | - | ||
| 167 | - | ||
| 168 | - | ||
| 169 | - | ||
| 170 | - | ||
| 171 | - | ||
| 15 | + | ||
| 172 | 16 | </tbody> | |
| 173 | - | ||
| 174 | 17 | ||
| 175 | 18 | ## Operating system defines | |
| 176 | 19 | ||
| 177 | 20 | In 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". | |
| 178 | 21 | ||
| 179 | 22 | - `ATARI` | |
| 180 | 23 | - `DPMI`: MS-DOS | |
| 181 | 24 | - `GO32V2` | |
| 182 | 25 | - `WATCOM` | |
| 183 | 26 | - `EMACS` | |
| 184 | 27 | - `embedded` | |
| 185 | 28 | - `HASAMIGA` | |
| 186 | 29 | - `AMIGA` | |
| 187 | 30 | - `AMIGA68K` | |
| 188 | 31 | - `AMIGAOS4` | |
| 189 | 32 | - `AROS` | |
| 190 | 33 | - `MorphOS` | |
| 191 | 34 | - `GBA`: GameBoy Advance | |
| 192 | 35 | - `Java` | |
| 193 | 36 | - `MACOS`: Classic Macintosh (System 7 etc.) | |
| 194 | 37 | - `MSDOS` MS-DOS 16-bit real mode (defined since FPC version 2.7.1) | |
| 195 | 38 | - `NATIVENT`: [[Target NativeNT|NativeNT]] | |
| 196 | 39 | - `NDS`: Nintendo DS | |
| 197 | 40 | - `NETWARE`: NetWare | |
| 198 | 41 | - `NETWARE_CLIB`: NetWare with classic libc | |
| 199 | 42 | - `NETWLIBC`, `NETWARE_LIBC`: NetWare with modern libc | |
| 200 | 43 | - `OS2`: OS/2 | |
| 201 | 44 | - `EMX`: emx | |
| 202 | 45 | - `PALMOS`: PalmOS and Garnet OS | |
| 203 | 46 | - `Symbian`: Symbian OS | |
| 204 | 47 | - `UNIX` | |
| 205 | 48 | - `AIX` | |
| 206 | 49 | - `ANDROID` | |
| 207 | 50 | - `BEOS` | |
| 208 | 51 | - `HAIKU` | |
| 209 | 52 | - `BSD` | |
| 210 | 53 | - `DARWIN`: [[Portal:Mac|macOS]] and [[Portal:iOS|iOS]] | |
| 211 | 54 | - `iPhoneSim` | |
| 212 | 55 | - `DragonFly`: DragonFlyBSD | |
| 213 | 56 | - `FREEBSD`: FreeBSD | |
| 214 | 57 | - `NETBSD`: NetBSD | |
| 215 | 58 | - `OPENBSD`: OpenBSD | |
| 216 | 59 | - `LINUX` | |
| 217 | 60 | - `SUNOS` | |
| 218 | 61 | - `SOLARIS` | |
| 219 | 62 | - `QNX` | |
| 220 | 63 | - `WDOSX` | |
| 221 | 64 | - `Wii` | |
| 222 | 65 | - `WINDOWS`: all [[Portal:Windows|Windows]] | |
| 223 | 66 | - `MSWINDOWS` | |
| 224 | 67 | - `WIN16`: 16-bit Windows 3.x | |
| 225 | 68 | - `WIN32`: 32-bit Windows | |
| 226 | 69 | - `WIN64`: 64-bit Windows | |
| 227 | 70 | - `WINCE`, `UNDER_CE`, `UNICODE`: Windows CE, Windows mobile | |
| 228 | 71 | ||
| 229 | 72 | ## Notes | |
| 230 | 73 | ||
| 231 | 74 | `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”]]. | |
| 232 | 75 | ||
| 233 | 76 | ## See also | |
| 234 | 77 | ||
| 235 | 78 | - [Delphi Wikia article “FreePascal detection and versioning”](https://delphi.wikia.com/wiki/FreePascal_detection_and_versioning) | |
| 236 | 79 | - [Free Pascal Documentation: Appendix G: Compiler defines during compilation](https://www.freepascal.org/docs-html/prog/progap7.html) | |
| 237 | 80 | ||
| 238 | 81 | --- | |
| 239 | 82 | *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).* | |
| 240 | 83 | Category: Directives |
