cdefs.h revision f95917a3bdcc968d668b50e45404ca3dda27945d
4ed92248676a091e0d73db61773d9059b36d0861stoddard * IPRT - Common C and C++ definitions.
4ed92248676a091e0d73db61773d9059b36d0861stoddard * Copyright (C) 2006-2010 Oracle Corporation
4ed92248676a091e0d73db61773d9059b36d0861stoddard * This file is part of VirtualBox Open Source Edition (OSE), as
4ed92248676a091e0d73db61773d9059b36d0861stoddard * available from http://www.virtualbox.org. This file is free software;
4ed92248676a091e0d73db61773d9059b36d0861stoddard * you can redistribute it and/or modify it under the terms of the GNU
b4b458e66e24979631466a69c4bae3090a7e50fewrowe * General Public License (GPL) as published by the Free Software
4ed92248676a091e0d73db61773d9059b36d0861stoddard * Foundation, in version 2 as it comes in the "COPYING" file of the
fa29e798c69385995c601ddfe75cbd5cf29244efwrowe * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
4ed92248676a091e0d73db61773d9059b36d0861stoddard * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
752c83c97683b1fb9879ba874593a135155a043cwrowe * The contents of this file may alternatively be used under the terms
fa29e798c69385995c601ddfe75cbd5cf29244efwrowe * of the Common Development and Distribution License Version 1.0
6b441c81aae632befd971e634b4a36780c71d18ewrowe * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
424303d026faabb9e9752310911d00fa737b603awrowe * VirtualBox OSE distribution, in which case the provisions of the
424303d026faabb9e9752310911d00fa737b603awrowe * CDDL are applicable instead of those of the GPL.
9d134be9b7d1d6f0f9e910346a8075dac77b3d69ianh * You may elect to license modified versions of this file under the
c639d9d16cb8ac0ea8163c8c46e34ef9c6810ce2wrowe * terms and conditions of either the GPL or the CDDL or both.
cfab5b5b6dc82c578597b582f76491c96b86eeb7wrowe/** @defgroup grp_rt_cdefs IPRT Common Definitions and Macros
38c8e9fef8d0536fb150af3be396f41a32d687adwrowe * Include sys/cdefs.h if present, if not define the stuff we need.
4c35be7cad99269afb697fccc1b9ba85dd2ce702wrowe/** @def RT_C_DECLS_BEGIN
4c35be7cad99269afb697fccc1b9ba85dd2ce702wrowe * Used to start a block of function declarations which are shared
4c35be7cad99269afb697fccc1b9ba85dd2ce702wrowe * between C and C++ program.
4c35be7cad99269afb697fccc1b9ba85dd2ce702wrowe/** @def RT_C_DECLS_END
4c35be7cad99269afb697fccc1b9ba85dd2ce702wrowe * Used to end a block of function declarations which are shared
4c35be7cad99269afb697fccc1b9ba85dd2ce702wrowe * between C and C++ program.
9cef38b3a87190d0c4dcd5b389573418af9de73cwrowe# if defined(__cplusplus)
6173077ec421fe85891d4b914c87175beb0a9293wrowe * Shut up DOXYGEN warnings and guide it properly thru the code.
a8f3504993ae9a401b6fc87c7a00b716b112e3d0wrowe#endif /* DOXYGEN_RUNNING */
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe/** @def RT_ARCH_X86
b4b458e66e24979631466a69c4bae3090a7e50fewrowe * Indicates that we're compiling for the X86 architecture.
9cef38b3a87190d0c4dcd5b389573418af9de73cwrowe/** @def RT_ARCH_AMD64
9cef38b3a87190d0c4dcd5b389573418af9de73cwrowe * Indicates that we're compiling for the AMD64 architecture.
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe/** @def RT_ARCH_SPARC
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe * Indicates that we're compiling for the SPARC V8 architecture (32-bit).
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe/** @def RT_ARCH_SPARC64
4c35be7cad99269afb697fccc1b9ba85dd2ce702wrowe * Indicates that we're compiling for the SPARC V9 architecture (64-bit).
fa3f183306fa2ec98249f2afec904d403643a015wrowe#if !defined(RT_ARCH_X86) \
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe && !defined(RT_ARCH_AMD64) \
4c35be7cad99269afb697fccc1b9ba85dd2ce702wrowe && !defined(RT_ARCH_SPARC) \
b56ce33e3fe5670a4562de222c60ade06fe1bce0wrowe && !defined(RT_ARCH_SPARC64) \
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe && !defined(RT_ARCH_ARM)
549b1f3d6860ae792e6a8c8d3a483140bdb857a5wrowe# if defined(__amd64__) || defined(__x86_64__) || defined(_M_X64) || defined(__AMD64__)
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe# elif defined(__i386__) || defined(_M_IX86) || defined(__X86__)
6a5b8f7bd9abe819babda806a7245a31cd0dd2fbwrowe# else /* PORTME: append test for new archs. */
6a5b8f7bd9abe819babda806a7245a31cd0dd2fbwrowe# error "Check what predefined macros your compiler uses to indicate architecture."
a8f3504993ae9a401b6fc87c7a00b716b112e3d0wrowe/* PORTME: append new archs checks. */
cfab5b5b6dc82c578597b582f76491c96b86eeb7wrowe# error "Both RT_ARCH_X86 and RT_ARCH_AMD64 cannot be defined at the same time!"
cfab5b5b6dc82c578597b582f76491c96b86eeb7wrowe# error "Both RT_ARCH_X86 and RT_ARCH_SPARC cannot be defined at the same time!"
413043ed189411cd1c673fc4911b583cb85c2c39wrowe# error "Both RT_ARCH_X86 and RT_ARCH_SPARC64 cannot be defined at the same time!"
a04a085d201d1620c077ba6ecaa7022b417b1cd5tdonovan#elif defined(RT_ARCH_AMD64) && defined(RT_ARCH_SPARC)
7a9d2ce2e2f592e97c0d4819e0e6567efcc4ba7bwrowe# error "Both RT_ARCH_AMD64 and RT_ARCH_SPARC cannot be defined at the same time!"
413043ed189411cd1c673fc4911b583cb85c2c39wrowe#elif defined(RT_ARCH_AMD64) && defined(RT_ARCH_SPARC64)
cfab5b5b6dc82c578597b582f76491c96b86eeb7wrowe# error "Both RT_ARCH_AMD64 and RT_ARCH_SPARC64 cannot be defined at the same time!"
a04a085d201d1620c077ba6ecaa7022b417b1cd5tdonovan#elif defined(RT_ARCH_SPARC) && defined(RT_ARCH_SPARC64)
cfab5b5b6dc82c578597b582f76491c96b86eeb7wrowe# error "Both RT_ARCH_SPARC and RT_ARCH_SPARC64 cannot be defined at the same time!"
a04a085d201d1620c077ba6ecaa7022b417b1cd5tdonovan# error "Both RT_ARCH_ARM and RT_ARCH_AMD64 cannot be defined at the same time!"
cfab5b5b6dc82c578597b582f76491c96b86eeb7wrowe# error "Both RT_ARCH_ARM and RT_ARCH_X86 cannot be defined at the same time!"
cfab5b5b6dc82c578597b582f76491c96b86eeb7wrowe# error "Both RT_ARCH_ARM and RT_ARCH_SPARC64 cannot be defined at the same time!"
4ed92248676a091e0d73db61773d9059b36d0861stoddard# error "Both RT_ARCH_ARM and RT_ARCH_SPARC cannot be defined at the same time!"
424303d026faabb9e9752310911d00fa737b603awrowe/** @def __X86__
424303d026faabb9e9752310911d00fa737b603awrowe * Indicates that we're compiling for the X86 architecture.
9cef38b3a87190d0c4dcd5b389573418af9de73cwrowe * @deprecated
424303d026faabb9e9752310911d00fa737b603awrowe/** @def __AMD64__
424303d026faabb9e9752310911d00fa737b603awrowe * Indicates that we're compiling for the AMD64 architecture.
9cef38b3a87190d0c4dcd5b389573418af9de73cwrowe * @deprecated
f397bb616fba8b3a5a9b3c57a5c89ad0e254b673mturk#if !defined(__X86__) && !defined(__AMD64__) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86))
9cef38b3a87190d0c4dcd5b389573418af9de73cwrowe# error "Check what predefined macros your compiler uses to indicate architecture."
7ffdcdd65e145ef18d9193d89bffff10c5da4961wrowe# error "Both __X86__ and __AMD64__ cannot be defined at the same time!"
9cef38b3a87190d0c4dcd5b389573418af9de73cwrowe/** @def RT_BIG_ENDIAN
ea0acbc141b3ca2ef21666bd23bfea9af9a758aawrowe * Defined if the architecture is big endian. */
ea0acbc141b3ca2ef21666bd23bfea9af9a758aawrowe/** @def RT_LITTLE_ENDIAN
9cef38b3a87190d0c4dcd5b389573418af9de73cwrowe * Defined if the architecture is little endian. */
9cef38b3a87190d0c4dcd5b389573418af9de73cwrowe#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) || defined(RT_ARCH_ARM)
4ed92248676a091e0d73db61773d9059b36d0861stoddard#elif defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64)
50feafa397d01128b8cf94ad1602d3d78e1a4169wrowe#if defined(RT_BIG_ENDIAN) && defined(RT_LITTLE_ENDIAN)
ea0acbc141b3ca2ef21666bd23bfea9af9a758aawrowe# error "Both RT_BIG_ENDIAN and RT_LITTLE_ENDIAN are defined"
50feafa397d01128b8cf94ad1602d3d78e1a4169wrowe/** @def IN_RING0
50feafa397d01128b8cf94ad1602d3d78e1a4169wrowe * Used to indicate that we're compiling code which is running
98086904a5df1d6127b49bf06af39f23ff844889wrowe * in Ring-0 Host Context.
b4b458e66e24979631466a69c4bae3090a7e50fewrowe/** @def IN_RING3
b4b458e66e24979631466a69c4bae3090a7e50fewrowe * Used to indicate that we're compiling code which is running
b4b458e66e24979631466a69c4bae3090a7e50fewrowe * in Ring-3 Host Context.
549b1f3d6860ae792e6a8c8d3a483140bdb857a5wrowe/** @def IN_RC
4ed92248676a091e0d73db61773d9059b36d0861stoddard * Used to indicate that we're compiling code which is running
4ed92248676a091e0d73db61773d9059b36d0861stoddard * in the Raw-mode Context (implies R0).
4ed92248676a091e0d73db61773d9059b36d0861stoddard#if !defined(IN_RING3) && !defined(IN_RING0) && !defined(IN_RC) && !defined(IN_RC)
4ed92248676a091e0d73db61773d9059b36d0861stoddard# error "You must define which context the compiled code should run in; IN_RING3, IN_RING0 or IN_RC"
4ed92248676a091e0d73db61773d9059b36d0861stoddard#if (defined(IN_RING3) && (defined(IN_RING0) || defined(IN_RC)) ) \
4ed92248676a091e0d73db61773d9059b36d0861stoddard || (defined(IN_RING0) && (defined(IN_RING3) || defined(IN_RC)) ) \
549b1f3d6860ae792e6a8c8d3a483140bdb857a5wrowe || (defined(IN_RC) && (defined(IN_RING3) || defined(IN_RING0)) )
4ed92248676a091e0d73db61773d9059b36d0861stoddard# error "Only one of the IN_RING3, IN_RING0, IN_RC defines should be defined."
b4b458e66e24979631466a69c4bae3090a7e50fewrowe/** @def ARCH_BITS
945f023c83c2d18bf5145a5b9af48fc3216fbef6wrowe * Defines the bit count of the current context.
b4b458e66e24979631466a69c4bae3090a7e50fewrowe# if defined(RT_ARCH_AMD64) || defined(RT_ARCH_SPARC64)
4ed92248676a091e0d73db61773d9059b36d0861stoddard/** @def HC_ARCH_BITS
0b64c3e5c7379284f90efc7193f16b373df39fe1wrowe * Defines the host architecture bit count.
d7f2b79379c5a3b849bf3d5dacf7180805ecba1fwrowe/** @def GC_ARCH_BITS
d7f2b79379c5a3b849bf3d5dacf7180805ecba1fwrowe * Defines the guest architecture bit count.
d7f2b79379c5a3b849bf3d5dacf7180805ecba1fwrowe#if !defined(GC_ARCH_BITS) && !defined(DOXYGEN_RUNNING)
1e83c8de3aa48b316b28057d53995272baf1260cwrowe/** @def R3_ARCH_BITS
1e83c8de3aa48b316b28057d53995272baf1260cwrowe * Defines the host ring-3 architecture bit count.
413043ed189411cd1c673fc4911b583cb85c2c39wrowe/** @def R0_ARCH_BITS
0b64c3e5c7379284f90efc7193f16b373df39fe1wrowe * Defines the host ring-0 architecture bit count.
6a5b8f7bd9abe819babda806a7245a31cd0dd2fbwrowe/** @def GC_ARCH_BITS
6a5b8f7bd9abe819babda806a7245a31cd0dd2fbwrowe * Defines the guest architecture bit count.
bc21ce13cec2409c8fdb7122154636b2df97715ajerenkrantz/** @def CTXTYPE
34e753c9dba1e821f54f0d4179f8774f854123eecolm * Declare a type differently in GC, R3 and R0.
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe * @param GCType The GC type.
14d5b1a7866541c4eb974f2d213d2aea59743c95wrowe * @param R3Type The R3 type.
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * @param R0Type The R0 type.
ac19b3a64a76401bc7e4e378b51c245a7e8516a5mturk * @remark For pointers used only in one context use RCPTRTYPE(), R3R0PTRTYPE(), R3PTRTYPE() or R0PTRTYPE().
1e83c8de3aa48b316b28057d53995272baf1260cwrowe/** @def RCPTRTYPE
1e83c8de3aa48b316b28057d53995272baf1260cwrowe * Declare a pointer which is used in the raw mode context but appears in structure(s) used by
0b64c3e5c7379284f90efc7193f16b373df39fe1wrowe * both HC and RC. The main purpose is to make sure structures have the same
bf03ef02d5f0f64ee0e91f3c4007154897d4dd34mturk * size when built for different architectures.
bf03ef02d5f0f64ee0e91f3c4007154897d4dd34mturk * @param RCType The RC type.
483ed5892604266e702d65db4d0b2b621c488a09wrowe#define RCPTRTYPE(RCType) CTXTYPE(RCType, RTRCPTR, RTRCPTR)
483ed5892604266e702d65db4d0b2b621c488a09wrowe/** @def R3R0PTRTYPE
483ed5892604266e702d65db4d0b2b621c488a09wrowe * Declare a pointer which is used in HC, is explicitly valid in ring 3 and 0,
483ed5892604266e702d65db4d0b2b621c488a09wrowe * but appears in structure(s) used by both HC and GC. The main purpose is to
483ed5892604266e702d65db4d0b2b621c488a09wrowe * make sure structures have the same size when built for different architectures.
0b64c3e5c7379284f90efc7193f16b373df39fe1wrowe * @param R3R0Type The R3R0 type.
1e83c8de3aa48b316b28057d53995272baf1260cwrowe * @remarks This used to be called HCPTRTYPE.
0b64c3e5c7379284f90efc7193f16b373df39fe1wrowe#define R3R0PTRTYPE(R3R0Type) CTXTYPE(RTHCPTR, R3R0Type, R3R0Type)
0b64c3e5c7379284f90efc7193f16b373df39fe1wrowe/** @def R3PTRTYPE
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * Declare a pointer which is used in R3 but appears in structure(s) used by
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * both HC and GC. The main purpose is to make sure structures have the same
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * size when built for different architectures.
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * @param R3Type The R3 type.
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe#define R3PTRTYPE(R3Type) CTXTYPE(RTHCUINTPTR, R3Type, RTHCUINTPTR)
538b2b76902ad0b42b4fb2c8ace94bf74d8100cewrowe/** @def R0PTRTYPE
c639d9d16cb8ac0ea8163c8c46e34ef9c6810ce2wrowe * Declare a pointer which is used in R0 but appears in structure(s) used by
c639d9d16cb8ac0ea8163c8c46e34ef9c6810ce2wrowe * both HC and GC. The main purpose is to make sure structures have the same
c639d9d16cb8ac0ea8163c8c46e34ef9c6810ce2wrowe * size when built for different architectures.
c639d9d16cb8ac0ea8163c8c46e34ef9c6810ce2wrowe * @param R0Type The R0 type.
b23117c3c7034b6e61dac1b0ffebd256950abb56wrowe#define R0PTRTYPE(R0Type) CTXTYPE(RTHCUINTPTR, RTHCUINTPTR, R0Type)
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe/** @def CTXSUFF
b23117c3c7034b6e61dac1b0ffebd256950abb56wrowe * Adds the suffix of the current context to the passed in
483ed5892604266e702d65db4d0b2b621c488a09wrowe * identifier name. The suffix is HC or GC.
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * This is macro should only be used in shared code to avoid a forest of ifdefs.
175ab758dce807990c2cfd281ffced0dd8f7d2f4nd * @param var Identifier name.
92e403ad9206eea8af7bd426fd1a19d531816d83wrowe * @deprecated Use CTX_SUFF. Do NOT use this for new code.
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe/** @def OTHERCTXSUFF
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe * Adds the suffix of the other context to the passed in
255d4d329b2d41e4ac0c3ade5cfe528a078ef682wrowe * identifier name. The suffix is HC or GC.
1e83c8de3aa48b316b28057d53995272baf1260cwrowe * This is macro should only be used in shared code to avoid a forest of ifdefs.
483ed5892604266e702d65db4d0b2b621c488a09wrowe * @param var Identifier name.
3e156d3e4514cf57f8ac77e275a68d1c12a3b937wrowe * @deprecated Use CTX_SUFF. Do NOT use this for new code.
1e83c8de3aa48b316b28057d53995272baf1260cwrowe/** @def CTXALLSUFF
1e83c8de3aa48b316b28057d53995272baf1260cwrowe * Adds the suffix of the current context to the passed in
1e83c8de3aa48b316b28057d53995272baf1260cwrowe * identifier name. The suffix is R3, R0 or GC.
24b0a59507af2a3621f586fa2a2aafc3640aa3d2nd * This is macro should only be used in shared code to avoid a forest of ifdefs.
5a51653135041ee35b24fa67453bff4e9f8e3591wrowe * @param var Identifier name.
0b64c3e5c7379284f90efc7193f16b373df39fe1wrowe * @deprecated Use CTX_SUFF. Do NOT use this for new code.
995f5596d461cdd916f9ae5b7b4dcd27efbc3c2fwrowe/** @def CTX_SUFF
0b64c3e5c7379284f90efc7193f16b373df39fe1wrowe * Adds the suffix of the current context to the passed in
0b64c3e5c7379284f90efc7193f16b373df39fe1wrowe * identifier name. The suffix is R3, R0 or RC.
1e83c8de3aa48b316b28057d53995272baf1260cwrowe * This is macro should only be used in shared code to avoid a forest of ifdefs.
1e83c8de3aa48b316b28057d53995272baf1260cwrowe * @param var Identifier name.
3ea7933c5a74b8d8d54ec2689190a865a0689420wrowe * @remark This will replace CTXALLSUFF and CTXSUFF before long.
522c5d883dd6489e5b3583c52502365e09d64382mturk/** @def CTX_SUFF_Z
2d7d2ccd828d0424f046b62d57e5551cf8ee293fwrowe * Adds the suffix of the current context to the passed in
50c06405bc48121db2913925549407fd3e79bcedmturk * identifier name, combining RC and R0 into RZ.
2d7d2ccd828d0424f046b62d57e5551cf8ee293fwrowe * The suffix thus is R3 or RZ.
f4b681ff0aa05efee56b42a893911f28c3ad931ewrowe * This is macro should only be used in shared code to avoid a forest of ifdefs.
483ed5892604266e702d65db4d0b2b621c488a09wrowe * @param var Identifier name.
483ed5892604266e702d65db4d0b2b621c488a09wrowe * @remark This will replace CTXALLSUFF and CTXSUFF before long.
483ed5892604266e702d65db4d0b2b621c488a09wrowe/** @def CTXMID
483ed5892604266e702d65db4d0b2b621c488a09wrowe * Adds the current context as a middle name of an identifier name
483ed5892604266e702d65db4d0b2b621c488a09wrowe * The middle name is HC or GC.
fa3f183306fa2ec98249f2afec904d403643a015wrowe * This is macro should only be used in shared code to avoid a forest of ifdefs.
a8f3504993ae9a401b6fc87c7a00b716b112e3d0wrowe * @param first First name.
743aeb835754aadabaec38c00742899668eb9dd1wrowe * @param last Surname.
743aeb835754aadabaec38c00742899668eb9dd1wrowe/** @def OTHERCTXMID
a8f3504993ae9a401b6fc87c7a00b716b112e3d0wrowe * Adds the other context as a middle name of an identifier name
91884afe32b87f355822244b8c123ea5b770368fwrowe * The middle name is HC or GC.
ea63537bfba2de6945fb6b4e5ceddf130e3bc0ecwrowe * This is macro should only be used in shared code to avoid a forest of ifdefs.
c82ccb99a59cb210c31b096a567e393e59d558f3colm * @param first First name.
1e83c8de3aa48b316b28057d53995272baf1260cwrowe * @param last Surname.
1e83c8de3aa48b316b28057d53995272baf1260cwrowe * @deprecated use CTX_MID or CTX_MID_Z
4ed92248676a091e0d73db61773d9059b36d0861stoddard/** @def CTXALLMID
4c35be7cad99269afb697fccc1b9ba85dd2ce702wrowe * Adds the current context as a middle name of an identifier name.
b56ce33e3fe5670a4562de222c60ade06fe1bce0wrowe * The middle name is R3, R0 or GC.
b56ce33e3fe5670a4562de222c60ade06fe1bce0wrowe * This is macro should only be used in shared code to avoid a forest of ifdefs.
b56ce33e3fe5670a4562de222c60ade06fe1bce0wrowe * @param first First name.
b56ce33e3fe5670a4562de222c60ade06fe1bce0wrowe * @param last Surname.
b56ce33e3fe5670a4562de222c60ade06fe1bce0wrowe * @deprecated use CTX_MID or CTX_MID_Z
b56ce33e3fe5670a4562de222c60ade06fe1bce0wrowe/** @def CTX_MID
b56ce33e3fe5670a4562de222c60ade06fe1bce0wrowe * Adds the current context as a middle name of an identifier name.
b56ce33e3fe5670a4562de222c60ade06fe1bce0wrowe * The middle name is R3, R0 or RC.
b56ce33e3fe5670a4562de222c60ade06fe1bce0wrowe * This is macro should only be used in shared code to avoid a forest of ifdefs.
b56ce33e3fe5670a4562de222c60ade06fe1bce0wrowe * @param first First name.
b56ce33e3fe5670a4562de222c60ade06fe1bce0wrowe * @param last Surname.
9cef38b3a87190d0c4dcd5b389573418af9de73cwrowe/** @def CTX_MID_Z
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * Adds the current context as a middle name of an identifier name, combining RC
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * and R0 into RZ.
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * The middle name thus is either R3 or RZ.
9cef38b3a87190d0c4dcd5b389573418af9de73cwrowe * This is macro should only be used in shared code to avoid a forest of ifdefs.
634c70c6512b0ae61fb1ee130266e6e9af170803wrowe * @param first First name.
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * @param last Surname.
634c70c6512b0ae61fb1ee130266e6e9af170803wrowe/** @def R3STRING
743aeb835754aadabaec38c00742899668eb9dd1wrowe * A macro which in GC and R0 will return a dummy string while in R3 it will return
945f023c83c2d18bf5145a5b9af48fc3216fbef6wrowe * the parameter.
9cef38b3a87190d0c4dcd5b389573418af9de73cwrowe * This is typically used to wrap description strings in structures shared
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe * between R3, R0 and/or GC. The intention is to avoid the \#ifdef IN_RING3 mess.
945f023c83c2d18bf5145a5b9af48fc3216fbef6wrowe * @param pR3String The R3 string. Only referenced in R3.
945f023c83c2d18bf5145a5b9af48fc3216fbef6wrowe * @see R0STRING and GCSTRING
6bc96ef510ce100bfdeefd80b8f05c010373ed13wrowe/** @def R0STRING
cfab5b5b6dc82c578597b582f76491c96b86eeb7wrowe * A macro which in GC and R3 will return a dummy string while in R0 it will return
a04a085d201d1620c077ba6ecaa7022b417b1cd5tdonovan * the parameter.
cfab5b5b6dc82c578597b582f76491c96b86eeb7wrowe * This is typically used to wrap description strings in structures shared
f71283367c234bf49ddc8ba7b23d3d3829db0d8dmturk * between R3, R0 and/or GC. The intention is to avoid the \#ifdef IN_RING0 mess.
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * @param pR0String The R0 string. Only referenced in R0.
483ed5892604266e702d65db4d0b2b621c488a09wrowe * @see R3STRING and GCSTRING
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe/** @def RCSTRING
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * A macro which in R3 and R0 will return a dummy string while in RC it will return
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * the parameter.
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * This is typically used to wrap description strings in structures shared
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * between R3, R0 and/or RC. The intention is to avoid the \#ifdef IN_RC mess.
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * @param pRCString The RC string. Only referenced in RC.
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * @see R3STRING, R0STRING
483ed5892604266e702d65db4d0b2b621c488a09wrowe/** @def RT_NOTHING
ee8892ba26f52316734c59d8002ab349c2e3fdbdcolm * A macro that expands to nothing.
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * This is primarily intended as a dummy argument for macros to avoid the
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * undefined behavior passing empty arguments to an macro (ISO C90 and C++98,
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * gcc v4.4 warns about it).
0f488df653e7e8cf4ee0006a3138f9474ca1d375wrowe/** @def RT_GCC_EXTENSION
7c11b20dfccedb7381518b3cc3cc9ef9e6731cb1wrowe * Macro for shutting up GCC warnings about using language extensions. */
7bffd59eadbb9e58f17fd29655fce6509fc1bb36niq/** @def RT_COMPILER_GROKS_64BIT_BITFIELDS
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * Macro that is defined if the compiler understands 64-bit bitfields. */
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe#if !defined(RT_OS_OS2) || (!defined(__IBMC__) && !defined(__IBMCPP__))
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe/** @def RT_COMPILER_WITH_80BIT_LONG_DOUBLE
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * Macro that is defined if the compiler implements long double as the
c639d9d16cb8ac0ea8163c8c46e34ef9c6810ce2wrowe * IEEE extended precision floating. */
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe#if (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)) && !defined(RT_OS_WINDOWS)
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe/** @def RT_EXCEPTIONS_ENABLED
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * Defined when C++ exceptions are enabled.
6a5b8f7bd9abe819babda806a7245a31cd0dd2fbwrowe && defined(__cplusplus) \
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe/** @def RT_NO_THROW
0e6bee8eb9112f77eb50766e58424afac61104d9wrowe * How to express that a function doesn't throw C++ exceptions
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * and the compiler can thus save itself the bother of trying
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * to catch any of them. Put this between the closing parenthesis
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * and the semicolon in function prototypes (and implementation if C++).
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe/** @def RT_THROW
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * How to express that a method or function throws a type of exceptions. Some
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * compilers does not want this kind of information and will warning about it.
a21b3b9d8ebb12fd51fa1d17e44d5644a35a9a5fnd * @param type The type exception.
522c5d883dd6489e5b3583c52502365e09d64382mturk * @remarks If the actual throwing is done from the header, enclose it by
522c5d883dd6489e5b3583c52502365e09d64382mturk * \#ifdef RT_EXCEPTIONS_ENABLED ... \#else ... \#endif so the header
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * compiles cleanly without exceptions enabled.
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * Do NOT use this for the actual throwing of exceptions!
752c83c97683b1fb9879ba874593a135155a043cwrowe/** @def RT_GCC_SUPPORTS_VISIBILITY_HIDDEN
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * Indicates that the "hidden" visibility attribute can be used (GCC) */
ea63537bfba2de6945fb6b4e5ceddf130e3bc0ecwrowe# if __GNUC__ >= 4 && !defined(RT_OS_OS2) && !defined(RT_OS_WINDOWS)
c639d9d16cb8ac0ea8163c8c46e34ef9c6810ce2wrowe/** @def RTCALL
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * The standard calling convention for the Runtime interfaces.
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe && !(defined(RT_ARCH_AMD64) || defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64)) /* the latter is kernel/gcc */
087e59fbe3a245960f2cbc9750181a9aba7a4f24wrowe/** @def DECLEXPORT
18062914633d6aa27c5f07c6ed20e3d169714c89wrowe * How to declare an exported function.
18062914633d6aa27c5f07c6ed20e3d169714c89wrowe * @param type The return type of the function declaration.
1462f24d09bed587fcdfb69abf1e858598a06382wrowe# define DECLEXPORT(type) __attribute__((visibility("default"))) type
37e7fdce0a4809a6c4cd3c102fc4668a6659ca95wrowe/** @def DECLIMPORT
341fe490659bc00823087e34c84ae13567d9fb8fwrowe * How to declare an imported function.
37e7fdce0a4809a6c4cd3c102fc4668a6659ca95wrowe * @param type The return type of the function declaration.
37e7fdce0a4809a6c4cd3c102fc4668a6659ca95wrowe#if defined(_MSC_VER) || (defined(RT_OS_OS2) && !defined(__IBMC__) && !defined(__IBMCPP__))
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe/** @def DECLHIDDEN
fdc76d3c3f3fea82ba0f1d8af646f8ea5e4734a2wrowe * How to declare a non-exported function or variable.
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * @param type The return type of the function or the data type of the variable.
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe#if !defined(RT_GCC_SUPPORTS_VISIBILITY_HIDDEN) || defined(RT_NO_VISIBILITY_HIDDEN)
a8f3504993ae9a401b6fc87c7a00b716b112e3d0wrowe# define DECLHIDDEN(type) __attribute__((visibility("hidden"))) type
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe/** @def DECL_HIDDEN_CONST
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe * Workaround for g++ warnings when applying the hidden attribute to a const
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe * definition. Use DECLHIDDEN for the declaration.
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe * @param a_Type The return type of the function or the data type of
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe * the variable.
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe/** @def DECL_INVALID
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe * How to declare a function not available for linking in the current context.
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe * The purpose is to create compile or like time errors when used. This isn't
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe * possible on all platforms.
f2f6daffb4236c6781e779e57561581c92a1f539wrowe * @param type The return type of the function.
19725e678f8b916b0952a002356d2098301e9727wrowe# define DECL_INVALID(type) __declspec(dllimport) type __stdcall
19725e678f8b916b0952a002356d2098301e9727wrowe/** @def DECLASM
823627d210d6c8bf02aec333587428584b29b6e2wrowe * How to declare an internal assembly function.
823627d210d6c8bf02aec333587428584b29b6e2wrowe * @param type The return type of the function declaration.
f2f6daffb4236c6781e779e57561581c92a1f539wrowe# define DECLASM(type) extern "C" type __attribute__((cdecl,regparm(0)))
25b0d23db56d263195cb27b77ee4c06a4bac92a3wrowe# define DECLASM(type) type __attribute__((cdecl,regparm(0)))
032eeda9f618fa26f635c9e8dfd854c17e76262fwrowe/** @def DECLASMTYPE
19725e678f8b916b0952a002356d2098301e9727wrowe * How to declare an internal assembly function type.
f1b8465dec39c934d4bef4a2366139ffdd021851wrowe * @param type The return type of the function.
823627d210d6c8bf02aec333587428584b29b6e2wrowe/** @def DECLNORETURN
19725e678f8b916b0952a002356d2098301e9727wrowe * How to declare a function which does not return.
f1b8465dec39c934d4bef4a2366139ffdd021851wrowe * @note: This macro can be combined with other macros, for example
f1b8465dec39c934d4bef4a2366139ffdd021851wrowe * EMR3DECL(DECLNORETURN(void)) foo(void);
746e483939cf8224eb881df41df75ef524d18223wrowe# define DECLNORETURN(type) __attribute__((noreturn)) type
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe/** @def DECLCALLBACK
875f57a863e8f7522f78c370e25db2a552231ca8wrowe * How to declare an call back function type.
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe * @param type The return type of the function declaration.
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe/** @def DECLCALLBACKPTR
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe * How to declare an call back function pointer.
f99d4fa2605925f385a184ba3789be3423690533wrowe * @param type The return type of the function declaration.
f99d4fa2605925f385a184ba3789be3423690533wrowe * @param name The name of the variable member.
f99d4fa2605925f385a184ba3789be3423690533wrowe#define DECLCALLBACKPTR(type, name) type (RTCALL * name)
f99d4fa2605925f385a184ba3789be3423690533wrowe/** @def DECLCALLBACKMEMBER
f99d4fa2605925f385a184ba3789be3423690533wrowe * How to declare an call back function pointer member.
8dda6d649a6e3be9888cd49f1d8c703d3740a06fwrowe * @param type The return type of the function declaration.
8dda6d649a6e3be9888cd49f1d8c703d3740a06fwrowe * @param name The name of the struct/union/class member.
72347cd608351452f99d5f4411d3e0c089d0293awrowe#define DECLCALLBACKMEMBER(type, name) type (RTCALL * name)
f99d4fa2605925f385a184ba3789be3423690533wrowe/** @def DECLR3CALLBACKMEMBER
60f8e9cbbfc2d757c71db17a35acb8566eebc0dawrowe * How to declare an call back function pointer member - R3 Ptr.
d0b14e6c6aabb4ed84bc056df6caeae146973c21wrowe * @param type The return type of the function declaration.
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * @param name The name of the struct/union/class member.
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * @param args The argument list enclosed in parentheses.
a901f6f8425b207639fe2d1e22b102d96f8e64ffwrowe# define DECLR3CALLBACKMEMBER(type, name, args) type (RTCALL * name) args
752c83c97683b1fb9879ba874593a135155a043cwrowe# define DECLR3CALLBACKMEMBER(type, name, args) RTR3PTR name
a901f6f8425b207639fe2d1e22b102d96f8e64ffwrowe/** @def DECLRCCALLBACKMEMBER
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * How to declare an call back function pointer member - RC Ptr.
bfd8c94a05d51f9af59fc84ed65b1336acdf95a8nd * @param type The return type of the function declaration.
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * @param name The name of the struct/union/class member.
59f8d8a98364ee033d23dbb8e459858946aaecb3wrowe * @param args The argument list enclosed in parentheses.
f99d4fa2605925f385a184ba3789be3423690533wrowe# define DECLRCCALLBACKMEMBER(type, name, args) type (RTCALL * name) args
1e83c8de3aa48b316b28057d53995272baf1260cwrowe# define DECLRCCALLBACKMEMBER(type, name, args) RTRCPTR name
1e83c8de3aa48b316b28057d53995272baf1260cwrowe/** @def DECLR0CALLBACKMEMBER
72347cd608351452f99d5f4411d3e0c089d0293awrowe * How to declare an call back function pointer member - R0 Ptr.
72347cd608351452f99d5f4411d3e0c089d0293awrowe * @param type The return type of the function declaration.
72347cd608351452f99d5f4411d3e0c089d0293awrowe * @param name The name of the struct/union/class member.
72347cd608351452f99d5f4411d3e0c089d0293awrowe * @param args The argument list enclosed in parentheses.
c2e5fcbd499ae7b5093d4877ff42e6c5ec74352bwrowe# define DECLR0CALLBACKMEMBER(type, name, args) type (RTCALL * name) args
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe# define DECLR0CALLBACKMEMBER(type, name, args) RTR0PTR name
9fb3226780b297bcc320cb19cc3ec23194fac8e1wrowe/** @def DECLINLINE
9fb3226780b297bcc320cb19cc3ec23194fac8e1wrowe * How to declare a function as inline.
9fb3226780b297bcc320cb19cc3ec23194fac8e1wrowe * @param type The return type of the function declaration.
9fb3226780b297bcc320cb19cc3ec23194fac8e1wrowe * @remarks Don't use this macro on C++ methods.
9fb3226780b297bcc320cb19cc3ec23194fac8e1wrowe/** @def DECL_FORCE_INLINE
a19c94edefc000de60a6925b4ca15637e2f785f1wrowe * How to declare a function as inline and try convince the compiler to always
a19c94edefc000de60a6925b4ca15637e2f785f1wrowe * inline it regardless of optimization switches.
a19c94edefc000de60a6925b4ca15637e2f785f1wrowe * @param type The return type of the function declaration.
a19c94edefc000de60a6925b4ca15637e2f785f1wrowe * @remarks Use sparsely and with care. Don't use this macro on C++ methods.
6bc96ef510ce100bfdeefd80b8f05c010373ed13wrowe# define DECL_FORCE_INLINE(type) __attribute__((__always_inline__)) DECLINLINE(type)
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe/** @def DECL_NO_INLINE
0bcc003d275c6b0a9060d43be89762b218cbc2c7wrowe * How to declare a function telling the compiler not to inline it.
c4101f4a8c23dce65b76e5c41b0fca7fadeb2941wrowe * @param scope The function scope, static or RT_NOTHING.
424303d026faabb9e9752310911d00fa737b603awrowe * @param type The return type of the function declaration.
424303d026faabb9e9752310911d00fa737b603awrowe * @remarks Don't use this macro on C++ methods.
f99d4fa2605925f385a184ba3789be3423690533wrowe# define DECL_NO_INLINE(scope,type) __attribute__((noinline)) scope type
1e83c8de3aa48b316b28057d53995272baf1260cwrowe# define DECL_NO_INLINE(scope,type) __declspec(noinline) scope type
e3c59608a643aac0e86a0e8cf2d62f8ef655337fwrowe/** @def IN_RT_STATIC
e3c59608a643aac0e86a0e8cf2d62f8ef655337fwrowe * Used to indicate whether we're linking against a static IPRT
#ifdef IN_RT_R0
# ifdef IN_RT_STATIC
#ifdef IN_RT_R3
# ifdef IN_RT_STATIC
#ifdef IN_RT_RC
# ifdef IN_RT_STATIC
# ifdef IN_RT_STATIC
# ifdef IN_RT_STATIC
# ifdef IN_RT_STATIC
# define RT_DECL_CLASS
#ifndef RT_WITHOUT_NOCRT_WRAPPERS
#if defined(__GNUC__)
#define RT_CONCAT_HLP(a,b) a##b
#define RT_CONCAT3_HLP(a,b,c) a##b##c
#define RT_CONCAT4_HLP(a,b,c,d) a##b##c##d
* @remark This macro is the preferred 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) )
#define RT_UOFFSETOF_ADD(type, member, addend) ( (uintptr_t)&( ((type *)(void *)(uintptr_t)(addend))->member) )
#define RT_FROM_MEMBER(pMem, Type, Member) ( (Type *) ((uint8_t *)(void *)(pMem) - RT_UOFFSETOF(Type, Member)) )
#ifdef RT_OS_OS2
resource type define in os2.h. */
#ifdef __GNUC__
# define RT_LO_U8(a) __extension__ ({ AssertCompile(sizeof((a)) == sizeof(uint16_t)); (uint8_t)(a); })
#ifdef __GNUC__
# define RT_HI_U8(a) __extension__ ({ AssertCompile(sizeof((a)) == sizeof(uint16_t)); (uint8_t)((a) >> 8); })
#ifdef __GNUC__
# define RT_LO_U16(a) __extension__ ({ AssertCompile(sizeof((a)) == sizeof(uint64_t)); (uint32_t)(a); })
#ifdef __GNUC__
# define RT_HI_U16(a) __extension__ ({ AssertCompile(sizeof((a)) == sizeof(uint32_t)); (uint16_t)((a) >> 16); })
#ifdef __GNUC__
# define RT_LO_U32(a) __extension__ ({ AssertCompile(sizeof((a)) == sizeof(uint64_t)); (uint32_t)(a); })
#ifdef __GNUC__
# define RT_HI_U32(a) __extension__ ({ AssertCompile(sizeof((a)) == sizeof(uint64_t)); (uint32_t)((a) >> 32); })
#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_MAKE_U32_FROM_U8(RT_BYTE4(u32), RT_BYTE3(u32), RT_BYTE2(u32), RT_BYTE1(u32))
#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
#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__
# if !defined(__L4ENV__)
# define RT_BREAKPOINT() __asm__ __volatile__("illtrap 0\n\t") /** @todo Sparc64: this is just a wild guess. */
# define RT_BREAKPOINT() __asm__ __volatile__("unimp 0\n\t") /** @todo Sparc: this is just a wild guess (same as Sparc64, just different name). */
#ifdef _MSC_VER
#ifndef RT_BREAKPOINT
#if defined(RT_ARCH_AMD64)
# ifdef IN_RING3
# ifdef IN_RING3
# if defined(RT_OS_SOLARIS)
/** @todo # define RT_VALID_PTR(ptr) ( (uintptr_t)(ptr) + 0x80004000U >= 0x80004000U + 0x100000000ULL ) - figure this. */
# if defined(RT_OS_SOLARIS)
# ifdef IN_RING3
# ifdef RT_OS_SOLARIS
# ifdef RT_OS_SOLARIS
#define N_(s) (s)
#define _(s) gettext(s)
# ifdef _MSC_VER
# define RT_STRICT
#ifdef RT_NO_STRICT
# define RT_LOCK_NO_STRICT
# define RT_LOCK_NO_STRICT_ORDER
# define RT_LOCK_STRICT
# define RT_LOCK_STRICT_ORDER
# define RT_INLINE_ASM_EXTERNAL 0
#if defined(_MSC_VER)
# define RT_INLINE_ASM_GNU_STYLE 0
* Defined as 1 if the compiler have and uses intrin.h. Otherwise it is 0. */
#ifdef _MSC_VER
#ifndef RT_INLINE_ASM_USES_INTRIN
# define RT_INLINE_ASM_USES_INTRIN 0
#ifdef __cplusplus
# define DECLEXPORT_CLASS
# define DECLIMPORT_CLASS
#if defined(_MSC_VER)
#if defined(_MSC_VER)