Changeset 57336 in vbox for trunk/include/iprt/cdefs.h
- Timestamp:
- Aug 13, 2015 10:17:35 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cdefs.h
r57004 r57336 950 950 /** @def RTCALL 951 951 * The standard calling convention for the Runtime interfaces. 952 * 953 * @remarks The regparm(0) in the X86/GNUC variant deals with -mregparm=x use in 954 * the linux kernel and potentially elsewhere (3rd party). 952 955 */ 953 956 #ifdef _MSC_VER 954 # define RTCALL __cdecl957 # define RTCALL __cdecl 955 958 #elif defined(RT_OS_OS2) 956 # define RTCALL __cdecl957 #elif defined(__GNUC__) && defined( IN_RING0) && defined(RT_ARCH_X86) /** @todo consider dropping IN_RING0 here. */958 # define RTCALL __attribute__((cdecl,regparm(0))) /* regparm(0) deals with -mregparm=x use in the linux kernel. */959 # define RTCALL __cdecl 960 #elif defined(__GNUC__) && defined(RT_ARCH_X86) 961 # define RTCALL __attribute__((cdecl,regparm(0))) 959 962 #else 960 963 # define RTCALL … … 1024 1027 */ 1025 1028 #ifdef __cplusplus 1026 # if defined(_MSC_VER) || defined(RT_OS_OS2) 1027 # define DECLASM(type) extern "C" type __cdecl 1028 # elif defined(__GNUC__) && defined(RT_ARCH_X86) 1029 # define DECLASM(type) extern "C" type __attribute__((cdecl,regparm(0))) 1030 # else 1031 # define DECLASM(type) extern "C" type 1032 # endif 1033 #else 1034 # if defined(_MSC_VER) || defined(RT_OS_OS2) 1035 # define DECLASM(type) type __cdecl 1036 # elif defined(__GNUC__) && defined(RT_ARCH_X86) 1037 # define DECLASM(type) type __attribute__((cdecl,regparm(0))) 1038 # else 1039 # define DECLASM(type) type 1040 # endif 1029 # define DECLASM(type) extern "C" type RTCALL 1030 #else 1031 # define DECLASM(type) type RTCALL 1041 1032 #endif 1042 1033 … … 1045 1036 * @param type The return type of the function. 1046 1037 */ 1047 # if defined(_MSC_VER) || defined(RT_OS_OS2) 1048 # define DECLASMTYPE(type) type __cdecl 1049 #else 1050 # define DECLASMTYPE(type) type 1051 #endif 1038 #define DECLASMTYPE(type) type RTCALL 1052 1039 1053 1040 /** @def DECLNORETURN
Note:
See TracChangeset
for help on using the changeset viewer.