VirtualBox

Changeset 3191 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jun 20, 2007 10:26:49 PM (18 years ago)
Author:
vboxsync
Message:

Main: Made it build on OS/2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/defs.h

    r2981 r3191  
    3131#include <iprt/types.h>
    3232
     33#if !defined (VBOX_WITH_XPCOM)
     34
    3335#if defined (__WIN__)
    3436
     
    4446#define NS_IMPL_ISUPPORTS1_CI(a, b)
    4547
    46 // these are XPCOM only, one for every interface implemented
     48/* these are XPCOM only, one for every interface implemented */
    4749#define NS_DECL_ISUPPORTS
    4850#define NS_DECL_IVIRTUALBOX
     
    5052#define NS_DECL_IMACHINE
    5153
    52 // input pointer argument to method
     54/* input pointer argument to method */
    5355#define INPTR
    5456
    55 // makes the name of the getter interface function (n must be capitalized)
     57/* makes the name of the getter interface function (n must be capitalized) */
    5658#define COMGETTER(n)    get_##n
    57 // makes the name of the setter interface function (n must be capitalized)
     59/* makes the name of the setter interface function (n must be capitalized) */
    5860#define COMSETTER(n)    put_##n
    5961
    60 // a type for an input GUID parameter in the interface method declaration
     62/* a type for an input GUID parameter in the interface method declaration */
    6163#define GUIDPARAM           GUID
    62 // a type for an output GUID parameter in the interface method declaration
     64/* a type for an output GUID parameter in the interface method declaration */
    6365#define GUIDPARAMOUT        GUID*
    6466
     
    7173#define COM_IIDOF(I) _ATL_IIDOF (I)
    7274
    73 #else // !defined (__WIN__)
     75#else // defined (__WIN__)
     76
     77#error "VBOX_WITH_XPCOM is not defined!"
     78
     79#endif // defined (__WIN__)
     80
     81#else // !defined (VBOX_WITH_XPCOM)
    7482
    7583// XPCOM
    7684/////////////////////////////////////////////////////////////////////////////
     85
     86#if defined (__OS2__)
     87
     88/* Make sure OS/2 Toolkit headers are pulled in to have
     89 * BOOL/ULONG/etc. typedefs already defined in order to be able to redefine
     90 * them using #define. */
     91#include <os2.h>
     92
     93/* OS/2 Toolkit defines TRUE and FALSE */
     94#undef FALSE
     95#undef TRUE
     96
     97#endif // defined (__OS2__)
    7798
    7899#include <nsID.h>
     
    112133#define TRUE PR_TRUE
    113134
    114 // makes the name of the getter interface function (n must be capitalized)
     135/* makes the name of the getter interface function (n must be capitalized) */
    115136#define COMGETTER(n)    Get##n
    116 // makes the name of the setter interface function (n must be capitalized)
     137/* makes the name of the setter interface function (n must be capitalized) */
    117138#define COMSETTER(n)    Set##n
    118139
    119 // a type to define a raw GUID variable (better to use the Guid class)
     140/* a type to define a raw GUID variable (better to use the Guid class) */
    120141#define GUID                nsID
    121 // a type for an input GUID parameter in the interface method declaration
     142/* a type for an input GUID parameter in the interface method declaration */
    122143#define GUIDPARAM           nsID &
    123 // a type for an output GUID parameter in the interface method declaration
     144/* a type for an output GUID parameter in the interface method declaration */
    124145#define GUIDPARAMOUT        nsID **
    125146
    126 // CLSID and IID for compatibility with Win32
     147/* CLSID and IID for compatibility with Win32 */
    127148typedef nsCID   CLSID;
    128149typedef nsIID   IID;
    129150
    130 // OLE error codes
     151/* OLE error codes */
    131152#define S_OK                NS_OK
    132153#define E_UNEXPECTED        NS_ERROR_UNEXPECTED
     
    147168#define COM_IIDOF(I) NS_GET_IID (I)
    148169
    149 // two very simple ATL emulator classes to provide
    150 // FinalConstruct()/FinalRelease() functionality on Linux
     170/* two very simple ATL emulator classes to provide
     171 * FinalConstruct()/FinalRelease() functionality on Linux */
    151172
    152173class CComObjectRootEx
     
    163184};
    164185
    165 // input pointer argument to method
     186/* input pointer argument to method */
    166187#define INPTR const
    167188
    168 // helper functions
     189/* helper functions */
    169190extern "C"
    170191{
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