Difference between revisions of "Platform defines"
From Lazarus wiki
Jump to navigationJump to searchJwdietrich (talk | contribs) |
Jwdietrich (talk | contribs) (Template included) |
||
Line 86: | Line 86: | ||
* http://delphi.wikia.com/wiki/FreePascal_detection_and_versioning | * http://delphi.wikia.com/wiki/FreePascal_detection_and_versioning | ||
+ | {{Template:Directives, Defines and Conditionals}} | ||
[[Category:Directives]] | [[Category:Directives]] |
Revision as of 20:59, 2 April 2014
note: the tables in this article may not be complete
Useful tips before using platform defines
- http://www.stack.nl/~marcov/buildfaq.pdf - general building guidelines
- http://www.stack.nl/~marcov/porting.pdf - general porting guidelines
- if you need to cast a pointer to an integer for arithmetic or you want to provide a spare field (like tag in Tcomponent) that may be used to store a pointer use ptrint as signed type, or better ptruint as unsigned type.
Architecture defines
define(s) | meaning |
---|---|
General | |
ENDIAN_BIG | big endian |
ENDIAN_LITTLE | little endian |
CPU16 | 16 bit CPU |
CPU32 | 32 bit CPU |
CPU64 | 64 bit CPU |
Specific | |
CPU86 | 386 and compatible (32 bit PC) |
CPU87 | 386 and compatible (32 bit PC) |
CPU386, CPUi386 | 386 and compatible (32 bit PC) |
CPU68K, CPUM68K | Motorola 680x0 or compatible CPU |
CPUM68020 | Motorola 68020 or compatible CPU |
CPU68 | Motorola 680x0 or compatible CPU |
CPUPOWERPC | PowerPC processor (32 or 64 bit) |
CPUPOWERPC32 | PowerPC processor (32 bit) |
CPUPOWERPC64 | PowerPC processor (64 bit) |
CPUARM | ARM 32 bit processor |
Operating system defines
define(s) | meaning |
---|---|
General | |
BSD | *BSD and Darwin |
UNIX | any UNIX or UNIX-like system. |
MSWINDOWS, WINDOWS | all variants of windows |
Specific | |
LINUX | Linux |
BSD | BSD, OS X, Mac OS X, iOS |
DARWIN | OS X, Mac OS X, iOS |
FREEBSD | FreeBSD |
NETBSD | NetBSD |
SOLARIS | Solaris |
SUNOS | SunOS, Solaris |
WIN32 | 32 bit Windows |
WIN64 | 64 bit Windows |
WINCE | Windows CE, Windows mobile |
GO32V2 | MS DOS (using go32v2 extender) |
See also
Directives, definitions and conditionals definitions |
---|
global compiler directives • local compiler directives Conditional Compiler Options • Conditional compilation • Macros and Conditionals • Platform defines |