cdefs.h revision 72009a3fcd4702f799ac5f1f460632e6610faddf
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * IPRT - Common C and C++ definitions.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
c97989161fbe75bc14cea477a5443bbf474dd3advboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * available from http://www.virtualbox.org. This file is free software;
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * you can redistribute it and/or modify it under the terms of the GNU
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * General Public License (GPL) as published by the Free Software
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * The contents of this file may alternatively be used under the terms
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * of the Common Development and Distribution License Version 1.0
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * VirtualBox OSE distribution, in which case the provisions of the
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * CDDL are applicable instead of those of the GPL.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * You may elect to license modified versions of this file under the
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * terms and conditions of either the GPL or the CDDL or both.
da957c069c2a3c582fe265ff88170ce4c42b499dvboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * additional information or have any questions.
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync/** @defgroup grp_rt_cdefs IPRT Common Definitions and Macros
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Include sys/cdefs.h if present, if not define the stuff we need.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync /** @def __BEGIN_DECLS
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Used to start a block of function declarations which are shared
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * between C and C++ program.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync /** @def __END_DECLS
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Used to end a block of function declarations which are shared
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * between C and C++ program.
fe96bc0e43d9c137304462ef8c2d79cbff22446fvboxsync * Shut up DOXYGEN warnings and guide it properly thru the code.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync#endif /* DOXYGEN_RUNNING */
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def RT_ARCH_X86
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Indicates that we're compiling for the X86 architecture.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def RT_ARCH_AMD64
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Indicates that we're compiling for the AMD64 architecture.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync#if !defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# if defined(__amd64__) || defined(__x86_64__) || defined(_M_X64) || defined(__AMD64__)
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# elif defined(__i386__) || defined(_M_IX86) || defined(__X86__)
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# else /* PORTME: append test for new archs. */
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# error "Check what predefined stuff your compiler uses to indicate architecture."
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync#elif defined(RT_ARCH_X86) && defined(RT_ARCH_AMD64) /* PORTME: append new archs. */
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# error "Both RT_ARCH_X86 and RT_ARCH_AMD64 cannot be defined at the same time!"
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def __X86__
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Indicates that we're compiling for the X86 architecture.
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * @deprecated
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def __AMD64__
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * Indicates that we're compiling for the AMD64 architecture.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @deprecated
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync# error "Check what predefined stuff your compiler uses to indicate architecture."
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync# error "Both __X86__ and __AMD64__ cannot be defined at the same time!"
e3f5c51715cbf77ae2d2e9d05bafd00d69b1bec9vboxsync/** @def IN_RING0
aa32d4906f2f685992091893d5abdf27a2352a85vboxsync * Used to indicate that we're compiling code which is running
aa32d4906f2f685992091893d5abdf27a2352a85vboxsync * in Ring-0 Host Context.
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync/** @def IN_RING3
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Used to indicate that we're compiling code which is running
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * in Ring-3 Host Context.
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync/** @def IN_GC
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * Used to indicate that we're compiling code which is running
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * in Guest Context (implies R0).
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync#if !defined(IN_RING3) && !defined(IN_RING0) && !defined(IN_GC)
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync# error "You must defined which context the compiled code should run in; IN_RING3, IN_RING0 or IN_GC"
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync#if (defined(IN_RING3) && (defined(IN_RING0) || defined(IN_GC)) ) \
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync || (defined(IN_RING0) && (defined(IN_RING3) || defined(IN_GC)) ) \
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync || (defined(IN_GC) && (defined(IN_RING3) || defined(IN_RING0)) )
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync# error "Only one of the IN_RING3, IN_RING0, IN_GC defines should be defined."
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync/** @def ARCH_BITS
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * Defines the bit count of the current context.
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync/** @def HC_ARCH_BITS
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * Defines the host architecture bit count.
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync#if !defined(HC_ARCH_BITS) || defined(DOXYGEN_RUNNING)
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync/** @def GC_ARCH_BITS
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * Defines the guest architecture bit count.
6a84b239fa9107dd2fd98a0baafca598a05a2c15vboxsync#if !defined(GC_ARCH_BITS) && !defined(DOXYGEN_RUNNING)
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def R3_ARCH_BITS
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * Defines the host ring-3 architecture bit count.
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync#if !defined(R3_ARCH_BITS) || defined(DOXYGEN_RUNNING)
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def R0_ARCH_BITS
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Defines the host ring-0 architecture bit count.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync#if !defined(R0_ARCH_BITS) || defined(DOXYGEN_RUNNING)
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def GC_ARCH_BITS
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Defines the guest architecture bit count.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync#if !defined(GC_ARCH_BITS) || defined(DOXYGEN_RUNNING)
c6958b923ed12aadcf58ebbdbc80aadebbd9493evboxsync/** @def CTXTYPE
c6958b923ed12aadcf58ebbdbc80aadebbd9493evboxsync * Declare a type differently in GC, R3 and R0.
c6958b923ed12aadcf58ebbdbc80aadebbd9493evboxsync * @param GCType The GC type.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param R3Type The R3 type.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param R0Type The R0 type.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @remark For pointers used only in one context use RCPTRTYPE(), R3R0PTRTYPE(), R3PTRTYPE() or R0PTRTYPE().
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def RCPTRTYPE
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Declare a pointer which is used in the raw mode context but appears in structure(s) used by
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * both HC and RC. The main purpose is to make sure structures have the same
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * size when built for different architectures.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param RCType The RC type.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync#define RCPTRTYPE(RCType) CTXTYPE(RCType, RTRCPTR, RTRCPTR)
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def R3R0PTRTYPE
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Declare a pointer which is used in HC, is explicitely valid in ring 3 and 0,
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * but appears in structure(s) used by both HC and GC. The main purpose is to
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * make sure structures have the same size when built for different architectures.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param R3R0Type The R3R0 type.
b1cc88518a7578ee20491f3d97b9792c24c6428dvboxsync * @remarks This used to be called HCPTRTYPE.
b1cc88518a7578ee20491f3d97b9792c24c6428dvboxsync#define R3R0PTRTYPE(R3R0Type) CTXTYPE(RTHCPTR, R3R0Type, R3R0Type)
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def R3PTRTYPE
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Declare a pointer which is used in R3 but appears in structure(s) used by
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * both HC and GC. The main purpose is to make sure structures have the same
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * size when built for different architectures.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param R3Type The R3 type.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync#define R3PTRTYPE(R3Type) CTXTYPE(RTHCUINTPTR, R3Type, RTHCUINTPTR)
362838d79d234a41380be42aae9118850cc3c929vboxsync/** @def R0PTRTYPE
362838d79d234a41380be42aae9118850cc3c929vboxsync * Declare a pointer which is used in R0 but appears in structure(s) used by
362838d79d234a41380be42aae9118850cc3c929vboxsync * both HC and GC. The main purpose is to make sure structures have the same
362838d79d234a41380be42aae9118850cc3c929vboxsync * size when built for different architectures.
bc36547e8dd3d35e5f756643a267bbe01e2c1d4cvboxsync * @param R0Type The R0 type.
bc36547e8dd3d35e5f756643a267bbe01e2c1d4cvboxsync#define R0PTRTYPE(R0Type) CTXTYPE(RTHCUINTPTR, RTHCUINTPTR, R0Type)
362838d79d234a41380be42aae9118850cc3c929vboxsync/** @def CTXSUFF
362838d79d234a41380be42aae9118850cc3c929vboxsync * Adds the suffix of the current context to the passed in
362838d79d234a41380be42aae9118850cc3c929vboxsync * identifier name. The suffix is HC or GC.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * This is macro should only be used in shared code to avoid a forrest of ifdefs.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param var Identifier name.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @deprecated Use CTX_SUFF. Do NOT use this for new code.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def OTHERCTXSUFF
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Adds the suffix of the other context to the passed in
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * identifier name. The suffix is HC or GC.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * This is macro should only be used in shared code to avoid a forrest of ifdefs.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param var Identifier name.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @deprecated Use CTX_SUFF. Do NOT use this for new code.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def CTXALLSUFF
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Adds the suffix of the current context to the passed in
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * identifier name. The suffix is R3, R0 or GC.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * This is macro should only be used in shared code to avoid a forrest of ifdefs.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param var Identifier name.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @deprecated Use CTX_SUFF. Do NOT use this for new code.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def CTX_SUFF
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Adds the suffix of the current context to the passed in
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * identifier name. The suffix is R3, R0 or RC.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * This is macro should only be used in shared code to avoid a forrest of ifdefs.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param var Identifier name.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @remark This will replace CTXALLSUFF and CTXSUFF before long.
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync/** @def CTX_SUFF_Z
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * Adds the suffix of the current context to the passed in
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * identifier name, combining RC and R0 into RZ.
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * The suffix thus is R3 or RZ.
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * This is macro should only be used in shared code to avoid a forrest of ifdefs.
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * @param var Identifier name.
fe96bc0e43d9c137304462ef8c2d79cbff22446fvboxsync * @remark This will replace CTXALLSUFF and CTXSUFF before long.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def CTXMID
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Adds the current context as a middle name of an identifier name
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * The middle name is HC or GC.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * This is macro should only be used in shared code to avoid a forrest of ifdefs.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param first First name.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param last Surname.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def OTHERCTXMID
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Adds the other context as a middle name of an identifier name
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * The middle name is HC or GC.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * This is macro should only be used in shared code to avoid a forrest of ifdefs.
97dc0e92bcc0cddf896cbf620b689b095c7346davboxsync * @param first First name.
97dc0e92bcc0cddf896cbf620b689b095c7346davboxsync * @param last Surname.
97dc0e92bcc0cddf896cbf620b689b095c7346davboxsync * @deprecated use CTX_MID or CTX_MID_Z
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync/** @def CTXALLMID
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync * Adds the current context as a middle name of an identifier name.
97dc0e92bcc0cddf896cbf620b689b095c7346davboxsync * The middle name is R3, R0 or GC.
97dc0e92bcc0cddf896cbf620b689b095c7346davboxsync * This is macro should only be used in shared code to avoid a forrest of ifdefs.
97dc0e92bcc0cddf896cbf620b689b095c7346davboxsync * @param first First name.
97dc0e92bcc0cddf896cbf620b689b095c7346davboxsync * @param last Surname.
97dc0e92bcc0cddf896cbf620b689b095c7346davboxsync * @deprecated use CTX_MID or CTX_MID_Z
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def CTX_MID
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Adds the current context as a middle name of an identifier name.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * The middle name is R3, R0 or RC.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * This is macro should only be used in shared code to avoid a forrest of ifdefs.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param first First name.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param last Surname.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync/** @def CTX_MID_Z
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * Adds the current context as a middle name of an identifier name, combining RC
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * and R0 into RZ.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * The middle name thus is either R3 or RZ.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * This is macro should only be used in shared code to avoid a forrest of ifdefs.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param first First name.
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync * @param last Surname.
#ifdef IN_RING3
#ifdef IN_RING0
#ifdef IN_GC
#ifdef _MSC_VER
#elif defined(__GNUC__) && defined(IN_RING0) && !(defined(RT_OS_OS2) || defined(RT_ARCH_AMD64)) /* the latter is kernel/gcc */
# define RTCALL
#if defined(__cplusplus) \
# define RT_NO_THROW
#ifdef __cplusplus
# ifdef _MSC_VER
# ifdef _MSC_VER
#ifdef _MSC_VER
#ifdef _MSC_VER
#ifdef IN_RING3
#ifdef IN_GC
#ifdef IN_RING0
#ifdef __GNUC__
#ifdef IN_RT_R0
# ifdef IN_RT_STATIC
#ifdef IN_RT_R3
# ifdef IN_RT_STATIC
#ifdef IN_RT_GC
# ifdef IN_RT_STATIC
# ifdef IN_RT_STATIC
# ifdef IN_RT_STATIC
#ifndef RT_WITHOUT_NOCRT_WRAPPERS
#if defined(__GNUC__)
* @remark This macro is the prefered alignment macro, it doesn't have any of the pitfalls RT_ALIGN has.
#define RT_ALIGN_T(u, uAlignment, type) ( ((type)(u) + ((uAlignment) - 1)) & ~(type)((uAlignment) - 1) )
#ifdef RT_OS_OS2
resource type define in os2.h. */
#define RT_BSWAP_U64_C(u64) RT_MAKE_U64(RT_BSWAP_U32_C((u64) >> 32), RT_BSWAP_U32_C((u64) & 0xffffffff))
#define RT_BSWAP_U32_C(u32) (RT_BYTE4(u32) | (RT_BYTE3(u32) << 8) | (RT_BYTE2(u32) << 16) | (RT_BYTE1(u32) << 24))
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifdef RT_BIG_ENDIAN
#ifndef RT_NO_DEPRECATED_MACROS
#if defined(RT_OS_DARWIN) \
&& !defined(KERNEL) \
&& !defined(RT_NO_BSD_PARAM_H_UNDEFING) \
#ifndef NULL
# ifdef __cplusplus
# define NULL 0
# define NULL ((void*)0)
#define NIL_OFFSET (~0U)
#ifdef __GNUC__
#ifdef _MSC_VER
#ifndef Breakpoint
#if defined(RT_ARCH_AMD64)
# ifdef IN_RING3
#define N_(s) (s)
#define _(s) gettext(s)
* With GNU C we'd like to use the builtin __PRETTY_FUNCTION__, so define that for the other compilers.
# define RT_STRICT
#ifdef __cplusplus
# define DECLEXPORT_CLASS
# define DECLIMPORT_CLASS
#if defined(_MSC_VER)
#if defined(_MSC_VER)