VirtualBox

Changeset 46690 in vbox


Ignore:
Timestamp:
Jun 19, 2013 7:56:55 PM (11 years ago)
Author:
vboxsync
Message:

VisualAge for C++: Example of why we're using DECL macros, DECLCALLBACKMEMBER in this instance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cdefs.h

    r46033 r46690  
    10661066 * @param   name    The name of the variable member.
    10671067 */
    1068 #define DECLCALLBACKPTR(type, name)  type (RTCALL * name)
     1068#if defined(__IBMC__) || defined(__IBMCPP__)
     1069# define DECLCALLBACKPTR(type, name)    type (* RTCALL name)
     1070#else
     1071# define DECLCALLBACKPTR(type, name)    type (RTCALL * name)
     1072#endif
    10691073
    10701074/** @def DECLCALLBACKMEMBER
     
    10731077 * @param   name    The name of the struct/union/class member.
    10741078 */
    1075 #define DECLCALLBACKMEMBER(type, name)  type (RTCALL * name)
     1079#if defined(__IBMC__) || defined(__IBMCPP__)
     1080# define DECLCALLBACKMEMBER(type, name) type (* RTCALL name)
     1081#else
     1082# define DECLCALLBACKMEMBER(type, name) type (RTCALL * name)
     1083#endif
    10761084
    10771085/** @def DECLR3CALLBACKMEMBER
     
    10821090 */
    10831091#ifdef IN_RING3
    1084 # define DECLR3CALLBACKMEMBER(type, name, args)  type (RTCALL * name) args
     1092# define DECLR3CALLBACKMEMBER(type, name, args)  DECLCALLBACKMEMBER(type, name) args
    10851093#else
    10861094# define DECLR3CALLBACKMEMBER(type, name, args)  RTR3PTR name
     
    10941102 */
    10951103#ifdef IN_RC
    1096 # define DECLRCCALLBACKMEMBER(type, name, args)  type (RTCALL * name) args
     1104# define DECLRCCALLBACKMEMBER(type, name, args)  DECLCALLBACKMEMBER(type, name) args
    10971105#else
    10981106# define DECLRCCALLBACKMEMBER(type, name, args)  RTRCPTR name
     
    11061114 */
    11071115#ifdef IN_RING0
    1108 # define DECLR0CALLBACKMEMBER(type, name, args)  type (RTCALL * name) args
     1116# define DECLR0CALLBACKMEMBER(type, name, args)  DECLCALLBACKMEMBER(type, name) args
    11091117#else
    11101118# define DECLR0CALLBACKMEMBER(type, name, args)  RTR0PTR name
Note: See TracChangeset for help on using the changeset viewer.

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