VirtualBox

Changeset 68572 in vbox


Ignore:
Timestamp:
Aug 31, 2017 12:10:45 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
117789
Message:

merging vbglioc r117744: iprt: Introducing RT_FAR and friends to deal with the world of 16-bit compilers. Made iprt/types.h somewhat 16-bit safe (explicit far pointers, int type fixes).

Location:
trunk/include/iprt
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asm-amd64-x86-watcom-16.h

    r62473 r68572  
    3030#define ___iprt_asm_amd64_x86_watcom_16_h
    3131
    32 #if !RT_FAR_DATA
     32#if !RT_DATA_IS_FAR
    3333# error "Only works with far data pointers!"
    3434#endif
  • trunk/include/iprt/asm-watcom-x86-16.h

    r62473 r68572  
    3030#define ___iprt_asm_watcom_x86_16_h
    3131
    32 #if !RT_FAR_DATA
     32#if !RT_DATA_IS_FAR
    3333# error "Only works with far data pointers!"
    3434#endif
  • trunk/include/iprt/asm.h

    r65816 r68572  
    535535DECLINLINE(void *) ASMAtomicXchgPtr(void * volatile *ppv, const void *pv)
    536536{
    537 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     537#if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    538538    return (void *)ASMAtomicXchgU32((volatile uint32_t *)(void *)ppv, (uint32_t)pv);
    539539#elif ARCH_BITS == 64
     
    590590DECLINLINE(RTR0PTR) ASMAtomicXchgR0Ptr(RTR0PTR volatile *ppvR0, RTR0PTR pvR0)
    591591{
    592 #if R0_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     592#if R0_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    593593    return (RTR0PTR)ASMAtomicXchgU32((volatile uint32_t *)(void *)ppvR0, (uint32_t)pvR0);
    594594#elif R0_ARCH_BITS == 64
     
    609609DECLINLINE(RTR3PTR) ASMAtomicXchgR3Ptr(RTR3PTR volatile *ppvR3, RTR3PTR pvR3)
    610610{
    611 #if R3_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     611#if R3_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    612612    return (RTR3PTR)ASMAtomicXchgU32((volatile uint32_t *)(void *)ppvR3, (uint32_t)pvR3);
    613613#elif R3_ARCH_BITS == 64
     
    628628 * @remarks This doesn't currently work for all handles (like RTFILE).
    629629 */
    630 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     630#if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    631631# define ASMAtomicXchgHandle(ph, hNew, phRes) \
    632632   do { \
     
    963963DECLINLINE(bool) ASMAtomicCmpXchgPtrVoid(void * volatile *ppv, const void *pvNew, const void *pvOld)
    964964{
    965 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     965#if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    966966    return ASMAtomicCmpXchgU32((volatile uint32_t *)(void *)ppv, (uint32_t)pvNew, (uint32_t)pvOld);
    967967#elif ARCH_BITS == 64
     
    10141014 * @remarks x86: Requires a 486 or later.
    10151015 */
    1016 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     1016#if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    10171017# define ASMAtomicCmpXchgHandle(ph, hNew, hOld, fRc) \
    10181018   do { \
     
    12731273 * @remarks This doesn't currently work for all handles (like RTFILE).
    12741274 */
    1275 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     1275#if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    12761276# define ASMAtomicCmpXchgExHandle(ph, hNew, hOld, fRc, phOldVal) \
    12771277    do { \
     
    13351335DECLINLINE(bool) ASMAtomicCmpXchgExPtrVoid(void * volatile *ppv, const void *pvNew, const void *pvOld, void **ppvOld)
    13361336{
    1337 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     1337#if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    13381338    return ASMAtomicCmpXchgExU32((volatile uint32_t *)(void *)ppv, (uint32_t)pvNew, (uint32_t)pvOld, (uint32_t *)ppvOld);
    13391339#elif ARCH_BITS == 64
     
    19451945DECLINLINE(size_t) ASMAtomicUoReadZ(size_t volatile *pcb)
    19461946{
    1947 #if ARCH_BITS == 64 || (ARCH_BITS == 16 && RT_FAR_DATA)
     1947#if ARCH_BITS == 64 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    19481948    return ASMAtomicUoReadU64((uint64_t volatile *)pcb);
    19491949#elif ARCH_BITS == 32
     
    19691969DECLINLINE(void *) ASMAtomicReadPtr(void * volatile *ppv)
    19701970{
    1971 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     1971#if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    19721972    return (void *)ASMAtomicReadU32((volatile uint32_t *)(void *)ppv);
    19731973#elif ARCH_BITS == 64
     
    20102010DECLINLINE(void *) ASMAtomicUoReadPtr(void * volatile *ppv)
    20112011{
    2012 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     2012#if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    20132013    return (void *)ASMAtomicUoReadU32((volatile uint32_t *)(void *)ppv);
    20142014#elif ARCH_BITS == 64
     
    20742074 * @remarks This doesn't currently work for all handles (like RTFILE).
    20752075 */
    2076 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     2076#if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    20772077# define ASMAtomicReadHandle(ph, phRes) \
    20782078    do { \
     
    21012101 * @remarks This doesn't currently work for all handles (like RTFILE).
    21022102 */
    2103 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     2103#if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    21042104# define ASMAtomicUoReadHandle(ph, phRes) \
    21052105    do { \
     
    24042404DECLINLINE(void) ASMAtomicWritePtrVoid(void * volatile *ppv, const void *pv)
    24052405{
    2406 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     2406#if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    24072407    ASMAtomicWriteU32((volatile uint32_t *)(void *)ppv, (uint32_t)pv);
    24082408#elif ARCH_BITS == 64
     
    25482548 * @remarks This doesn't currently work for all handles (like RTFILE).
    25492549 */
    2550 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     2550#if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    25512551# define ASMAtomicWriteHandle(ph, hNew) \
    25522552    do { \
     
    25732573 * @remarks This doesn't currently work for all handles (like RTFILE).
    25742574 */
    2575 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_FAR_DATA)
     2575#if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR)
    25762576# define ASMAtomicUoWriteHandle(ph, hNew) \
    25772577    do { \
  • trunk/include/iprt/cdefs.h

    r67187 r68572  
    12941294 * @param   type    The return type of the function declaration.
    12951295 */
    1296 #define DECLCALLBACK(type)      type RTCALL
     1296#define DECLCALLBACK(type)      type RT_FAR_CODE RTCALL
    12971297
    12981298/** @def DECLCALLBACKPTR
     
    13041304# define DECLCALLBACKPTR(type, name)    type (* RTCALL name)
    13051305#else
    1306 # define DECLCALLBACKPTR(type, name)    type (RTCALL * name)
     1306# define DECLCALLBACKPTR(type, name)    type (RT_FAR_CODE RTCALL * name)
    13071307#endif
    13081308
     
    13151315# define DECLCALLBACKMEMBER(type, name) type (* RTCALL name)
    13161316#else
    1317 # define DECLCALLBACKMEMBER(type, name) type (RTCALL * name)
     1317# define DECLCALLBACKMEMBER(type, name) type (RT_FAR_CODE RTCALL * name)
    13181318#endif
    13191319
     
    36403640#endif
    36413641
    3642 /** @def RT_FAR_DATA
     3642/** @def RT_DATA_IS_FAR
    36433643 * Set to 1 if we're in 16-bit mode and use far pointers.
    36443644 */
    36453645#if ARCH_BITS == 16 && defined(__WATCOMC__) \
    36463646  && (defined(__COMPACT__) || defined(__LARGE__))
    3647 # define RT_FAR_DATA 1
    3648 #else
    3649 # define RT_FAR_DATA 0
    3650 #endif
     3647# define RT_DATA_IS_FAR 1
     3648#else
     3649# define RT_DATA_IS_FAR 0
     3650#endif
     3651
     3652/** @def RT_FAR
     3653 * For indicating far pointers in 16-bit code.
     3654 * Does nothing in 32-bit and 64-bit code. */
     3655/** @def RT_NEAR
     3656 * For indicating near pointers in 16-bit code.
     3657 * Does nothing in 32-bit and 64-bit code. */
     3658/** @def RT_FAR_CODE
     3659 * For indicating far 16-bit functions.
     3660 * Does nothing in 32-bit and 64-bit code. */
     3661/** @def RT_NEAR_CODE
     3662 * For indicating near 16-bit functions.
     3663 * Does nothing in 32-bit and 64-bit code. */
     3664/** @def RT_FAR_DATA
     3665 * For indicating far 16-bit external data, i.e. in a segment other than DATA16.
     3666 * Does nothing in 32-bit and 64-bit code. */
     3667#if ARCH_BITS == 16
     3668# define RT_FAR            __far
     3669# define RT_NEAR           __near
     3670# define RT_FAR_CODE       __far
     3671# define RT_NEAR_CODE      __near
     3672# define RT_FAR_DATA       __far
     3673#else
     3674# define RT_FAR
     3675# define RT_NEAR
     3676# define RT_FAR_CODE
     3677# define RT_NEAR_CODE
     3678# define RT_FAR_DATA
     3679#endif
     3680
    36513681
    36523682/** @} */
  • trunk/include/iprt/types.h

    r68317 r68572  
    337337} RTUINT16U;
    338338/** Pointer to a 16-bit unsigned integer union. */
    339 typedef RTUINT16U *PRTUINT16U;
     339typedef RTUINT16U RT_FAR *PRTUINT16U;
    340340/** Pointer to a const 32-bit unsigned integer union. */
    341 typedef const RTUINT16U *PCRTUINT16U;
     341typedef const RTUINT16U RT_FAR *PCRTUINT16U;
    342342
    343343
     
    380380} RTUINT32U;
    381381/** Pointer to a 32-bit unsigned integer union. */
    382 typedef RTUINT32U *PRTUINT32U;
     382typedef RTUINT32U RT_FAR *PRTUINT32U;
    383383/** Pointer to a const 32-bit unsigned integer union. */
    384 typedef const RTUINT32U *PCRTUINT32U;
     384typedef const RTUINT32U RT_FAR *PCRTUINT32U;
    385385
    386386
     
    440440} RTUINT64U;
    441441/** Pointer to a 64-bit unsigned integer union. */
    442 typedef RTUINT64U *PRTUINT64U;
     442typedef RTUINT64U RT_FAR *PRTUINT64U;
    443443/** Pointer to a const 64-bit unsigned integer union. */
    444 typedef const RTUINT64U *PCRTUINT64U;
     444typedef const RTUINT64U RT_FAR *PCRTUINT64U;
    445445
    446446
     
    530530#pragma pack()
    531531/** Pointer to a 128-bit unsigned integer union. */
    532 typedef RTUINT128U *PRTUINT128U;
     532typedef RTUINT128U RT_FAR *PRTUINT128U;
    533533/** Pointer to a const 128-bit unsigned integer union. */
    534 typedef const RTUINT128U *PCRTUINT128U;
     534typedef const RTUINT128U RT_FAR *PCRTUINT128U;
    535535
    536536/** @def RTUINT128_INIT
     
    660660#pragma pack()
    661661/** Pointer to a 256-bit unsigned integer union. */
    662 typedef RTUINT256U *PRTUINT256U;
     662typedef RTUINT256U RT_FAR *PRTUINT256U;
    663663/** Pointer to a const 256-bit unsigned integer union. */
    664 typedef const RTUINT256U *PCRTUINT256U;
     664typedef const RTUINT256U RT_FAR *PCRTUINT256U;
    665665
    666666/** @def RTUINT256_INIT
     
    865865#pragma pack()
    866866/** Pointer to a 512-bit unsigned integer union. */
    867 typedef RTUINT512U *PRTUINT512U;
     867typedef RTUINT512U RT_FAR *PRTUINT512U;
    868868/** Pointer to a const 512-bit unsigned integer union. */
    869 typedef const RTUINT512U *PCRTUINT512U;
     869typedef const RTUINT512U RT_FAR *PCRTUINT512U;
    870870
    871871/** @def RTUINT512_INIT
     
    951951} RTFLOAT64U;
    952952/** Pointer to a double precision floating point format union. */
    953 typedef RTFLOAT64U *PRTFLOAT64U;
     953typedef RTFLOAT64U RT_FAR *PRTFLOAT64U;
    954954/** Pointer to a const double precision floating point format union. */
    955 typedef const RTFLOAT64U *PCRTFLOAT64U;
     955typedef const RTFLOAT64U RT_FAR *PCRTFLOAT64U;
    956956
    957957
     
    995995#pragma pack()
    996996/** Pointer to a extended precision floating point format union. */
    997 typedef RTFLOAT80U *PRTFLOAT80U;
     997typedef RTFLOAT80U RT_FAR *PRTFLOAT80U;
    998998/** Pointer to a const extended precision floating point format union. */
    999 typedef const RTFLOAT80U *PCRTFLOAT80U;
     999typedef const RTFLOAT80U RT_FAR *PCRTFLOAT80U;
    10001000
    10011001
     
    10971097/** Pointer to a extended precision floating point format union, 2nd
    10981098 * variant. */
    1099 typedef RTFLOAT80U2 *PRTFLOAT80U2;
     1099typedef RTFLOAT80U2 RT_FAR *PRTFLOAT80U2;
    11001100/** Pointer to a const extended precision floating point format union, 2nd
    11011101 * variant. */
    1102 typedef const RTFLOAT80U2 *PCRTFLOAT80U2;
     1102typedef const RTFLOAT80U2 RT_FAR *PCRTFLOAT80U2;
    11031103
    11041104#endif /* uint16_t bitfields doesn't work */
     
    11301130
    11311131/** Millisecond interval. */
    1132 typedef uint32_t            RTMSINTERVAL;
     1132typedef uint32_t                        RTMSINTERVAL;
    11331133/** Pointer to a millisecond interval. */
    1134 typedef RTMSINTERVAL       *PRTMSINTERVAL;
     1134typedef RTMSINTERVAL            RT_FAR *PRTMSINTERVAL;
    11351135/** Pointer to a const millisecond interval. */
    1136 typedef const RTMSINTERVAL *PCRTMSINTERVAL;
     1136typedef const RTMSINTERVAL      RT_FAR *PCRTMSINTERVAL;
    11371137
    11381138/** Pointer to a time spec structure. */
    1139 typedef struct RTTIMESPEC  *PRTTIMESPEC;
     1139typedef struct RTTIMESPEC       RT_FAR *PRTTIMESPEC;
    11401140/** Pointer to a const time spec structure. */
    1141 typedef const struct RTTIMESPEC *PCRTTIMESPEC;
     1141typedef const struct RTTIMESPEC RT_FAR *PCRTTIMESPEC;
    11421142
    11431143
     
    11491149/** Signed integer which can contain both GC and HC pointers. */
    11501150#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16)
    1151 typedef int32_t         RTINTPTR;
     1151typedef int32_t                 RTINTPTR;
    11521152#elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64)
    1153 typedef int64_t         RTINTPTR;
     1153typedef int64_t                 RTINTPTR;
    11541154#else
    11551155#  error Unsupported HC_ARCH_BITS and/or GC_ARCH_BITS values.
    11561156#endif
    11571157/** Pointer to signed integer which can contain both GC and HC pointers. */
    1158 typedef RTINTPTR       *PRTINTPTR;
     1158typedef RTINTPTR        RT_FAR *PRTINTPTR;
    11591159/** Pointer const to signed integer which can contain both GC and HC pointers. */
    1160 typedef const RTINTPTR *PCRTINTPTR;
     1160typedef const RTINTPTR  RT_FAR *PCRTINTPTR;
    11611161/** The maximum value the RTINTPTR type can hold. */
    11621162#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16)
     
    11691169/** The minimum value the RTINTPTR type can hold. */
    11701170#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16)
    1171 # define RTINTPTR_MIN   INT32_MIN
     1171# define RTINTPTR_MIN           INT32_MIN
    11721172#elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64)
    1173 # define RTINTPTR_MIN   INT64_MIN
     1173# define RTINTPTR_MIN           INT64_MIN
    11741174#else
    11751175#  error Unsupported HC_ARCH_BITS and/or GC_ARCH_BITS values.
     
    11781178/** Unsigned integer which can contain both GC and HC pointers. */
    11791179#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16)
    1180 typedef uint32_t        RTUINTPTR;
     1180typedef uint32_t                RTUINTPTR;
    11811181#elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64)
    1182 typedef uint64_t        RTUINTPTR;
     1182typedef uint64_t                RTUINTPTR;
    11831183#else
    11841184#  error Unsupported HC_ARCH_BITS and/or GC_ARCH_BITS values.
    11851185#endif
    11861186/** Pointer to unsigned integer which can contain both GC and HC pointers. */
    1187 typedef RTUINTPTR      *PRTUINTPTR;
     1187typedef RTUINTPTR       RT_FAR *PRTUINTPTR;
    11881188/** Pointer const to unsigned integer which can contain both GC and HC pointers. */
    1189 typedef const RTUINTPTR *PCRTUINTPTR;
     1189typedef const RTUINTPTR RT_FAR *PCRTUINTPTR;
    11901190/** The maximum value the RTUINTPTR type can hold. */
    11911191#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16)
    1192 # define RTUINTPTR_MAX  UINT32_MAX
     1192# define RTUINTPTR_MAX          UINT32_MAX
    11931193#elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64)
    1194 # define RTUINTPTR_MAX  UINT64_MAX
     1194# define RTUINTPTR_MAX          UINT64_MAX
    11951195#else
    11961196#  error Unsupported HC_ARCH_BITS and/or GC_ARCH_BITS values.
     
    11981198
    11991199/** Signed integer. */
    1200 typedef int32_t         RTINT;
     1200typedef int32_t                 RTINT;
    12011201/** Pointer to signed integer. */
    1202 typedef RTINT          *PRTINT;
     1202typedef RTINT           RT_FAR *PRTINT;
    12031203/** Pointer to const signed integer. */
    1204 typedef const RTINT    *PCRTINT;
     1204typedef const RTINT     RT_FAR *PCRTINT;
    12051205
    12061206/** Unsigned integer. */
    1207 typedef uint32_t        RTUINT;
     1207typedef uint32_t                RTUINT;
    12081208/** Pointer to unsigned integer. */
    1209 typedef RTUINT         *PRTUINT;
     1209typedef RTUINT          RT_FAR *PRTUINT;
    12101210/** Pointer to const unsigned integer. */
    1211 typedef const RTUINT   *PCRTUINT;
     1211typedef const RTUINT    RT_FAR *PCRTUINT;
    12121212
    12131213/** A file offset / size (off_t). */
    1214 typedef int64_t         RTFOFF;
     1214typedef int64_t                 RTFOFF;
    12151215/** Pointer to a file offset / size. */
    1216 typedef RTFOFF         *PRTFOFF;
     1216typedef RTFOFF          RT_FAR *PRTFOFF;
    12171217/** The max value for RTFOFF. */
    1218 #define RTFOFF_MAX      INT64_MAX
     1218#define RTFOFF_MAX              INT64_MAX
    12191219/** The min value for RTFOFF. */
    1220 #define RTFOFF_MIN      INT64_MIN
     1220#define RTFOFF_MIN              INT64_MIN
    12211221
    12221222/** File mode (see iprt/fs.h). */
    1223 typedef uint32_t        RTFMODE;
     1223typedef uint32_t                RTFMODE;
    12241224/** Pointer to file mode. */
    1225 typedef RTFMODE        *PRTFMODE;
     1225typedef RTFMODE         RT_FAR *PRTFMODE;
    12261226
    12271227/** Device unix number. */
    1228 typedef uint32_t        RTDEV;
     1228typedef uint32_t                RTDEV;
    12291229/** Pointer to a device unix number. */
    1230 typedef RTDEV          *PRTDEV;
     1230typedef RTDEV           RT_FAR *PRTDEV;
    12311231
    12321232/** @name RTDEV Macros
     
    12541254
    12551255/** i-node number. */
    1256 typedef uint64_t        RTINODE;
     1256typedef uint64_t                RTINODE;
    12571257/** Pointer to a i-node number. */
    1258 typedef RTINODE        *PRTINODE;
     1258typedef RTINODE         RT_FAR *PRTINODE;
    12591259
    12601260/** User id. */
    1261 typedef uint32_t        RTUID;
     1261typedef uint32_t                RTUID;
    12621262/** Pointer to a user id. */
    1263 typedef RTUID          *PRTUID;
     1263typedef RTUID           RT_FAR *PRTUID;
    12641264/** NIL user id.
    12651265 * @todo check this for portability! */
    1266 #define NIL_RTUID       (~(RTUID)0)
     1266#define NIL_RTUID               (~(RTUID)0)
    12671267
    12681268/** Group id. */
    1269 typedef uint32_t        RTGID;
     1269typedef uint32_t                RTGID;
    12701270/** Pointer to a group id. */
    1271 typedef RTGID          *PRTGID;
     1271typedef RTGID           RT_FAR *PRTGID;
    12721272/** NIL group id.
    12731273 * @todo check this for portability! */
    1274 #define NIL_RTGID       (~(RTGID)0)
     1274#define NIL_RTGID               (~(RTGID)0)
    12751275
    12761276/** I/O Port. */
    1277 typedef uint16_t        RTIOPORT;
     1277typedef uint16_t                RTIOPORT;
    12781278/** Pointer to I/O Port. */
    1279 typedef RTIOPORT       *PRTIOPORT;
     1279typedef RTIOPORT        RT_FAR *PRTIOPORT;
    12801280/** Pointer to const I/O Port. */
    1281 typedef const RTIOPORT *PCRTIOPORT;
     1281typedef const RTIOPORT  RT_FAR *PCRTIOPORT;
    12821282
    12831283/** Selector. */
    1284 typedef uint16_t        RTSEL;
     1284typedef uint16_t                RTSEL;
    12851285/** Pointer to selector. */
    1286 typedef RTSEL          *PRTSEL;
     1286typedef RTSEL           RT_FAR *PRTSEL;
    12871287/** Pointer to const selector. */
    1288 typedef const RTSEL    *PCRTSEL;
     1288typedef const RTSEL     RT_FAR *PCRTSEL;
    12891289/** Max selector value. */
    1290 #define RTSEL_MAX       UINT16_MAX
     1290#define RTSEL_MAX               UINT16_MAX
    12911291
    12921292/** Far 16-bit pointer. */
     
    12991299#pragma pack()
    13001300/** Pointer to Far 16-bit pointer. */
    1301 typedef RTFAR16 *PRTFAR16;
     1301typedef RTFAR16 RT_FAR *PRTFAR16;
    13021302/** Pointer to const Far 16-bit pointer. */
    1303 typedef const RTFAR16 *PCRTFAR16;
     1303typedef const RTFAR16 RT_FAR *PCRTFAR16;
    13041304
    13051305/** Far 32-bit pointer. */
     
    13121312#pragma pack()
    13131313/** Pointer to Far 32-bit pointer. */
    1314 typedef RTFAR32 *PRTFAR32;
     1314typedef RTFAR32 RT_FAR *PRTFAR32;
    13151315/** Pointer to const Far 32-bit pointer. */
    1316 typedef const RTFAR32 *PCRTFAR32;
     1316typedef const RTFAR32 RT_FAR *PCRTFAR32;
    13171317
    13181318/** Far 64-bit pointer. */
     
    13251325#pragma pack()
    13261326/** Pointer to Far 64-bit pointer. */
    1327 typedef RTFAR64 *PRTFAR64;
     1327typedef RTFAR64 RT_FAR *PRTFAR64;
    13281328/** Pointer to const Far 64-bit pointer. */
    1329 typedef const RTFAR64 *PCRTFAR64;
     1329typedef const RTFAR64 RT_FAR *PCRTFAR64;
    13301330
    13311331/** @} */
     
    13381338/** HC Natural signed integer.
    13391339 * @deprecated silly type. */
    1340 typedef int32_t             RTHCINT;
     1340typedef int32_t                 RTHCINT;
    13411341/** Pointer to HC Natural signed integer.
    13421342 * @deprecated silly type. */
    1343 typedef RTHCINT           *PRTHCINT;
     1343typedef RTHCINT         RT_FAR *PRTHCINT;
    13441344/** Pointer to const HC Natural signed integer.
    13451345 * @deprecated silly type. */
    1346 typedef const RTHCINT     *PCRTHCINT;
     1346typedef const RTHCINT   RT_FAR *PCRTHCINT;
    13471347
    13481348/** HC Natural unsigned integer.
    13491349 * @deprecated silly type. */
    1350 typedef uint32_t            RTHCUINT;
     1350typedef uint32_t                RTHCUINT;
    13511351/** Pointer to HC Natural unsigned integer.
    13521352 * @deprecated silly type. */
    1353 typedef RTHCUINT          *PRTHCUINT;
     1353typedef RTHCUINT        RT_FAR *PRTHCUINT;
    13541354/** Pointer to const HC Natural unsigned integer.
    13551355 * @deprecated silly type. */
    1356 typedef const RTHCUINT    *PCRTHCUINT;
     1356typedef const RTHCUINT  RT_FAR *PCRTHCUINT;
    13571357
    13581358
    13591359/** Signed integer which can contain a HC pointer. */
    1360 #if HC_ARCH_BITS == 32
    1361 typedef int32_t             RTHCINTPTR;
     1360#if HC_ARCH_BITS == 32 || HC_ARCH_BITS == 16
     1361typedef int32_t                 RTHCINTPTR;
    13621362#elif HC_ARCH_BITS == 64
    1363 typedef int64_t             RTHCINTPTR;
    1364 #elif HC_ARCH_BITS == 16
    1365 typedef int16_t             RTHCINTPTR;
     1363typedef int64_t                 RTHCINTPTR;
    13661364#else
    13671365# error Unsupported HC_ARCH_BITS value.
    13681366#endif
    13691367/** Pointer to signed integer which can contain a HC pointer. */
    1370 typedef RTHCINTPTR        *PRTHCINTPTR;
     1368typedef RTHCINTPTR      RT_FAR *PRTHCINTPTR;
    13711369/** Pointer to const signed integer which can contain a HC pointer. */
    1372 typedef const RTHCINTPTR   *PCRTHCINTPTR;
     1370typedef const RTHCINTPTR RT_FAR *PCRTHCINTPTR;
    13731371/** Max RTHCINTPTR value. */
    13741372#if HC_ARCH_BITS == 32
    1375 # define RTHCINTPTR_MAX     INT32_MAX
     1373# define RTHCINTPTR_MAX         INT32_MAX
    13761374#elif HC_ARCH_BITS == 64
    1377 # define RTHCINTPTR_MAX     INT64_MAX
    1378 #else
    1379 # define RTHCINTPTR_MAX     INT16_MAX
     1375# define RTHCINTPTR_MAX         INT64_MAX
     1376#else
     1377# define RTHCINTPTR_MAX         INT16_MAX
    13801378#endif
    13811379/** Min RTHCINTPTR value. */
    13821380#if HC_ARCH_BITS == 32
    1383 # define RTHCINTPTR_MIN     INT32_MIN
     1381# define RTHCINTPTR_MIN         INT32_MIN
    13841382#elif HC_ARCH_BITS == 64
    1385 # define RTHCINTPTR_MIN     INT64_MIN
    1386 #else
    1387 # define RTHCINTPTR_MIN     INT16_MIN
     1383# define RTHCINTPTR_MIN         INT64_MIN
     1384#else
     1385# define RTHCINTPTR_MIN         INT16_MIN
    13881386#endif
    13891387
    13901388/** Signed integer which can contain a HC ring-3 pointer. */
    1391 #if R3_ARCH_BITS == 32
    1392 typedef int32_t             RTR3INTPTR;
     1389#if R3_ARCH_BITS == 32 || R3_ARCH_BITS == 16
     1390typedef int32_t                 RTR3INTPTR;
    13931391#elif R3_ARCH_BITS == 64
    1394 typedef int64_t             RTR3INTPTR;
    1395 #elif R3_ARCH_BITS == 16
    1396 typedef int16_t             RTR3INTPTR;
     1392typedef int64_t                 RTR3INTPTR;
    13971393#else
    13981394#  error Unsupported R3_ARCH_BITS value.
    13991395#endif
    14001396/** Pointer to signed integer which can contain a HC ring-3 pointer. */
    1401 typedef RTR3INTPTR        *PRTR3INTPTR;
     1397typedef RTR3INTPTR      RT_FAR *PRTR3INTPTR;
    14021398/** Pointer to const signed integer which can contain a HC ring-3 pointer. */
    1403 typedef const RTR3INTPTR   *PCRTR3INTPTR;
     1399typedef const RTR3INTPTR RT_FAR *PCRTR3INTPTR;
    14041400/** Max RTR3INTPTR value. */
    1405 #if R3_ARCH_BITS == 32
    1406 # define RTR3INTPTR_MAX     INT32_MAX
     1401#if R3_ARCH_BITS == 32 || R3_ARCH_BITS == 16
     1402# define RTR3INTPTR_MAX         INT32_MAX
     1403#else
     1404# define RTR3INTPTR_MAX         INT64_MAX
     1405#endif
     1406/** Min RTR3INTPTR value. */
     1407#if R3_ARCH_BITS == 32 || R3_ARCH_BITS == 16
     1408# define RTR3INTPTR_MIN         INT32_MIN
     1409#else
     1410# define RTR3INTPTR_MIN         INT64_MIN
     1411#endif
     1412
     1413/** Signed integer which can contain a HC ring-0 pointer. */
     1414#if R0_ARCH_BITS == 32 || R0_ARCH_BITS == 16
     1415typedef int32_t                 RTR0INTPTR;
     1416#elif R0_ARCH_BITS == 64
     1417typedef int64_t                 RTR0INTPTR;
     1418#else
     1419# error Unsupported R0_ARCH_BITS value.
     1420#endif
     1421/** Pointer to signed integer which can contain a HC ring-0 pointer. */
     1422typedef RTR0INTPTR      RT_FAR *PRTR0INTPTR;
     1423/** Pointer to const signed integer which can contain a HC ring-0 pointer. */
     1424typedef const RTR0INTPTR RT_FAR *PCRTR0INTPTR;
     1425/** Max RTR0INTPTR value. */
     1426#if R0_ARCH_BITS == 32 || R0_ARCH_BITS == 16
     1427# define RTR0INTPTR_MAX         INT32_MAX
     1428#else
     1429# define RTR0INTPTR_MAX         INT64_MAX
     1430#endif
     1431/** Min RTHCINTPTR value. */
     1432#if R0_ARCH_BITS == 32 || R0_ARCH_BITS == 16
     1433# define RTR0INTPTR_MIN         INT32_MIN
     1434#else
     1435# define RTR0INTPTR_MIN         INT64_MIN
     1436#endif
     1437
     1438
     1439/** Unsigned integer which can contain a HC pointer. */
     1440#if HC_ARCH_BITS == 32 || HC_ARCH_BITS == 16
     1441typedef uint32_t                RTHCUINTPTR;
     1442#elif HC_ARCH_BITS == 64
     1443typedef uint64_t                RTHCUINTPTR;
     1444#else
     1445# error Unsupported HC_ARCH_BITS value.
     1446#endif
     1447/** Pointer to unsigned integer which can contain a HC pointer. */
     1448typedef RTHCUINTPTR     RT_FAR *PRTHCUINTPTR;
     1449/** Pointer to unsigned integer which can contain a HC pointer. */
     1450typedef const RTHCUINTPTR RT_FAR *PCRTHCUINTPTR;
     1451/** Max RTHCUINTTPR value. */
     1452#if HC_ARCH_BITS == 32 || HC_ARCH_BITS == 16
     1453# define RTHCUINTPTR_MAX        UINT32_MAX
     1454#else
     1455# define RTHCUINTPTR_MAX        UINT64_MAX
     1456#endif
     1457
     1458/** Unsigned integer which can contain a HC ring-3 pointer. */
     1459#if R3_ARCH_BITS == 32 || R3_ARCH_BITS == 16
     1460typedef uint32_t                RTR3UINTPTR;
    14071461#elif R3_ARCH_BITS == 64
    1408 # define RTR3INTPTR_MAX     INT64_MAX
    1409 #else
    1410 # define RTR3INTPTR_MAX     INT16_MAX
    1411 #endif
    1412 /** Min RTR3INTPTR value. */
    1413 #if R3_ARCH_BITS == 32
    1414 # define RTR3INTPTR_MIN     INT32_MIN
    1415 #elif R3_ARCH_BITS == 64
    1416 # define RTR3INTPTR_MIN     INT64_MIN
    1417 #else
    1418 # define RTR3INTPTR_MIN     INT16_MIN
    1419 #endif
    1420 
    1421 /** Signed integer which can contain a HC ring-0 pointer. */
    1422 #if R0_ARCH_BITS == 32
    1423 typedef int32_t             RTR0INTPTR;
     1462typedef uint64_t                RTR3UINTPTR;
     1463#else
     1464# error Unsupported R3_ARCH_BITS value.
     1465#endif
     1466/** Pointer to unsigned integer which can contain a HC ring-3 pointer. */
     1467typedef RTR3UINTPTR     RT_FAR *PRTR3UINTPTR;
     1468/** Pointer to unsigned integer which can contain a HC ring-3 pointer. */
     1469typedef const RTR3UINTPTR RT_FAR *PCRTR3UINTPTR;
     1470/** Max RTHCUINTTPR value. */
     1471#if R3_ARCH_BITS == 32 || R3_ARCH_BITS == 16
     1472# define RTR3UINTPTR_MAX        UINT32_MAX
     1473#else
     1474# define RTR3UINTPTR_MAX        UINT64_MAX
     1475#endif
     1476
     1477/** Unsigned integer which can contain a HC ring-0 pointer. */
     1478#if R0_ARCH_BITS == 32 || R0_ARCH_BITS == 16
     1479typedef uint32_t                RTR0UINTPTR;
    14241480#elif R0_ARCH_BITS == 64
    1425 typedef int64_t             RTR0INTPTR;
    1426 #elif R0_ARCH_BITS == 16
    1427 typedef int16_t             RTR0INTPTR;
     1481typedef uint64_t                RTR0UINTPTR;
    14281482#else
    14291483# error Unsupported R0_ARCH_BITS value.
    14301484#endif
    1431 /** Pointer to signed integer which can contain a HC ring-0 pointer. */
    1432 typedef RTR0INTPTR         *PRTR0INTPTR;
    1433 /** Pointer to const signed integer which can contain a HC ring-0 pointer. */
    1434 typedef const RTR0INTPTR   *PCRTR0INTPTR;
    1435 /** Max RTR0INTPTR value. */
    1436 #if R0_ARCH_BITS == 32
    1437 # define RTR0INTPTR_MAX     INT32_MAX
    1438 #elif R0_ARCH_BITS == 64
    1439 # define RTR0INTPTR_MAX     INT64_MAX
    1440 #else
    1441 # define RTR0INTPTR_MAX     INT16_MAX
    1442 #endif
    1443 /** Min RTHCINTPTR value. */
    1444 #if R0_ARCH_BITS == 32
    1445 # define RTR0INTPTR_MIN     INT32_MIN
    1446 #elif R0_ARCH_BITS == 64
    1447 # define RTR0INTPTR_MIN     INT64_MIN
    1448 #else
    1449 # define RTR0INTPTR_MIN     INT16_MIN
    1450 #endif
    1451 
    1452 
    1453 /** Unsigned integer which can contain a HC pointer. */
    1454 #if HC_ARCH_BITS == 32
    1455 typedef uint32_t            RTHCUINTPTR;
    1456 #elif HC_ARCH_BITS == 64
    1457 typedef uint64_t            RTHCUINTPTR;
    1458 #elif HC_ARCH_BITS == 16
    1459 typedef uint16_t            RTHCUINTPTR;
    1460 #else
    1461 # error Unsupported HC_ARCH_BITS value.
    1462 #endif
    1463 /** Pointer to unsigned integer which can contain a HC pointer. */
    1464 typedef RTHCUINTPTR        *PRTHCUINTPTR;
    1465 /** Pointer to unsigned integer which can contain a HC pointer. */
    1466 typedef const RTHCUINTPTR  *PCRTHCUINTPTR;
    1467 /** Max RTHCUINTTPR value. */
    1468 #if HC_ARCH_BITS == 32
    1469 # define RTHCUINTPTR_MAX    UINT32_MAX
    1470 #elif HC_ARCH_BITS == 64
    1471 # define RTHCUINTPTR_MAX    UINT64_MAX
    1472 #else
    1473 # define RTHCUINTPTR_MAX    UINT16_MAX
    1474 #endif
    1475 
    1476 /** Unsigned integer which can contain a HC ring-3 pointer. */
    1477 #if R3_ARCH_BITS == 32
    1478 typedef uint32_t            RTR3UINTPTR;
    1479 #elif R3_ARCH_BITS == 64
    1480 typedef uint64_t            RTR3UINTPTR;
    1481 #elif R3_ARCH_BITS == 16
    1482 typedef uint16_t            RTR3UINTPTR;
    1483 #else
    1484 # error Unsupported R3_ARCH_BITS value.
    1485 #endif
    1486 /** Pointer to unsigned integer which can contain a HC ring-3 pointer. */
    1487 typedef RTR3UINTPTR        *PRTR3UINTPTR;
    1488 /** Pointer to unsigned integer which can contain a HC ring-3 pointer. */
    1489 typedef const RTR3UINTPTR  *PCRTR3UINTPTR;
    1490 /** Max RTHCUINTTPR value. */
    1491 #if R3_ARCH_BITS == 32
    1492 # define RTR3UINTPTR_MAX    UINT32_MAX
    1493 #elif R3_ARCH_BITS == 64
    1494 # define RTR3UINTPTR_MAX    UINT64_MAX
    1495 #else
    1496 # define RTR3UINTPTR_MAX    UINT16_MAX
    1497 #endif
    1498 
    1499 /** Unsigned integer which can contain a HC ring-0 pointer. */
    1500 #if R0_ARCH_BITS == 32
    1501 typedef uint32_t            RTR0UINTPTR;
    1502 #elif R0_ARCH_BITS == 64
    1503 typedef uint64_t            RTR0UINTPTR;
    1504 #elif R0_ARCH_BITS == 16
    1505 typedef uint16_t            RTR0UINTPTR;
    1506 #else
    1507 # error Unsupported R0_ARCH_BITS value.
    1508 #endif
    15091485/** Pointer to unsigned integer which can contain a HC ring-0 pointer. */
    1510 typedef RTR0UINTPTR       *PRTR0UINTPTR;
     1486typedef RTR0UINTPTR     RT_FAR *PRTR0UINTPTR;
    15111487/** Pointer to unsigned integer which can contain a HC ring-0 pointer. */
    1512 typedef const RTR0UINTPTR *PCRTR0UINTPTR;
     1488typedef const RTR0UINTPTR RT_FAR *PCRTR0UINTPTR;
    15131489/** Max RTR0UINTTPR value. */
    1514 #if R0_ARCH_BITS == 32
    1515 # define RTR0UINTPTR_MAX    UINT32_MAX
    1516 #elif R0_ARCH_BITS == 64
    1517 # define RTR0UINTPTR_MAX    UINT64_MAX
    1518 #else
    1519 # define RTR0UINTPTR_MAX    UINT16_MAX
     1490#if R0_ARCH_BITS == 32 || R0_ARCH_BITS == 16
     1491# define RTR0UINTPTR_MAX        UINT32_MAX
     1492#else
     1493# define RTR0UINTPTR_MAX        UINT64_MAX
    15201494#endif
    15211495
    15221496
    15231497/** Host Physical Memory Address. */
    1524 typedef uint64_t            RTHCPHYS;
     1498typedef uint64_t                RTHCPHYS;
    15251499/** Pointer to Host Physical Memory Address. */
    1526 typedef RTHCPHYS          *PRTHCPHYS;
     1500typedef RTHCPHYS        RT_FAR *PRTHCPHYS;
    15271501/** Pointer to const Host Physical Memory Address. */
    1528 typedef const RTHCPHYS    *PCRTHCPHYS;
     1502typedef const RTHCPHYS  RT_FAR *PCRTHCPHYS;
    15291503/** @def NIL_RTHCPHYS
    15301504 * NIL HC Physical Address.
     
    15321506 * to the NULL pointer.
    15331507 */
    1534 #define NIL_RTHCPHYS        (~(RTHCPHYS)0)
     1508#define NIL_RTHCPHYS            (~(RTHCPHYS)0)
    15351509/** Max RTHCPHYS value. */
    1536 #define RTHCPHYS_MAX        UINT64_MAX
     1510#define RTHCPHYS_MAX            UINT64_MAX
    15371511
    15381512
    15391513/** HC pointer. */
    15401514#ifndef IN_RC
    1541 typedef void *              RTHCPTR;
    1542 #else
    1543 typedef RTHCUINTPTR         RTHCPTR;
     1515typedef void            RT_FAR *RTHCPTR;
     1516#else
     1517typedef RTHCUINTPTR             RTHCPTR;
    15441518#endif
    15451519/** Pointer to HC pointer. */
    1546 typedef RTHCPTR           *PRTHCPTR;
     1520typedef RTHCPTR         RT_FAR *PRTHCPTR;
    15471521/** Pointer to const HC pointer. */
    1548 typedef const RTHCPTR      *PCRTHCPTR;
     1522typedef const RTHCPTR          *PCRTHCPTR;
    15491523/** @def NIL_RTHCPTR
    15501524 * NIL HC pointer.
    15511525 */
    1552 #define NIL_RTHCPTR         ((RTHCPTR)0)
     1526#define NIL_RTHCPTR             ((RTHCPTR)0)
    15531527/** Max RTHCPTR value. */
    1554 #define RTHCPTR_MAX         ((RTHCPTR)RTHCUINTPTR_MAX)
     1528#define RTHCPTR_MAX             ((RTHCPTR)RTHCUINTPTR_MAX)
    15551529
    15561530
    15571531/** HC ring-3 pointer. */
    15581532#ifdef IN_RING3
    1559 typedef void *              RTR3PTR;
    1560 #else
    1561 typedef RTR3UINTPTR         RTR3PTR;
     1533typedef void            RT_FAR *RTR3PTR;
     1534#else
     1535typedef RTR3UINTPTR             RTR3PTR;
    15621536#endif
    15631537/** Pointer to HC ring-3 pointer. */
    1564 typedef RTR3PTR           *PRTR3PTR;
     1538typedef RTR3PTR         RT_FAR *PRTR3PTR;
    15651539/** Pointer to const HC ring-3 pointer. */
    1566 typedef const RTR3PTR      *PCRTR3PTR;
     1540typedef const RTR3PTR          *PCRTR3PTR;
    15671541/** @def NIL_RTR3PTR
    15681542 * NIL HC ring-3 pointer.
    15691543 */
    15701544#ifndef IN_RING3
    1571 # define NIL_RTR3PTR        ((RTR3PTR)0)
    1572 #else
    1573 # define NIL_RTR3PTR        (NULL)
     1545# define NIL_RTR3PTR            ((RTR3PTR)0)
     1546#else
     1547# define NIL_RTR3PTR            (NULL)
    15741548#endif
    15751549/** Max RTR3PTR value. */
    1576 #define RTR3PTR_MAX         ((RTR3PTR)RTR3UINTPTR_MAX)
     1550#define RTR3PTR_MAX             ((RTR3PTR)RTR3UINTPTR_MAX)
    15771551
    15781552/** HC ring-0 pointer. */
    15791553#ifdef  IN_RING0
    1580 typedef void *              RTR0PTR;
    1581 #else
    1582 typedef RTR0UINTPTR         RTR0PTR;
     1554typedef void            RT_FAR *RTR0PTR;
     1555#else
     1556typedef RTR0UINTPTR             RTR0PTR;
    15831557#endif
    15841558/** Pointer to HC ring-0 pointer. */
    1585 typedef RTR0PTR           *PRTR0PTR;
     1559typedef RTR0PTR         RT_FAR *PRTR0PTR;
    15861560/** Pointer to const HC ring-0 pointer. */
    1587 typedef const RTR0PTR      *PCRTR0PTR;
     1561typedef const RTR0PTR          *PCRTR0PTR;
    15881562/** @def NIL_RTR0PTR
    15891563 * NIL HC ring-0 pointer.
    15901564 */
    15911565#ifndef IN_RING0
    1592 # define NIL_RTR0PTR        ((RTR0PTR)0)
    1593 #else
    1594 # define NIL_RTR0PTR        (NULL)
     1566# define NIL_RTR0PTR            ((RTR0PTR)0)
     1567#else
     1568# define NIL_RTR0PTR            (NULL)
    15951569#endif
    15961570/** Max RTR3PTR value. */
    1597 #define RTR0PTR_MAX         ((RTR0PTR)RTR0UINTPTR_MAX)
     1571#define RTR0PTR_MAX             ((RTR0PTR)RTR0UINTPTR_MAX)
    15981572
    15991573
    16001574/** Unsigned integer register in the host context. */
    16011575#if HC_ARCH_BITS == 32
    1602 typedef uint32_t            RTHCUINTREG;
     1576typedef uint32_t                RTHCUINTREG;
    16031577#elif HC_ARCH_BITS == 64
    1604 typedef uint64_t            RTHCUINTREG;
     1578typedef uint64_t                RTHCUINTREG;
    16051579#elif HC_ARCH_BITS == 16
    1606 typedef uint16_t            RTHCUINTREG;
     1580typedef uint16_t                RTHCUINTREG;
    16071581#else
    16081582# error "Unsupported HC_ARCH_BITS!"
    16091583#endif
    16101584/** Pointer to an unsigned integer register in the host context. */
    1611 typedef RTHCUINTREG       *PRTHCUINTREG;
     1585typedef RTHCUINTREG     RT_FAR *PRTHCUINTREG;
    16121586/** Pointer to a const unsigned integer register in the host context. */
    1613 typedef const RTHCUINTREG *PCRTHCUINTREG;
     1587typedef const RTHCUINTREG RT_FAR *PCRTHCUINTREG;
    16141588
    16151589/** Unsigned integer register in the host ring-3 context. */
    16161590#if R3_ARCH_BITS == 32
    1617 typedef uint32_t            RTR3UINTREG;
     1591typedef uint32_t                RTR3UINTREG;
    16181592#elif R3_ARCH_BITS == 64
    1619 typedef uint64_t            RTR3UINTREG;
     1593typedef uint64_t                RTR3UINTREG;
    16201594#elif R3_ARCH_BITS == 16
    1621 typedef uint16_t            RTR3UINTREG;
     1595typedef uint16_t                RTR3UINTREG;
    16221596#else
    16231597# error "Unsupported R3_ARCH_BITS!"
    16241598#endif
    16251599/** Pointer to an unsigned integer register in the host ring-3 context. */
    1626 typedef RTR3UINTREG       *PRTR3UINTREG;
     1600typedef RTR3UINTREG     RT_FAR *PRTR3UINTREG;
    16271601/** Pointer to a const unsigned integer register in the host ring-3 context. */
    1628 typedef const RTR3UINTREG *PCRTR3UINTREG;
     1602typedef const RTR3UINTREG RT_FAR *PCRTR3UINTREG;
    16291603
    16301604/** Unsigned integer register in the host ring-3 context. */
    16311605#if R0_ARCH_BITS == 32
    1632 typedef uint32_t            RTR0UINTREG;
     1606typedef uint32_t                RTR0UINTREG;
    16331607#elif R0_ARCH_BITS == 64
    1634 typedef uint64_t            RTR0UINTREG;
     1608typedef uint64_t                RTR0UINTREG;
    16351609#elif R0_ARCH_BITS == 16
    1636 typedef uint16_t            RTR0UINTREG;
     1610typedef uint16_t                RTR0UINTREG;
    16371611#else
    16381612# error "Unsupported R3_ARCH_BITS!"
    16391613#endif
    16401614/** Pointer to an unsigned integer register in the host ring-3 context. */
    1641 typedef RTR0UINTREG       *PRTR0UINTREG;
     1615typedef RTR0UINTREG     RT_FAR *PRTR0UINTREG;
    16421616/** Pointer to a const unsigned integer register in the host ring-3 context. */
    1643 typedef const RTR0UINTREG *PCRTR0UINTREG;
     1617typedef const RTR0UINTREG RT_FAR *PCRTR0UINTREG;
    16441618
    16451619/** @} */
     
    16531627 * @deprecated silly type. */
    16541628#if GC_ARCH_BITS == 32
    1655 typedef int32_t         RTGCINT;
     1629typedef int32_t                 RTGCINT;
    16561630#elif GC_ARCH_BITS == 64 /** @todo this isn't right, natural int is 32-bit, see RTHCINT. */
    1657 typedef int64_t         RTGCINT;
     1631typedef int64_t                 RTGCINT;
    16581632#endif
    16591633/** Pointer to natural signed integer in GC.
    16601634 * @deprecated silly type. */
    1661 typedef RTGCINT        *PRTGCINT;
     1635typedef RTGCINT RT_FAR         *PRTGCINT;
    16621636/** Pointer to const natural signed integer in GC.
    16631637 * @deprecated silly type. */
    1664 typedef const RTGCINT  *PCRTGCINT;
     1638typedef const RTGCINT   RT_FAR *PCRTGCINT;
    16651639
    16661640/** Natural unsigned integer in the GC.
    16671641 * @deprecated silly type. */
    16681642#if GC_ARCH_BITS == 32
    1669 typedef uint32_t        RTGCUINT;
     1643typedef uint32_t                RTGCUINT;
    16701644#elif GC_ARCH_BITS == 64 /** @todo this isn't right, natural int is 32-bit, see RTHCUINT. */
    1671 typedef uint64_t        RTGCUINT;
     1645typedef uint64_t                RTGCUINT;
    16721646#endif
    16731647/** Pointer to natural unsigned integer in GC.
    16741648 * @deprecated silly type. */
    1675 typedef RTGCUINT       *PRTGCUINT;
     1649typedef RTGCUINT        RT_FAR *PRTGCUINT;
    16761650/** Pointer to const natural unsigned integer in GC.
    16771651 * @deprecated silly type. */
    1678 typedef const RTGCUINT *PCRTGCUINT;
     1652typedef const RTGCUINT  RT_FAR *PCRTGCUINT;
    16791653
    16801654/** Signed integer which can contain a GC pointer. */
    16811655#if GC_ARCH_BITS == 32
    1682 typedef int32_t         RTGCINTPTR;
     1656typedef int32_t                 RTGCINTPTR;
    16831657#elif GC_ARCH_BITS == 64
    1684 typedef int64_t         RTGCINTPTR;
     1658typedef int64_t                 RTGCINTPTR;
    16851659#endif
    16861660/** Pointer to signed integer which can contain a GC pointer. */
    1687 typedef RTGCINTPTR     *PRTGCINTPTR;
     1661typedef RTGCINTPTR      RT_FAR *PRTGCINTPTR;
    16881662/** Pointer to const signed integer which can contain a GC pointer. */
    1689 typedef const RTGCINTPTR *PCRTGCINTPTR;
     1663typedef const RTGCINTPTR RT_FAR *PCRTGCINTPTR;
    16901664
    16911665/** Unsigned integer which can contain a GC pointer. */
    16921666#if GC_ARCH_BITS == 32
    1693 typedef uint32_t        RTGCUINTPTR;
     1667typedef uint32_t                RTGCUINTPTR;
    16941668#elif GC_ARCH_BITS == 64
    1695 typedef uint64_t        RTGCUINTPTR;
     1669typedef uint64_t                RTGCUINTPTR;
    16961670#else
    16971671#  error Unsupported GC_ARCH_BITS value.
    16981672#endif
    16991673/** Pointer to unsigned integer which can contain a GC pointer. */
    1700 typedef RTGCUINTPTR     *PRTGCUINTPTR;
     1674typedef RTGCUINTPTR     RT_FAR *PRTGCUINTPTR;
    17011675/** Pointer to unsigned integer which can contain a GC pointer. */
    1702 typedef const RTGCUINTPTR *PCRTGCUINTPTR;
     1676typedef const RTGCUINTPTR RT_FAR *PCRTGCUINTPTR;
    17031677
    17041678/** Unsigned integer which can contain a 32 bits GC pointer. */
    1705 typedef uint32_t        RTGCUINTPTR32;
     1679typedef uint32_t                RTGCUINTPTR32;
    17061680/** Pointer to unsigned integer which can contain a 32 bits GC pointer. */
    1707 typedef RTGCUINTPTR32   *PRTGCUINTPTR32;
     1681typedef RTGCUINTPTR32   RT_FAR *PRTGCUINTPTR32;
    17081682/** Pointer to unsigned integer which can contain a 32 bits GC pointer. */
    1709 typedef const RTGCUINTPTR32 *PCRTGCUINTPTR32;
     1683typedef const RTGCUINTPTR32 RT_FAR *PCRTGCUINTPTR32;
    17101684
    17111685/** Unsigned integer which can contain a 64 bits GC pointer. */
    1712 typedef uint64_t        RTGCUINTPTR64;
     1686typedef uint64_t                RTGCUINTPTR64;
    17131687/** Pointer to unsigned integer which can contain a 32 bits GC pointer. */
    1714 typedef RTGCUINTPTR64   *PRTGCUINTPTR64;
     1688typedef RTGCUINTPTR64   RT_FAR *PRTGCUINTPTR64;
    17151689/** Pointer to unsigned integer which can contain a 32 bits GC pointer. */
    1716 typedef const RTGCUINTPTR64 *PCRTGCUINTPTR64;
     1690typedef const RTGCUINTPTR64 RT_FAR *PCRTGCUINTPTR64;
    17171691
    17181692/** Guest Physical Memory Address.*/
    1719 typedef uint64_t            RTGCPHYS;
     1693typedef uint64_t                RTGCPHYS;
    17201694/** Pointer to Guest Physical Memory Address. */
    1721 typedef RTGCPHYS          *PRTGCPHYS;
     1695typedef RTGCPHYS        RT_FAR *PRTGCPHYS;
    17221696/** Pointer to const Guest Physical Memory Address. */
    1723 typedef const RTGCPHYS    *PCRTGCPHYS;
     1697typedef const RTGCPHYS  RT_FAR *PCRTGCPHYS;
    17241698/** @def NIL_RTGCPHYS
    17251699 * NIL GC Physical Address.
     
    17281702 * some contexts.
    17291703 */
    1730 #define NIL_RTGCPHYS        (~(RTGCPHYS)0U)
     1704#define NIL_RTGCPHYS            (~(RTGCPHYS)0U)
    17311705/** Max guest physical memory address value. */
    1732 #define RTGCPHYS_MAX        UINT64_MAX
     1706#define RTGCPHYS_MAX            UINT64_MAX
    17331707
    17341708
    17351709/** Guest Physical Memory Address; limited to 32 bits.*/
    1736 typedef uint32_t            RTGCPHYS32;
     1710typedef uint32_t                RTGCPHYS32;
    17371711/** Pointer to Guest Physical Memory Address. */
    1738 typedef RTGCPHYS32        *PRTGCPHYS32;
     1712typedef RTGCPHYS32      RT_FAR *PRTGCPHYS32;
    17391713/** Pointer to const Guest Physical Memory Address. */
    1740 typedef const RTGCPHYS32   *PCRTGCPHYS32;
     1714typedef const RTGCPHYS32 RT_FAR *PCRTGCPHYS32;
    17411715/** @def NIL_RTGCPHYS32
    17421716 * NIL GC Physical Address.
     
    17451719 * some contexts.
    17461720 */
    1747 #define NIL_RTGCPHYS32     (~(RTGCPHYS32)0)
     1721#define NIL_RTGCPHYS32          (~(RTGCPHYS32)0)
    17481722
    17491723
    17501724/** Guest Physical Memory Address; limited to 64 bits.*/
    1751 typedef uint64_t        RTGCPHYS64;
     1725typedef uint64_t                RTGCPHYS64;
    17521726/** Pointer to Guest Physical Memory Address. */
    1753 typedef RTGCPHYS64     *PRTGCPHYS64;
     1727typedef RTGCPHYS64      RT_FAR *PRTGCPHYS64;
    17541728/** Pointer to const Guest Physical Memory Address. */
    1755 typedef const RTGCPHYS64 *PCRTGCPHYS64;
     1729typedef const RTGCPHYS64 RT_FAR *PCRTGCPHYS64;
    17561730/** @def NIL_RTGCPHYS64
    17571731 * NIL GC Physical Address.
     
    17601734 * some contexts.
    17611735 */
    1762 #define NIL_RTGCPHYS64     (~(RTGCPHYS64)0)
     1736#define NIL_RTGCPHYS64          (~(RTGCPHYS64)0)
    17631737
    17641738/** Guest context pointer, 32 bits.
     
    17661740 * HC and void pointer in GC.
    17671741 */
    1768 typedef RTGCUINTPTR32   RTGCPTR32;
     1742typedef RTGCUINTPTR32           RTGCPTR32;
    17691743/** Pointer to a guest context pointer. */
    1770 typedef RTGCPTR32      *PRTGCPTR32;
     1744typedef RTGCPTR32       RT_FAR *PRTGCPTR32;
    17711745/** Pointer to a const guest context pointer. */
    1772 typedef const RTGCPTR32 *PCRTGCPTR32;
     1746typedef const RTGCPTR32 RT_FAR *PCRTGCPTR32;
    17731747/** @def NIL_RTGCPTR32
    17741748 * NIL GC pointer.
    17751749 */
    1776 #define NIL_RTGCPTR32   ((RTGCPTR32)0)
     1750#define NIL_RTGCPTR32           ((RTGCPTR32)0)
    17771751
    17781752/** Guest context pointer, 64 bits.
    17791753 */
    1780 typedef RTGCUINTPTR64   RTGCPTR64;
     1754typedef RTGCUINTPTR64           RTGCPTR64;
    17811755/** Pointer to a guest context pointer. */
    1782 typedef RTGCPTR64      *PRTGCPTR64;
     1756typedef RTGCPTR64       RT_FAR *PRTGCPTR64;
    17831757/** Pointer to a const guest context pointer. */
    1784 typedef const RTGCPTR64 *PCRTGCPTR64;
     1758typedef const RTGCPTR64 RT_FAR *PCRTGCPTR64;
    17851759/** @def NIL_RTGCPTR64
    17861760 * NIL GC pointer.
    17871761 */
    1788 #define NIL_RTGCPTR64   ((RTGCPTR64)0)
     1762#define NIL_RTGCPTR64           ((RTGCPTR64)0)
    17891763
    17901764/** Guest context pointer.
     
    17931767 */
    17941768#if GC_ARCH_BITS == 64
    1795 typedef RTGCPTR64       RTGCPTR;
     1769typedef RTGCPTR64               RTGCPTR;
    17961770/** Pointer to a guest context pointer. */
    1797 typedef PRTGCPTR64      PRTGCPTR;
     1771typedef PRTGCPTR64              PRTGCPTR;
    17981772/** Pointer to a const guest context pointer. */
    1799 typedef PCRTGCPTR64     PCRTGCPTR;
     1773typedef PCRTGCPTR64             PCRTGCPTR;
    18001774/** @def NIL_RTGCPTR
    18011775 * NIL GC pointer.
     
    18031777# define NIL_RTGCPTR    NIL_RTGCPTR64
    18041778/** Max RTGCPTR value. */
    1805 # define RTGCPTR_MAX    UINT64_MAX
     1779# define RTGCPTR_MAX            UINT64_MAX
    18061780#elif GC_ARCH_BITS == 32
    1807 typedef RTGCPTR32       RTGCPTR;
     1781typedef RTGCPTR32               RTGCPTR;
    18081782/** Pointer to a guest context pointer. */
    1809 typedef PRTGCPTR32      PRTGCPTR;
     1783typedef PRTGCPTR32              PRTGCPTR;
    18101784/** Pointer to a const guest context pointer. */
    1811 typedef PCRTGCPTR32     PCRTGCPTR;
     1785typedef PCRTGCPTR32             PCRTGCPTR;
    18121786/** @def NIL_RTGCPTR
    18131787 * NIL GC pointer.
    18141788 */
    1815 # define NIL_RTGCPTR     NIL_RTGCPTR32
     1789# define NIL_RTGCPTR            NIL_RTGCPTR32
    18161790/** Max RTGCPTR value. */
    1817 # define RTGCPTR_MAX    UINT32_MAX
     1791# define RTGCPTR_MAX            UINT32_MAX
    18181792#else
    18191793# error "Unsupported GC_ARCH_BITS!"
     
    18211795
    18221796/** Unsigned integer register in the guest context. */
    1823 typedef uint32_t              RTGCUINTREG32;
     1797typedef uint32_t                RTGCUINTREG32;
    18241798/** Pointer to an unsigned integer register in the guest context. */
    1825 typedef RTGCUINTREG32       *PRTGCUINTREG32;
     1799typedef RTGCUINTREG32   RT_FAR *PRTGCUINTREG32;
    18261800/** Pointer to a const unsigned integer register in the guest context. */
    1827 typedef const RTGCUINTREG32 *PCRTGCUINTREG32;
    1828 
    1829 typedef uint64_t              RTGCUINTREG64;
     1801typedef const RTGCUINTREG32 RT_FAR *PCRTGCUINTREG32;
     1802
     1803typedef uint64_t                RTGCUINTREG64;
    18301804/** Pointer to an unsigned integer register in the guest context. */
    1831 typedef RTGCUINTREG64       *PRTGCUINTREG64;
     1805typedef RTGCUINTREG64   RT_FAR *PRTGCUINTREG64;
    18321806/** Pointer to a const unsigned integer register in the guest context. */
    1833 typedef const RTGCUINTREG64 *PCRTGCUINTREG64;
     1807typedef const RTGCUINTREG64 RT_FAR *PCRTGCUINTREG64;
    18341808
    18351809#if GC_ARCH_BITS == 64
     
    18411815#endif
    18421816/** Pointer to an unsigned integer register in the guest context. */
    1843 typedef RTGCUINTREG           *PRTGCUINTREG;
     1817typedef RTGCUINTREG     RT_FAR *PRTGCUINTREG;
    18441818/** Pointer to a const unsigned integer register in the guest context. */
    1845 typedef const RTGCUINTREG     *PCRTGCUINTREG;
     1819typedef const RTGCUINTREG RT_FAR *PCRTGCUINTREG;
    18461820
    18471821/** @} */
     
    18561830 */
    18571831#ifdef IN_RC
    1858 typedef void *          RTRCPTR;
    1859 #else
    1860 typedef uint32_t        RTRCPTR;
     1832typedef void            RT_FAR *RTRCPTR;
     1833#else
     1834typedef uint32_t                RTRCPTR;
    18611835#endif
    18621836/** Pointer to a raw mode context pointer. */
    1863 typedef RTRCPTR        *PRTRCPTR;
     1837typedef RTRCPTR         RT_FAR *PRTRCPTR;
    18641838/** Pointer to a const raw mode context pointer. */
    1865 typedef const RTRCPTR  *PCRTRCPTR;
     1839typedef const RTRCPTR   RT_FAR *PCRTRCPTR;
    18661840/** @def NIL_RTGCPTR
    18671841 * NIL RC pointer.
    18681842 */
    18691843#ifndef IN_RC
    1870 # define NIL_RTRCPTR   ((RTRCPTR)0)
    1871 #else
    1872 # define NIL_RTRCPTR   (NULL)
     1844# define NIL_RTRCPTR            ((RTRCPTR)0)
     1845#else
     1846# define NIL_RTRCPTR            (NULL)
    18731847#endif
    18741848/** @def RTRCPTR_MAX
    18751849 * The maximum value a RTRCPTR can have. Mostly used as INVALID value.
    18761850 */
    1877 #define RTRCPTR_MAX    ((RTRCPTR)UINT32_MAX)
     1851#define RTRCPTR_MAX             ((RTRCPTR)UINT32_MAX)
    18781852
    18791853/** Raw mode context pointer, unsigned integer variant. */
    1880 typedef int32_t         RTRCINTPTR;
     1854typedef int32_t                 RTRCINTPTR;
    18811855/** @def RTRCUINTPTR_MAX
    18821856 * The maximum value a RTRCUINPTR can have.
    18831857 */
    1884 #define RTRCUINTPTR_MAX ((RTRCUINTPTR)UINT32_MAX)
     1858#define RTRCUINTPTR_MAX         ((RTRCUINTPTR)UINT32_MAX)
    18851859
    18861860/** Raw mode context pointer, signed integer variant. */
    1887 typedef uint32_t        RTRCUINTPTR;
     1861typedef uint32_t                RTRCUINTPTR;
    18881862/** @def RTRCINTPTR_MIN
    18891863 * The minimum value a RTRCINPTR can have.
    18901864 */
    1891 #define RTRCINTPTR_MIN ((RTRCINTPTR)INT32_MIN)
     1865#define RTRCINTPTR_MIN          ((RTRCINTPTR)INT32_MIN)
    18921866/** @def RTRCINTPTR_MAX
    18931867 * The maximum value a RTRCINPTR can have.
    18941868 */
    1895 #define RTRCINTPTR_MAX ((RTRCINTPTR)INT32_MAX)
     1869#define RTRCINTPTR_MAX          ((RTRCINTPTR)INT32_MAX)
    18961870
    18971871/** @} */
     
    19091883#endif
    19101884/** Pointer to Current Context Physical Memory Address. */
    1911 typedef RTCCPHYS       *PRTCCPHYS;
     1885typedef RTCCPHYS        RT_FAR *PRTCCPHYS;
    19121886/** Pointer to const Current Context Physical Memory Address. */
    1913 typedef const RTCCPHYS *PCRTCCPHYS;
     1887typedef const RTCCPHYS  RT_FAR *PCRTCCPHYS;
    19141888/** @def NIL_RTCCPHYS
    19151889 * NIL CC Physical Address.
     
    19181892 */
    19191893#ifdef IN_RC
    1920 # define NIL_RTCCPHYS   NIL_RTGCPHYS
    1921 #else
    1922 # define NIL_RTCCPHYS   NIL_RTHCPHYS
     1894# define NIL_RTCCPHYS           NIL_RTGCPHYS
     1895#else
     1896# define NIL_RTCCPHYS           NIL_RTHCPHYS
    19231897#endif
    19241898
     
    19341908#endif
    19351909/** Pointer to an unsigned integer register in the current context. */
    1936 typedef RTCCUINTREG           *PRTCCUINTREG;
     1910typedef RTCCUINTREG     RT_FAR *PRTCCUINTREG;
    19371911/** Pointer to a const unsigned integer register in the current context. */
    1938 typedef RTCCUINTREG const     *PCRTCCUINTREG;
     1912typedef RTCCUINTREG const RT_FAR *PCRTCCUINTREG;
    19391913
    19401914/** Signed integer register in the current context. */
     
    19471921#endif
    19481922/** Pointer to a signed integer register in the current context. */
    1949 typedef RTCCINTREG            *PRTCCINTREG;
     1923typedef RTCCINTREG      RT_FAR *PRTCCINTREG;
    19501924/** Pointer to a const signed integer register in the current context. */
    1951 typedef RTCCINTREG const       *PCRTCCINTREG;
     1925typedef RTCCINTREG const RT_FAR *PCRTCCINTREG;
    19521926
    19531927/** Unsigned integer register in the current context.
     
    19591933#endif
    19601934/** Pointer to an unsigned integer register in the current context. */
    1961 typedef RTCCUINTREG           *PRTCCUINTXREG;
     1935typedef RTCCUINTREG     RT_FAR *PRTCCUINTXREG;
    19621936/** Pointer to a const unsigned integer register in the current context. */
    1963 typedef RTCCUINTREG const     *PCRTCCUINTXREG;
     1937typedef RTCCUINTREG const RT_FAR *PCRTCCUINTXREG;
    19641938
    19651939/** Signed integer extended register in the current context.
     
    19711945#endif
    19721946/** Pointer to a signed integer extended register in the current context. */
    1973 typedef RTCCINTXREG           *PRTCCINTXREG;
     1947typedef RTCCINTXREG     RT_FAR *PRTCCINTXREG;
    19741948/** Pointer to a const signed integer extended register in the current
    19751949 * context. */
    1976 typedef RTCCINTXREG const     *PCRTCCINTXREG;
     1950typedef RTCCINTXREG const RT_FAR *PCRTCCINTXREG;
    19771951
    19781952/** @def RTCCUINTREG_C
     
    20732047
    20742048/** Pointer to a big integer number. */
    2075 typedef struct RTBIGNUM                           *PRTBIGNUM;
     2049typedef struct RTBIGNUM                     RT_FAR *PRTBIGNUM;
    20762050/** Pointer to a const big integer number. */
    2077 typedef struct RTBIGNUM const                     *PCRTBIGNUM;
     2051typedef struct RTBIGNUM const               RT_FAR *PCRTBIGNUM;
    20782052
    20792053
    20802054/** Pointer to a critical section. */
    2081 typedef struct RTCRITSECT                         *PRTCRITSECT;
     2055typedef struct RTCRITSECT                   RT_FAR *PRTCRITSECT;
    20822056/** Pointer to a const critical section. */
    2083 typedef const struct RTCRITSECT                   *PCRTCRITSECT;
     2057typedef const struct RTCRITSECT             RT_FAR *PCRTCRITSECT;
    20842058
    20852059/** Pointer to a read/write critical section. */
    2086 typedef struct RTCRITSECTRW                       *PRTCRITSECTRW;
     2060typedef struct RTCRITSECTRW                 RT_FAR *PRTCRITSECTRW;
    20872061/** Pointer to a const read/write critical section. */
    2088 typedef const struct RTCRITSECTRW                 *PCRTCRITSECTRW;
     2062typedef const struct RTCRITSECTRW           RT_FAR *PCRTCRITSECTRW;
    20892063
    20902064
    20912065/** Condition variable handle. */
    2092 typedef R3PTRTYPE(struct RTCONDVARINTERNAL *)      RTCONDVAR;
     2066typedef R3PTRTYPE(struct RTCONDVARINTERNAL RT_FAR *) RTCONDVAR;
    20932067/** Pointer to a condition variable handle. */
    2094 typedef RTCONDVAR                                 *PRTCONDVAR;
     2068typedef RTCONDVAR                           RT_FAR *PRTCONDVAR;
    20952069/** Nil condition variable handle. */
    20962070#define NIL_RTCONDVAR                               0
    20972071
    20982072/** Cryptographic (certificate) store handle. */
    2099 typedef R3R0PTRTYPE(struct RTCRSTOREINT *)          RTCRSTORE;
     2073typedef R3R0PTRTYPE(struct RTCRSTOREINT RT_FAR *)   RTCRSTORE;
    21002074/** Pointer to a Cryptographic (certificate) store handle. */
    2101 typedef RTCRSTORE                                 *PRTCRSTORE;
     2075typedef RTCRSTORE                           RT_FAR *PRTCRSTORE;
    21022076/** Nil Cryptographic (certificate) store handle. */
    21032077#define NIL_RTCRSTORE                               0
    21042078
    21052079/** Pointer to a const (store) certificate context. */
    2106 typedef struct RTCRCERTCTX const                  *PCRTCRCERTCTX;
     2080typedef struct RTCRCERTCTX const            RT_FAR *PCRTCRCERTCTX;
    21072081
    21082082/** Cryptographic message digest handle. */
    2109 typedef R3R0PTRTYPE(struct RTCRDIGESTINT *)        RTCRDIGEST;
     2083typedef R3R0PTRTYPE(struct RTCRDIGESTINT RT_FAR *) RTCRDIGEST;
    21102084/** Pointer to a cryptographic message digest handle. */
    2111 typedef RTCRDIGEST                                *PRTCRDIGEST;
     2085typedef RTCRDIGEST                          RT_FAR *PRTCRDIGEST;
    21122086/** NIL cryptographic message digest handle. */
    21132087#define NIL_RTCRDIGEST                              (0)
    21142088
    21152089/** Public key encryption schema handle. */
    2116 typedef R3R0PTRTYPE(struct RTCRPKIXENCRYPTIONINT *) RTCRPKIXENCRYPTION;
     2090typedef R3R0PTRTYPE(struct RTCRPKIXENCRYPTIONINT RT_FAR *) RTCRPKIXENCRYPTION;
    21172091/** Pointer to a public key encryption schema handle. */
    2118 typedef RTCRPKIXENCRYPTION                        *PRTCRPKIXENCRYPTION;
     2092typedef RTCRPKIXENCRYPTION                  RT_FAR *PRTCRPKIXENCRYPTION;
    21192093/** NIL public key encryption schema handle */
    21202094#define NIL_RTCRPKIXENCRYPTION                      (0)
    21212095
    21222096/** Public key signature schema handle. */
    2123 typedef R3R0PTRTYPE(struct RTCRPKIXSIGNATUREINT *) RTCRPKIXSIGNATURE;
     2097typedef R3R0PTRTYPE(struct RTCRPKIXSIGNATUREINT RT_FAR *) RTCRPKIXSIGNATURE;
    21242098/** Pointer to a public key signature schema handle. */
    2125 typedef RTCRPKIXSIGNATURE                         *PRTCRPKIXSIGNATURE;
     2099typedef RTCRPKIXSIGNATURE                   RT_FAR *PRTCRPKIXSIGNATURE;
    21262100/** NIL public key signature schema handle */
    21272101#define NIL_RTCRPKIXSIGNATURE                       (0)
    21282102
    21292103/** X.509 certificate paths builder & validator handle. */
    2130 typedef R3R0PTRTYPE(struct RTCRX509CERTPATHSINT *) RTCRX509CERTPATHS;
     2104typedef R3R0PTRTYPE(struct RTCRX509CERTPATHSINT RT_FAR *) RTCRX509CERTPATHS;
    21312105/** Pointer to a certificate paths builder & validator handle. */
    2132 typedef RTCRX509CERTPATHS                         *PRTCRX509CERTPATHS;
     2106typedef RTCRX509CERTPATHS                   RT_FAR *PRTCRX509CERTPATHS;
    21332107/** Nil certificate paths builder & validator handle. */
    21342108#define NIL_RTCRX509CERTPATHS                       0
    21352109
    21362110/** File handle. */
    2137 typedef R3R0PTRTYPE(struct RTFILEINT *)             RTFILE;
     2111typedef R3R0PTRTYPE(struct RTFILEINT RT_FAR *)      RTFILE;
    21382112/** Pointer to file handle. */
    2139 typedef RTFILE                                    *PRTFILE;
     2113typedef RTFILE                              RT_FAR *PRTFILE;
    21402114/** Nil file handle. */
    21412115#define NIL_RTFILE                                  ((RTFILE)~(RTHCINTPTR)0)
    21422116
    21432117/** Async I/O request handle. */
    2144 typedef R3PTRTYPE(struct RTFILEAIOREQINTERNAL *)    RTFILEAIOREQ;
     2118typedef R3PTRTYPE(struct RTFILEAIOREQINTERNAL RT_FAR *) RTFILEAIOREQ;
    21452119/** Pointer to an async I/O request handle. */
    2146 typedef RTFILEAIOREQ                              *PRTFILEAIOREQ;
     2120typedef RTFILEAIOREQ                        RT_FAR *PRTFILEAIOREQ;
    21472121/** Nil request handle. */
    21482122#define NIL_RTFILEAIOREQ                            0
    21492123
    21502124/** Async I/O completion context handle. */
    2151 typedef R3PTRTYPE(struct RTFILEAIOCTXINTERNAL *)    RTFILEAIOCTX;
     2125typedef R3PTRTYPE(struct RTFILEAIOCTXINTERNAL RT_FAR *) RTFILEAIOCTX;
    21522126/** Pointer to an async I/O completion context handle. */
    2153 typedef RTFILEAIOCTX                              *PRTFILEAIOCTX;
     2127typedef RTFILEAIOCTX                        RT_FAR *PRTFILEAIOCTX;
    21542128/** Nil context handle. */
    21552129#define NIL_RTFILEAIOCTX                            0
    21562130
    21572131/** ISO image maker handle. */
    2158 typedef struct RTFSISOMAKERINT                    *RTFSISOMAKER;
     2132typedef struct RTFSISOMAKERINT              RT_FAR *RTFSISOMAKER;
    21592133/** Pointer to an ISO image maker handle. */
    2160 typedef RTFSISOMAKER                              *PRTFSISOMAKER;
     2134typedef RTFSISOMAKER                        RT_FAR *PRTFSISOMAKER;
    21612135/** NIL ISO maker handle. */
    21622136#define NIL_RTFSISOMAKER                           ((RTFSISOMAKER)0)
    21632137
    21642138/** INI-file handle. */
    2165 typedef struct RTINIFILEINT                       *RTINIFILE;
     2139typedef struct RTINIFILEINT                 RT_FAR *RTINIFILE;
    21662140/** Pointer to an INI-file handle. */
    2167 typedef RTINIFILE                                 *PRTINIFILE;
     2141typedef RTINIFILE                           RT_FAR *PRTINIFILE;
    21682142/** NIL INI-file handle. */
    21692143#define NIL_RTINIFILE                              ((RTINIFILE)0)
    21702144
    21712145/** Loader module handle. */
    2172 typedef R3R0PTRTYPE(struct RTLDRMODINTERNAL *)      RTLDRMOD;
     2146typedef R3R0PTRTYPE(struct RTLDRMODINTERNAL RT_FAR *) RTLDRMOD;
    21732147/** Pointer to a loader module handle. */
    2174 typedef RTLDRMOD                                  *PRTLDRMOD;
     2148typedef RTLDRMOD                            RT_FAR *PRTLDRMOD;
    21752149/** Nil loader module handle. */
    21762150#define NIL_RTLDRMOD                                0
    21772151
    21782152/** Lock validator class handle. */
    2179 typedef R3R0PTRTYPE(struct RTLOCKVALCLASSINT *)    RTLOCKVALCLASS;
     2153typedef R3R0PTRTYPE(struct RTLOCKVALCLASSINT RT_FAR *) RTLOCKVALCLASS;
    21802154/** Pointer to a lock validator class handle. */
    2181 typedef RTLOCKVALCLASS                            *PRTLOCKVALCLASS;
     2155typedef RTLOCKVALCLASS                      RT_FAR *PRTLOCKVALCLASS;
    21822156/** Nil lock validator class handle. */
    21832157#define NIL_RTLOCKVALCLASS                         ((RTLOCKVALCLASS)0)
    21842158
    21852159/** Ring-0 memory object handle. */
    2186 typedef R0PTRTYPE(struct RTR0MEMOBJINTERNAL *)      RTR0MEMOBJ;
     2160typedef R0PTRTYPE(struct RTR0MEMOBJINTERNAL RT_FAR *) RTR0MEMOBJ;
    21872161/** Pointer to a Ring-0 memory object handle. */
    2188 typedef RTR0MEMOBJ                                *PRTR0MEMOBJ;
     2162typedef RTR0MEMOBJ                          RT_FAR *PRTR0MEMOBJ;
    21892163/** Nil ring-0 memory object handle. */
    21902164#define NIL_RTR0MEMOBJ                              0
     
    21932167typedef RTHCUINTPTR                                 RTNATIVETHREAD;
    21942168/** Pointer to an native thread handle. */
    2195 typedef RTNATIVETHREAD                            *PRTNATIVETHREAD;
     2169typedef RTNATIVETHREAD                      RT_FAR *PRTNATIVETHREAD;
    21962170/** Nil native thread handle. */
    21972171#define NIL_RTNATIVETHREAD                          (~(RTNATIVETHREAD)0)
    21982172
    21992173/** Pipe handle. */
    2200 typedef R3R0PTRTYPE(struct RTPIPEINTERNAL *)        RTPIPE;
     2174typedef R3R0PTRTYPE(struct RTPIPEINTERNAL RT_FAR *) RTPIPE;
    22012175/** Pointer to a pipe handle. */
    2202 typedef RTPIPE                                    *PRTPIPE;
     2176typedef RTPIPE                              RT_FAR *PRTPIPE;
    22032177/** Nil pipe handle.
    22042178 * @remarks This is not 0 because of UNIX and OS/2 handle values. Take care! */
     
    22072181/** @typedef RTPOLLSET
    22082182 * Poll set handle. */
    2209 typedef R3R0PTRTYPE(struct RTPOLLSETINTERNAL *)    RTPOLLSET;
     2183typedef R3R0PTRTYPE(struct RTPOLLSETINTERNAL RT_FAR *) RTPOLLSET;
    22102184/** Pointer to a poll set handle. */
    2211 typedef RTPOLLSET                                 *PRTPOLLSET;
     2185typedef RTPOLLSET                           RT_FAR *PRTPOLLSET;
    22122186/** Nil poll set handle handle. */
    22132187#define NIL_RTPOLLSET                               ((RTPOLLSET)0)
     
    22162190typedef uint32_t                                    RTPROCESS;
    22172191/** Pointer to a process identifier. */
    2218 typedef RTPROCESS                                 *PRTPROCESS;
     2192typedef RTPROCESS                           RT_FAR *PRTPROCESS;
    22192193/** Nil process identifier. */
    22202194#define NIL_RTPROCESS                               (~(RTPROCESS)0)
     
    22232197typedef RTR0UINTPTR                                 RTR0PROCESS;
    22242198/** Pointer to a ring-0 process handle. */
    2225 typedef RTR0PROCESS                               *PRTR0PROCESS;
     2199typedef RTR0PROCESS                         RT_FAR *PRTR0PROCESS;
    22262200/** Nil ring-0 process handle. */
    22272201#define NIL_RTR0PROCESS                             (~(RTR0PROCESS)0)
     
    22292203/** @typedef RTSEMEVENT
    22302204 * Event Semaphore handle. */
    2231 typedef R3R0PTRTYPE(struct RTSEMEVENTINTERNAL *)    RTSEMEVENT;
     2205typedef R3R0PTRTYPE(struct RTSEMEVENTINTERNAL RT_FAR *) RTSEMEVENT;
    22322206/** Pointer to an event semaphore handle. */
    2233 typedef RTSEMEVENT                                *PRTSEMEVENT;
     2207typedef RTSEMEVENT                          RT_FAR *PRTSEMEVENT;
    22342208/** Nil event semaphore handle. */
    22352209#define NIL_RTSEMEVENT                              0
     
    22372211/** @typedef RTSEMEVENTMULTI
    22382212 * Event Multiple Release Semaphore handle. */
    2239 typedef R3R0PTRTYPE(struct RTSEMEVENTMULTIINTERNAL *) RTSEMEVENTMULTI;
     2213typedef R3R0PTRTYPE(struct RTSEMEVENTMULTIINTERNAL RT_FAR *) RTSEMEVENTMULTI;
    22402214/** Pointer to an event multiple release semaphore handle. */
    2241 typedef RTSEMEVENTMULTI                           *PRTSEMEVENTMULTI;
     2215typedef RTSEMEVENTMULTI                     RT_FAR *PRTSEMEVENTMULTI;
    22422216/** Nil multiple release event semaphore handle. */
    22432217#define NIL_RTSEMEVENTMULTI                         0
     
    22452219/** @typedef RTSEMFASTMUTEX
    22462220 * Fast mutex Semaphore handle. */
    2247 typedef R3R0PTRTYPE(struct RTSEMFASTMUTEXINTERNAL *) RTSEMFASTMUTEX;
     2221typedef R3R0PTRTYPE(struct RTSEMFASTMUTEXINTERNAL RT_FAR *) RTSEMFASTMUTEX;
    22482222/** Pointer to a fast mutex semaphore handle. */
    2249 typedef RTSEMFASTMUTEX                            *PRTSEMFASTMUTEX;
     2223typedef RTSEMFASTMUTEX                      RT_FAR *PRTSEMFASTMUTEX;
    22502224/** Nil fast mutex semaphore handle. */
    22512225#define NIL_RTSEMFASTMUTEX                          0
     
    22532227/** @typedef RTSEMMUTEX
    22542228 * Mutex Semaphore handle. */
    2255 typedef R3R0PTRTYPE(struct RTSEMMUTEXINTERNAL *)    RTSEMMUTEX;
     2229typedef R3R0PTRTYPE(struct RTSEMMUTEXINTERNAL RT_FAR *) RTSEMMUTEX;
    22562230/** Pointer to a mutex semaphore handle. */
    2257 typedef RTSEMMUTEX                                *PRTSEMMUTEX;
     2231typedef RTSEMMUTEX                          RT_FAR *PRTSEMMUTEX;
    22582232/** Nil mutex semaphore handle. */
    22592233#define NIL_RTSEMMUTEX                              0
     
    22612235/** @typedef RTSEMSPINMUTEX
    22622236 * Spinning mutex Semaphore handle. */
    2263 typedef R3R0PTRTYPE(struct RTSEMSPINMUTEXINTERNAL *) RTSEMSPINMUTEX;
     2237typedef R3R0PTRTYPE(struct RTSEMSPINMUTEXINTERNAL RT_FAR *) RTSEMSPINMUTEX;
    22642238/** Pointer to a spinning mutex semaphore handle. */
    2265 typedef RTSEMSPINMUTEX                            *PRTSEMSPINMUTEX;
     2239typedef RTSEMSPINMUTEX                      RT_FAR *PRTSEMSPINMUTEX;
    22662240/** Nil spinning mutex semaphore handle. */
    22672241#define NIL_RTSEMSPINMUTEX                          0
     
    22692243/** @typedef RTSEMRW
    22702244 * Read/Write Semaphore handle. */
    2271 typedef R3R0PTRTYPE(struct RTSEMRWINTERNAL *)      RTSEMRW;
     2245typedef R3R0PTRTYPE(struct RTSEMRWINTERNAL RT_FAR *) RTSEMRW;
    22722246/** Pointer to a read/write semaphore handle. */
    2273 typedef RTSEMRW                                   *PRTSEMRW;
     2247typedef RTSEMRW                             RT_FAR *PRTSEMRW;
    22742248/** Nil read/write semaphore handle. */
    22752249#define NIL_RTSEMRW                                 0
     
    22772251/** @typedef RTSEMXROADS
    22782252 * Crossroads semaphore handle. */
    2279 typedef R3R0PTRTYPE(struct RTSEMXROADSINTERNAL *)  RTSEMXROADS;
     2253typedef R3R0PTRTYPE(struct RTSEMXROADSINTERNAL RT_FAR *) RTSEMXROADS;
    22802254/** Pointer to a crossroads semaphore handle. */
    2281 typedef RTSEMXROADS                               *PRTSEMXROADS;
     2255typedef RTSEMXROADS                         RT_FAR *PRTSEMXROADS;
    22822256/** Nil crossroads semaphore handle. */
    22832257#define NIL_RTSEMXROADS                             ((RTSEMXROADS)0)
    22842258
    22852259/** Spinlock handle. */
    2286 typedef R3R0PTRTYPE(struct RTSPINLOCKINTERNAL *)    RTSPINLOCK;
     2260typedef R3R0PTRTYPE(struct RTSPINLOCKINTERNAL RT_FAR *) RTSPINLOCK;
    22872261/** Pointer to a spinlock handle. */
    2288 typedef RTSPINLOCK                                *PRTSPINLOCK;
     2262typedef RTSPINLOCK                          RT_FAR *PRTSPINLOCK;
    22892263/** Nil spinlock handle. */
    22902264#define NIL_RTSPINLOCK                              0
    22912265
    22922266/** Socket handle. */
    2293 typedef R3R0PTRTYPE(struct RTSOCKETINT *)           RTSOCKET;
     2267typedef R3R0PTRTYPE(struct RTSOCKETINT RT_FAR *)    RTSOCKET;
    22942268/** Pointer to socket handle. */
    2295 typedef RTSOCKET                                  *PRTSOCKET;
     2269typedef RTSOCKET                            RT_FAR *PRTSOCKET;
    22962270/** Nil socket handle. */
    22972271#define NIL_RTSOCKET                                ((RTSOCKET)0)
    22982272
    22992273/** Pointer to a RTTCPSERVER handle. */
    2300 typedef struct RTTCPSERVER                        *PRTTCPSERVER;
     2274typedef struct RTTCPSERVER                  RT_FAR *PRTTCPSERVER;
    23012275/** Pointer to a RTTCPSERVER handle. */
    2302 typedef PRTTCPSERVER                              *PPRTTCPSERVER;
     2276typedef PRTTCPSERVER                        RT_FAR *PPRTTCPSERVER;
    23032277/** Nil RTTCPSERVER handle. */
    23042278#define NIL_RTTCPSERVER                            ((PRTTCPSERVER)0)
    23052279
    23062280/** Pointer to a RTUDPSERVER handle. */
    2307 typedef struct RTUDPSERVER                        *PRTUDPSERVER;
     2281typedef struct RTUDPSERVER                  RT_FAR *PRTUDPSERVER;
    23082282/** Pointer to a RTUDPSERVER handle. */
    2309 typedef PRTUDPSERVER                              *PPRTUDPSERVER;
     2283typedef PRTUDPSERVER                        RT_FAR *PPRTUDPSERVER;
    23102284/** Nil RTUDPSERVER handle. */
    23112285#define NIL_RTUDPSERVER                            ((PRTUDPSERVER)0)
    23122286
    23132287/** Thread handle.*/
    2314 typedef R3R0PTRTYPE(struct RTTHREADINT *)           RTTHREAD;
     2288typedef R3R0PTRTYPE(struct RTTHREADINT RT_FAR *)    RTTHREAD;
    23152289/** Pointer to thread handle. */
    2316 typedef RTTHREAD                                  *PRTTHREAD;
     2290typedef RTTHREAD                            RT_FAR *PRTTHREAD;
    23172291/** Nil thread handle. */
    23182292#define NIL_RTTHREAD                                0
    23192293
    23202294/** Thread context switching hook handle.   */
    2321 typedef R0PTRTYPE(struct RTTHREADCTXHOOKINT *)      RTTHREADCTXHOOK;
     2295typedef R0PTRTYPE(struct RTTHREADCTXHOOKINT RT_FAR *) RTTHREADCTXHOOK;
    23222296/** Pointer to Thread context switching hook handle. */
    2323 typedef RTTHREADCTXHOOK                           *PRTTHREADCTXHOOK;
     2297typedef RTTHREADCTXHOOK                     RT_FAR *PRTTHREADCTXHOOK;
    23242298/** Nil Thread context switching hook handle. */
    23252299#define NIL_RTTHREADCTXHOOK                         ((RTTHREADCTXHOOK)0)
     
    23282302typedef RTHCINTPTR                                  RTTLS;
    23292303/** Pointer to a TLS index. */
    2330 typedef RTTLS                                     *PRTTLS;
     2304typedef RTTLS                               RT_FAR *PRTTLS;
    23312305/** Pointer to a const TLS index. */
    2332 typedef RTTLS const                               *PCRTTLS;
     2306typedef RTTLS const                         RT_FAR *PCRTTLS;
    23332307/** NIL TLS index value. */
    23342308#define NIL_RTTLS                                   ((RTTLS)-1)
     
    23372311 * @remarks This is not a R3/R0 type like most other handles!
    23382312 */
    2339 typedef struct RTTRACEBUFINT                       *RTTRACEBUF;
     2313typedef struct RTTRACEBUFINT                 RT_FAR *RTTRACEBUF;
    23402314/** Pointer to a trace buffer handle. */
    2341 typedef RTTRACEBUF                                 *PRTTRACEBUF;
     2315typedef RTTRACEBUF                           RT_FAR *PRTTRACEBUF;
    23422316/** Nil trace buffer handle. */
    23432317#define NIL_RTTRACEBUF                              ((RTTRACEBUF)0)
     
    23472321
    23482322/** Handle to a simple heap. */
    2349 typedef R3R0PTRTYPE(struct RTHEAPSIMPLEINTERNAL *) RTHEAPSIMPLE;
     2323typedef R3R0PTRTYPE(struct RTHEAPSIMPLEINTERNAL RT_FAR *) RTHEAPSIMPLE;
    23502324/** Pointer to a handle to a simple heap. */
    2351 typedef RTHEAPSIMPLE                              *PRTHEAPSIMPLE;
     2325typedef RTHEAPSIMPLE                        RT_FAR *PRTHEAPSIMPLE;
    23522326/** NIL simple heap handle. */
    23532327#define NIL_RTHEAPSIMPLE                            ((RTHEAPSIMPLE)0)
    23542328
    23552329/** Handle to an offset based heap. */
    2356 typedef R3R0PTRTYPE(struct RTHEAPOFFSETINTERNAL *) RTHEAPOFFSET;
     2330typedef R3R0PTRTYPE(struct RTHEAPOFFSETINTERNAL RT_FAR *) RTHEAPOFFSET;
    23572331/** Pointer to a handle to an offset based heap. */
    2358 typedef RTHEAPOFFSET                              *PRTHEAPOFFSET;
     2332typedef RTHEAPOFFSET                        RT_FAR *PRTHEAPOFFSET;
    23592333/** NIL offset based heap handle. */
    23602334#define NIL_RTHEAPOFFSET                            ((RTHEAPOFFSET)0)
    23612335
    23622336/** Handle to an environment block. */
    2363 typedef R3PTRTYPE(struct RTENVINTERNAL *)           RTENV;
     2337typedef R3PTRTYPE(struct RTENVINTERNAL RT_FAR *)    RTENV;
    23642338/** Pointer to a handle to an environment block. */
    2365 typedef RTENV                                     *PRTENV;
     2339typedef RTENV                               RT_FAR *PRTENV;
    23662340/** NIL simple heap handle. */
    23672341#define NIL_RTENV                                   ((RTENV)0)
     
    23732347typedef uint32_t                                    RTCPUID;
    23742348/** Pointer to a CPU identifier. */
    2375 typedef RTCPUID                                   *PRTCPUID;
     2349typedef RTCPUID                             RT_FAR *PRTCPUID;
    23762350/** Pointer to a const CPU identifier. */
    2377 typedef RTCPUID const                             *PCRTCPUID;
     2351typedef RTCPUID const                       RT_FAR *PCRTCPUID;
    23782352/** Nil CPU Id. */
    23792353#define NIL_RTCPUID                                 ((RTCPUID)~0)
     
    23982372} RTCPUSET;
    23992373/** Pointer to a CPU set. */
    2400 typedef RTCPUSET                                  *PRTCPUSET;
     2374typedef RTCPUSET                            RT_FAR *PRTCPUSET;
    24012375/** Pointer to a const CPU set. */
    2402 typedef RTCPUSET const                            *PCRTCPUSET;
     2376typedef RTCPUSET const                      RT_FAR *PCRTCPUSET;
    24032377
    24042378/** A handle table handle. */
    2405 typedef R3R0PTRTYPE(struct RTHANDLETABLEINT *)      RTHANDLETABLE;
     2379typedef R3R0PTRTYPE(struct RTHANDLETABLEINT RT_FAR *) RTHANDLETABLE;
    24062380/** A pointer to a handle table handle. */
    2407 typedef RTHANDLETABLE                             *PRTHANDLETABLE;
     2381typedef RTHANDLETABLE                       RT_FAR *PRTHANDLETABLE;
    24082382/** @def NIL_RTHANDLETABLE
    24092383 * NIL handle table handle. */
     
    24112385
    24122386/** A handle to a low resolution timer. */
    2413 typedef R3R0PTRTYPE(struct RTTIMERLRINT *)          RTTIMERLR;
     2387typedef R3R0PTRTYPE(struct RTTIMERLRINT RT_FAR *)   RTTIMERLR;
    24142388/** A pointer to a low resolution timer handle. */
    2415 typedef RTTIMERLR                                 *PRTTIMERLR;
     2389typedef RTTIMERLR                           RT_FAR *PRTTIMERLR;
    24162390/** @def NIL_RTTIMERLR
    24172391 * NIL low resolution timer handle value. */
     
    24192393
    24202394/** Handle to a random number generator. */
    2421 typedef R3R0PTRTYPE(struct RTRANDINT *)             RTRAND;
     2395typedef R3R0PTRTYPE(struct RTRANDINT RT_FAR *)      RTRAND;
    24222396/** Pointer to a random number generator handle. */
    2423 typedef RTRAND                                    *PRTRAND;
     2397typedef RTRAND                              RT_FAR *PRTRAND;
    24242398/** NIL random number generator handle value. */
    24252399#define NIL_RTRAND                                  ((RTRAND)0)
    24262400
    24272401/** Debug address space handle. */
    2428 typedef R3R0PTRTYPE(struct RTDBGASINT *)            RTDBGAS;
     2402typedef R3R0PTRTYPE(struct RTDBGASINT RT_FAR *)     RTDBGAS;
    24292403/** Pointer to a debug address space handle. */
    2430 typedef RTDBGAS                                   *PRTDBGAS;
     2404typedef RTDBGAS                             RT_FAR *PRTDBGAS;
    24312405/** NIL debug address space handle. */
    24322406#define NIL_RTDBGAS                                 ((RTDBGAS)0)
    24332407
    24342408/** Debug module handle. */
    2435 typedef R3R0PTRTYPE(struct RTDBGMODINT *)           RTDBGMOD;
     2409typedef R3R0PTRTYPE(struct RTDBGMODINT RT_FAR *)    RTDBGMOD;
    24362410/** Pointer to a debug module handle. */
    2437 typedef RTDBGMOD                                  *PRTDBGMOD;
     2411typedef RTDBGMOD                            RT_FAR *PRTDBGMOD;
    24382412/** NIL debug module handle. */
    24392413#define NIL_RTDBGMOD                                ((RTDBGMOD)0)
    24402414
    24412415/** Manifest handle. */
    2442 typedef struct RTMANIFESTINT                      *RTMANIFEST;
     2416typedef struct RTMANIFESTINT                RT_FAR *RTMANIFEST;
    24432417/** Pointer to a manifest handle. */
    2444 typedef RTMANIFEST                                *PRTMANIFEST;
     2418typedef RTMANIFEST                          RT_FAR *PRTMANIFEST;
    24452419/** NIL manifest handle. */
    24462420#define NIL_RTMANIFEST                              ((RTMANIFEST)~(uintptr_t)0)
    24472421
    24482422/** Memory pool handle. */
    2449 typedef R3R0PTRTYPE(struct RTMEMPOOLINT *)          RTMEMPOOL;
     2423typedef R3R0PTRTYPE(struct RTMEMPOOLINT RT_FAR *)   RTMEMPOOL;
    24502424/** Pointer to a memory pool handle. */
    2451 typedef RTMEMPOOL                                 *PRTMEMPOOL;
     2425typedef RTMEMPOOL                           RT_FAR *PRTMEMPOOL;
    24522426/** NIL memory pool handle. */
    24532427#define NIL_RTMEMPOOL                               ((RTMEMPOOL)0)
     
    24562430
    24572431/** String cache handle. */
    2458 typedef R3R0PTRTYPE(struct RTSTRCACHEINT *)         RTSTRCACHE;
     2432typedef R3R0PTRTYPE(struct RTSTRCACHEINT RT_FAR *)  RTSTRCACHE;
    24592433/** Pointer to a string cache handle. */
    2460 typedef RTSTRCACHE                                *PRTSTRCACHE;
     2434typedef RTSTRCACHE                          RT_FAR *PRTSTRCACHE;
    24612435/** NIL string cache handle. */
    24622436#define NIL_RTSTRCACHE                              ((RTSTRCACHE)0)
     
    24662440
    24672441/** Virtual Filesystem handle. */
    2468 typedef struct RTVFSINTERNAL                      *RTVFS;
     2442typedef struct RTVFSINTERNAL                RT_FAR *RTVFS;
    24692443/** Pointer to a VFS handle. */
    2470 typedef RTVFS                                     *PRTVFS;
     2444typedef RTVFS                               RT_FAR *PRTVFS;
    24712445/** A NIL VFS handle. */
    24722446#define NIL_RTVFS                                   ((RTVFS)~(uintptr_t)0)
    24732447
    24742448/** Virtual Filesystem base object handle. */
    2475 typedef struct RTVFSOBJINTERNAL                   *RTVFSOBJ;
     2449typedef struct RTVFSOBJINTERNAL             RT_FAR *RTVFSOBJ;
    24762450/** Pointer to a VFS base object handle. */
    2477 typedef RTVFSOBJ                                  *PRTVFSOBJ;
     2451typedef RTVFSOBJ                            RT_FAR *PRTVFSOBJ;
    24782452/** A NIL VFS base object handle. */
    24792453#define NIL_RTVFSOBJ                                ((RTVFSOBJ)~(uintptr_t)0)
    24802454
    24812455/** Virtual Filesystem directory handle. */
    2482 typedef struct RTVFSDIRINTERNAL                   *RTVFSDIR;
     2456typedef struct RTVFSDIRINTERNAL             RT_FAR *RTVFSDIR;
    24832457/** Pointer to a VFS directory handle. */
    2484 typedef RTVFSDIR                                  *PRTVFSDIR;
     2458typedef RTVFSDIR                            RT_FAR *PRTVFSDIR;
    24852459/** A NIL VFS directory handle. */
    24862460#define NIL_RTVFSDIR                                ((RTVFSDIR)~(uintptr_t)0)
    24872461
    24882462/** Virtual Filesystem filesystem stream handle. */
    2489 typedef struct RTVFSFSSTREAMINTERNAL              *RTVFSFSSTREAM;
     2463typedef struct RTVFSFSSTREAMINTERNAL        RT_FAR *RTVFSFSSTREAM;
    24902464/** Pointer to a VFS filesystem stream handle. */
    2491 typedef RTVFSFSSTREAM                             *PRTVFSFSSTREAM;
     2465typedef RTVFSFSSTREAM                       RT_FAR *PRTVFSFSSTREAM;
    24922466/** A NIL VFS filesystem stream handle. */
    24932467#define NIL_RTVFSFSSTREAM                           ((RTVFSFSSTREAM)~(uintptr_t)0)
    24942468
    24952469/** Virtual Filesystem I/O stream handle. */
    2496 typedef struct RTVFSIOSTREAMINTERNAL              *RTVFSIOSTREAM;
     2470typedef struct RTVFSIOSTREAMINTERNAL        RT_FAR *RTVFSIOSTREAM;
    24972471/** Pointer to a VFS I/O stream handle. */
    2498 typedef RTVFSIOSTREAM                             *PRTVFSIOSTREAM;
     2472typedef RTVFSIOSTREAM                       RT_FAR *PRTVFSIOSTREAM;
    24992473/** A NIL VFS I/O stream handle. */
    25002474#define NIL_RTVFSIOSTREAM                           ((RTVFSIOSTREAM)~(uintptr_t)0)
    25012475
    25022476/** Virtual Filesystem file handle. */
    2503 typedef struct RTVFSFILEINTERNAL                  *RTVFSFILE;
     2477typedef struct RTVFSFILEINTERNAL            RT_FAR *RTVFSFILE;
    25042478/** Pointer to a VFS file handle. */
    2505 typedef RTVFSFILE                                 *PRTVFSFILE;
     2479typedef RTVFSFILE                           RT_FAR *PRTVFSFILE;
    25062480/** A NIL VFS file handle. */
    25072481#define NIL_RTVFSFILE                               ((RTVFSFILE)~(uintptr_t)0)
    25082482
    25092483/** Virtual Filesystem symbolic link handle. */
    2510 typedef struct RTVFSSYMLINKINTERNAL               *RTVFSSYMLINK;
     2484typedef struct RTVFSSYMLINKINTERNAL         RT_FAR *RTVFSSYMLINK;
    25112485/** Pointer to a VFS symbolic link handle. */
    2512 typedef RTVFSSYMLINK                              *PRTVFSSYMLINK;
     2486typedef RTVFSSYMLINK                        RT_FAR *PRTVFSSYMLINK;
    25132487/** A NIL VFS symbolic link handle. */
    25142488#define NIL_RTVFSSYMLINK                            ((RTVFSSYMLINK)~(uintptr_t)0)
    25152489
    25162490/** Async I/O manager handle. */
    2517 typedef struct RTAIOMGRINT                        *RTAIOMGR;
     2491typedef struct RTAIOMGRINT                  RT_FAR *RTAIOMGR;
    25182492/** Pointer to a async I/O manager handle. */
    2519 typedef RTAIOMGR                                  *PRTAIOMGR;
     2493typedef RTAIOMGR                            RT_FAR *PRTAIOMGR;
    25202494/** A NIL async I/O manager handle. */
    25212495#define NIL_RTAIOMGR                                ((RTAIOMGR)~(uintptr_t)0)
    25222496
    25232497/** Async I/O manager file handle. */
    2524 typedef struct RTAIOMGRFILEINT                    *RTAIOMGRFILE;
     2498typedef struct RTAIOMGRFILEINT              RT_FAR *RTAIOMGRFILE;
    25252499/** Pointer to a async I/O manager file handle. */
    2526 typedef RTAIOMGRFILE                              *PRTAIOMGRFILE;
     2500typedef RTAIOMGRFILE                        RT_FAR *PRTAIOMGRFILE;
    25272501/** A NIL async I/O manager file handle. */
    25282502#define NIL_RTAIOMGRFILE                            ((RTAIOMGRFILE)~(uintptr_t)0)
    25292503
    25302504/** Kernel module information record handle. */
    2531 typedef struct RTKRNLMODINFOINT                   *RTKRNLMODINFO;
     2505typedef struct RTKRNLMODINFOINT             RT_FAR *RTKRNLMODINFO;
    25322506/** Pointer to a kernel information record handle. */
    2533 typedef RTKRNLMODINFO                             *PRTKRNLMODINFO;
     2507typedef RTKRNLMODINFO                       RT_FAR *PRTKRNLMODINFO;
    25342508/** A NIL kernel module information record handle. */
    25352509#define NIL_RTKRNLMODINFO                          ((RTKRNLMODINFO)~(uintptr_t)0);
     
    25582532} RTHANDLETYPE;
    25592533/** Pointer to a handle type. */
    2560 typedef RTHANDLETYPE *PRTHANDLETYPE;
     2534typedef RTHANDLETYPE RT_FAR *PRTHANDLETYPE;
    25612535
    25622536/**
     
    25772551} RTHANDLEUNION;
    25782552/** Pointer to a handle union. */
    2579 typedef RTHANDLEUNION *PRTHANDLEUNION;
     2553typedef RTHANDLEUNION RT_FAR *PRTHANDLEUNION;
    25802554/** Pointer to a const handle union. */
    2581 typedef RTHANDLEUNION const *PCRTHANDLEUNION;
     2555typedef RTHANDLEUNION const RT_FAR *PCRTHANDLEUNION;
    25822556
    25832557/**
     
    25922566} RTHANDLE;
    25932567/** Pointer to a generic handle. */
    2594 typedef RTHANDLE *PRTHANDLE;
     2568typedef RTHANDLE RT_FAR *PRTHANDLE;
    25952569/** Pointer to a const generic handle. */
    2596 typedef RTHANDLE const *PCRTHANDLE;
     2570typedef RTHANDLE const RT_FAR *PCRTHANDLE;
    25972571
    25982572
     
    26372611} RTERRINFO;
    26382612/** Pointer to an error info structure. */
    2639 typedef RTERRINFO *PRTERRINFO;
     2613typedef RTERRINFO RT_FAR *PRTERRINFO;
    26402614/** Pointer to a const error info structure. */
    2641 typedef RTERRINFO const *PCRTERRINFO;
     2615typedef RTERRINFO const RT_FAR *PCRTERRINFO;
    26422616
    26432617/**
     
    26522626} RTERRINFOSTATIC;
    26532627/** Pointer to a error info buffer. */
    2654 typedef RTERRINFOSTATIC *PRTERRINFOSTATIC;
     2628typedef RTERRINFOSTATIC RT_FAR *PRTERRINFOSTATIC;
    26552629/** Pointer to a const static error info buffer. */
    2656 typedef RTERRINFOSTATIC const *PCRTERRINFOSTATIC;
     2630typedef RTERRINFOSTATIC const RT_FAR *PCRTERRINFOSTATIC;
    26572631
    26582632
     
    26892663} RTUUID;
    26902664/** Pointer to UUID data. */
    2691 typedef RTUUID *PRTUUID;
     2665typedef RTUUID RT_FAR *PRTUUID;
    26922666/** Pointer to readonly UUID data. */
    2693 typedef const RTUUID *PCRTUUID;
     2667typedef const RTUUID RT_FAR *PCRTUUID;
    26942668
    26952669/** Initializes a RTUUID structure with all zeros (RTUuidIsNull() true). */
     
    27012675
    27022676/** Compression handle. */
    2703 typedef struct RTZIPCOMP   *PRTZIPCOMP;
     2677typedef struct RTZIPCOMP   RT_FAR *PRTZIPCOMP;
    27042678/** Decompressor handle. */
    2705 typedef struct RTZIPDECOMP *PRTZIPDECOMP;
     2679typedef struct RTZIPDECOMP RT_FAR *PRTZIPDECOMP;
    27062680
    27072681
     
    27092683 * Unicode Code Point.
    27102684 */
    2711 typedef uint32_t            RTUNICP;
     2685typedef uint32_t                RTUNICP;
    27122686/** Pointer to an Unicode Code Point. */
    2713 typedef RTUNICP           *PRTUNICP;
     2687typedef RTUNICP         RT_FAR *PRTUNICP;
    27142688/** Pointer to an Unicode Code Point. */
    2715 typedef const RTUNICP     *PCRTUNICP;
     2689typedef const RTUNICP   RT_FAR *PCRTUNICP;
    27162690/** Max value a RTUNICP type can hold. */
    2717 #define RTUNICP_MAX         ( ~(RTUNICP)0 )
     2691#define RTUNICP_MAX             ( ~(RTUNICP)0 )
    27182692/** Invalid code point.
    27192693 * This is returned when encountered invalid encodings or invalid
    27202694 * unicode code points. */
    2721 #define RTUNICP_INVALID     ( UINT32_C(0xfffffffe) )
     2695#define RTUNICP_INVALID         ( UINT32_C(0xfffffffe) )
    27222696
    27232697
     
    27302704 *          and cch means count of the typedef 'char', which is assumed to be an octet.
    27312705 */
    2732 typedef uint16_t        RTUTF16;
     2706typedef uint16_t                RTUTF16;
    27332707/** Pointer to a UTF-16 character. */
    2734 typedef RTUTF16        *PRTUTF16;
     2708typedef RTUTF16         RT_FAR *PRTUTF16;
    27352709/** Pointer to a const UTF-16 character. */
    2736 typedef const RTUTF16  *PCRTUTF16;
     2710typedef const RTUTF16   RT_FAR *PCRTUTF16;
    27372711
    27382712
     
    27482722} RTSTRTUPLE;
    27492723/** Pointer to a string tuple. */
    2750 typedef RTSTRTUPLE *PRTSTRTUPLE;
     2724typedef RTSTRTUPLE RT_FAR *PRTSTRTUPLE;
    27512725/** Pointer to a const string tuple. */
    2752 typedef RTSTRTUPLE const *PCRTSTRTUPLE;
     2726typedef RTSTRTUPLE const RT_FAR *PCRTSTRTUPLE;
    27532727
    27542728/**
     
    27922766} RTPOINT;
    27932767/** Pointer to a point. */
    2794 typedef RTPOINT *PRTPOINT;
     2768typedef RTPOINT RT_FAR *PRTPOINT;
    27952769/** Pointer to a const point. */
    2796 typedef const RTPOINT *PCRTPOINT;
     2770typedef const RTPOINT RT_FAR *PCRTPOINT;
    27972771
    27982772
     
    28122786} RTRECT;
    28132787/** Pointer to a double point rectangle. */
    2814 typedef RTRECT *PRTRECT;
     2788typedef RTRECT RT_FAR *PRTRECT;
    28152789/** Pointer to a const double point rectangle. */
    2816 typedef const RTRECT *PCRTRECT;
     2790typedef const RTRECT RT_FAR *PCRTRECT;
    28172791
    28182792
     
    28382812} RTRECT2;
    28392813/** Pointer to a point + size rectangle. */
    2840 typedef RTRECT2 *PRTRECT2;
     2814typedef RTRECT2 RT_FAR *PRTRECT2;
    28412815/** Pointer to a const point + size rectangle. */
    2842 typedef const RTRECT2 *PCRTRECT2;
     2816typedef const RTRECT2 RT_FAR *PCRTRECT2;
    28432817
    28442818
     
    28542828} RTRECTSIZE;
    28552829/** Pointer to a rectangle size. */
    2856 typedef RTRECTSIZE *PRTRECTSIZE;
     2830typedef RTRECTSIZE RT_FAR *PRTRECTSIZE;
    28572831/** Pointer to a const rectangle size. */
    2858 typedef const RTRECTSIZE *PCRTRECTSIZE;
     2832typedef const RTRECTSIZE RT_FAR *PCRTRECTSIZE;
    28592833
    28602834
     
    28762850} RTMAC;
    28772851/** Pointer to a MAC address. */
    2878 typedef RTMAC *PRTMAC;
     2852typedef RTMAC RT_FAR *PRTMAC;
    28792853/** Pointer to a readonly MAC address. */
    2880 typedef const RTMAC *PCRTMAC;
     2854typedef const RTMAC RT_FAR *PCRTMAC;
    28812855
    28822856
    28832857/** Pointer to a lock validator record.
    28842858 * The structure definition is found in iprt/lockvalidator.h.  */
    2885 typedef struct RTLOCKVALRECEXCL       *PRTLOCKVALRECEXCL;
     2859typedef struct RTLOCKVALRECEXCL RT_FAR *PRTLOCKVALRECEXCL;
    28862860/** Pointer to a record of one ownership share.
    28872861 * The structure definition is found in iprt/lockvalidator.h.  */
    2888 typedef struct RTLOCKVALRECSHRD       *PRTLOCKVALRECSHRD;
     2862typedef struct RTLOCKVALRECSHRD RT_FAR *PRTLOCKVALRECSHRD;
    28892863/** Pointer to a lock validator source position.
    28902864 * The structure definition is found in iprt/lockvalidator.h.  */
    2891 typedef struct RTLOCKVALSRCPOS        *PRTLOCKVALSRCPOS;
     2865typedef struct RTLOCKVALSRCPOS  RT_FAR *PRTLOCKVALSRCPOS;
    28922866/** Pointer to a const lock validator source position.
    28932867 * The structure definition is found in iprt/lockvalidator.h.  */
    2894 typedef struct RTLOCKVALSRCPOS const   *PCRTLOCKVALSRCPOS;
     2868typedef struct RTLOCKVALSRCPOS const RT_FAR *PCRTLOCKVALSRCPOS;
    28952869
    28962870/** @name   Special sub-class values.
     
    29832957} RTRANGE;
    29842958/** Pointer to a range descriptor. */
    2985 typedef RTRANGE *PRTRANGE;
     2959typedef RTRANGE RT_FAR *PRTRANGE;
    29862960/** Pointer to a readonly range descriptor. */
    2987 typedef const RTRANGE *PCRTRANGE;
     2961typedef const RTRANGE RT_FAR *PCRTRANGE;
    29882962
    29892963
     
    29942968{
    29952969    /** Pointer into the void. */
    2996     void                  *pv;
     2970    void            RT_FAR *pv;
    29972971    /** As a signed integer. */
    29982972    intptr_t                i;
     
    30002974    intptr_t                u;
    30012975    /** Pointer to char value. */
    3002     char                  *pch;
     2976    char            RT_FAR *pch;
    30032977    /** Pointer to char value. */
    3004     unsigned char         *puch;
     2978    unsigned char   RT_FAR *puch;
    30052979    /** Pointer to a int value. */
    3006     int                   *pi;
     2980    int             RT_FAR *pi;
    30072981    /** Pointer to a unsigned int value. */
    3008     unsigned int          *pu;
     2982    unsigned int    RT_FAR *pu;
    30092983    /** Pointer to a long value. */
    3010     long                  *pl;
     2984    long            RT_FAR *pl;
    30112985    /** Pointer to a long value. */
    3012     unsigned long         *pul;
     2986    unsigned long   RT_FAR *pul;
    30132987    /** Pointer to a 8-bit unsigned value. */
    3014     uint8_t               *pu8;
     2988    uint8_t         RT_FAR *pu8;
    30152989    /** Pointer to a 16-bit unsigned value. */
    3016     uint16_t              *pu16;
     2990    uint16_t        RT_FAR *pu16;
    30172991    /** Pointer to a 32-bit unsigned value. */
    3018     uint32_t              *pu32;
     2992    uint32_t        RT_FAR *pu32;
    30192993    /** Pointer to a 64-bit unsigned value. */
    3020     uint64_t              *pu64;
     2994    uint64_t        RT_FAR *pu64;
    30212995    /** Pointer to a UTF-16 character. */
    30222996    PRTUTF16                pwc;
     
    30252999} RTPTRUNION;
    30263000/** Pointer to a pointer union. */
    3027 typedef RTPTRUNION *PRTPTRUNION;
     3001typedef RTPTRUNION RT_FAR *PRTPTRUNION;
    30283002
    30293003/**
     
    30333007{
    30343008    /** Pointer into the void. */
    3035     void const            *pv;
     3009    void const      RT_FAR *pv;
    30363010    /** As a signed integer. */
    30373011    intptr_t                i;
     
    30393013    intptr_t                u;
    30403014    /** Pointer to char value. */
    3041     char const            *pch;
     3015    char const      RT_FAR *pch;
    30423016    /** Pointer to char value. */
    3043     unsigned char const   *puch;
     3017    unsigned char const RT_FAR *puch;
    30443018    /** Pointer to a int value. */
    3045     int const             *pi;
     3019    int const       RT_FAR *pi;
    30463020    /** Pointer to a unsigned int value. */
    3047     unsigned int const     *pu;
     3021    unsigned int const RT_FAR *pu;
    30483022    /** Pointer to a long value. */
    3049     long const            *pl;
     3023    long const      RT_FAR *pl;
    30503024    /** Pointer to a long value. */
    3051     unsigned long const   *pul;
     3025    unsigned long const RT_FAR *pul;
    30523026    /** Pointer to a 8-bit unsigned value. */
    3053     uint8_t const         *pu8;
     3027    uint8_t const   RT_FAR *pu8;
    30543028    /** Pointer to a 16-bit unsigned value. */
    3055     uint16_t const        *pu16;
     3029    uint16_t const  RT_FAR *pu16;
    30563030    /** Pointer to a 32-bit unsigned value. */
    3057     uint32_t const        *pu32;
     3031    uint32_t const  RT_FAR *pu32;
    30583032    /** Pointer to a 64-bit unsigned value. */
    3059     uint64_t const        *pu64;
     3033    uint64_t const  RT_FAR *pu64;
    30603034    /** Pointer to a UTF-16 character. */
    30613035    PCRTUTF16               pwc;
     
    30643038} RTCPTRUNION;
    30653039/** Pointer to a const pointer union. */
    3066 typedef RTCPTRUNION *PRTCPTRUNION;
     3040typedef RTCPTRUNION RT_FAR *PRTCPTRUNION;
    30673041
    30683042/**
     
    30723046{
    30733047    /** Pointer into the void. */
    3074     void volatile          *pv;
     3048    void volatile  RT_FAR *pv;
    30753049    /** As a signed integer. */
    30763050    intptr_t                i;
     
    30783052    intptr_t                u;
    30793053    /** Pointer to char value. */
    3080     char volatile          *pch;
     3054    char volatile  RT_FAR *pch;
    30813055    /** Pointer to char value. */
    3082     unsigned char volatile *puch;
     3056    unsigned char volatile RT_FAR *puch;
    30833057    /** Pointer to a int value. */
    3084     int volatile           *pi;
     3058    int volatile   RT_FAR *pi;
    30853059    /** Pointer to a unsigned int value. */
    3086     unsigned int volatile *pu;
     3060    unsigned int volatile RT_FAR *pu;
    30873061    /** Pointer to a long value. */
    3088     long volatile          *pl;
     3062    long volatile  RT_FAR *pl;
    30893063    /** Pointer to a long value. */
    3090     unsigned long volatile *pul;
     3064    unsigned long volatile RT_FAR *pul;
    30913065    /** Pointer to a 8-bit unsigned value. */
    3092     uint8_t volatile       *pu8;
     3066    uint8_t volatile RT_FAR *pu8;
    30933067    /** Pointer to a 16-bit unsigned value. */
    3094     uint16_t volatile     *pu16;
     3068    uint16_t volatile RT_FAR *pu16;
    30953069    /** Pointer to a 32-bit unsigned value. */
    3096     uint32_t volatile     *pu32;
     3070    uint32_t volatile RT_FAR *pu32;
    30973071    /** Pointer to a 64-bit unsigned value. */
    3098     uint64_t volatile     *pu64;
     3072    uint64_t volatile RT_FAR *pu64;
    30993073    /** Pointer to a UTF-16 character. */
    3100     RTUTF16 volatile       *pwc;
     3074    RTUTF16 volatile RT_FAR *pwc;
    31013075    /** Pointer to a UUID character. */
    3102     RTUUID volatile        *pUuid;
     3076    RTUUID volatile  RT_FAR *pUuid;
    31033077} RTVPTRUNION;
    31043078/** Pointer to a const pointer union. */
    3105 typedef RTVPTRUNION *PRTVPTRUNION;
     3079typedef RTVPTRUNION RT_FAR *PRTVPTRUNION;
    31063080
    31073081/**
     
    31113085{
    31123086    /** Pointer into the void. */
    3113     void const volatile            *pv;
     3087    void const volatile             RT_FAR *pv;
    31143088    /** As a signed integer. */
    3115     intptr_t                        i;
     3089    intptr_t                                i;
    31163090    /** As an unsigned integer. */
    3117     intptr_t                        u;
     3091    intptr_t                                u;
    31183092    /** Pointer to char value. */
    3119     char const volatile            *pch;
     3093    char const volatile             RT_FAR *pch;
    31203094    /** Pointer to char value. */
    3121     unsigned char const volatile   *puch;
     3095    unsigned char const volatile    RT_FAR *puch;
    31223096    /** Pointer to a int value. */
    3123     int const volatile             *pi;
     3097    int const volatile              RT_FAR *pi;
    31243098    /** Pointer to a unsigned int value. */
    3125     unsigned int const volatile    *pu;
     3099    unsigned int const volatile     RT_FAR *pu;
    31263100    /** Pointer to a long value. */
    3127     long const volatile            *pl;
     3101    long const volatile             RT_FAR *pl;
    31283102    /** Pointer to a long value. */
    3129     unsigned long const volatile   *pul;
     3103    unsigned long const volatile    RT_FAR *pul;
    31303104    /** Pointer to a 8-bit unsigned value. */
    3131     uint8_t const volatile         *pu8;
     3105    uint8_t const volatile          RT_FAR *pu8;
    31323106    /** Pointer to a 16-bit unsigned value. */
    3133     uint16_t const volatile        *pu16;
     3107    uint16_t const volatile         RT_FAR *pu16;
    31343108    /** Pointer to a 32-bit unsigned value. */
    3135     uint32_t const volatile        *pu32;
     3109    uint32_t const volatile         RT_FAR *pu32;
    31363110    /** Pointer to a 64-bit unsigned value. */
    3137     uint64_t const volatile        *pu64;
     3111    uint64_t const volatile         RT_FAR *pu64;
    31383112    /** Pointer to a UTF-16 character. */
    3139     RTUTF16 const volatile         *pwc;
     3113    RTUTF16 const volatile          RT_FAR *pwc;
    31403114    /** Pointer to a UUID character. */
    3141     RTUUID const volatile          *pUuid;
     3115    RTUUID const volatile           RT_FAR *pUuid;
    31423116} RTCVPTRUNION;
    31433117/** Pointer to a const pointer union. */
    3144 typedef RTCVPTRUNION *PRTCVPTRUNION;
     3118typedef RTCVPTRUNION RT_FAR *PRTCVPTRUNION;
    31453119
    31463120
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette