PAL and Platform Macros
The Unix PAL and the portions of the build that contain non-Windows code use a set of macros to probe for platform configuration. They are defined when a host operating system implements particular features, detailed and described in pal/unix/configure.in
. These #define
s include:
-
_PPC_
This is defined when compiling for Motorola PowerPC.
-
_X86_
This is defined when compiling for Intel x86.
-
BIGENDIAN
This is defined on big-endian platforms, and undefined on little-endian platforms.
-
HAVE_CASE_SENSITIVE_FILESYSTEM
This macro is defined to differentiate filesystems that are case-sensitive, such as FreeBSD, from filesystems that are case-insensitive, such as Windows or HFS+, the default and most frequently used Mac OS X filesystem.
-
HAVE_CFSTRING
This is defined if Mac OS X CoreFoundation
CFString
is present.-
HAVE_COMPATIBLE_ASIN
-
HAVE_COMPATIBLE_ACOS
-
HAVE_COMPATIBLE_*
This is defined when C runtime math functions produce Windows-compatible results for edge-case values.
-
HAVE_POLL
This is defined if the
poll( )
system call is implemented.-
HAVE_STRTOK_R
This is defined if the
strok_r( )
API is implemented.-
MMAP_IGNORES_HINT
This is set when the
mmap( )
system call ignores its hint argument.-
PAL_TRY
-
PAL_EXCEPT
-
PAL_EXCEPT_EX
-
PAL_EXCEPT_FILTER
-
PAL_EXCEPT_FILTER_EX
-
PAL_FINALLY
-
PAL_FINALLY_EX
-
PAL_ENDTRY
The file
pal/rotor_pal.h
contains the API definitions for the PAL, as well as these macros, which result in calls against the PAL’s exception-handling ...
Get Shared Source CLI Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.