VirtualBox

Changeset 7233 in vbox


Ignore:
Timestamp:
Mar 3, 2008 12:25:32 PM (17 years ago)
Author:
vboxsync
Message:

Renamed OSType to VBOXOSTYPE to fix the clash with some mac os x typedef.

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuest.h

    r7084 r7233  
    359359    uint32_t additionsVersion;
    360360    /** guest OS type */
    361     OSType osType;
     361    VBOXOSTYPE osType;
    362362    /** @todo */
    363363} VBoxGuestInfo;
  • trunk/include/VBox/ostypes.h

    r5999 r7233  
    3232
    3333/**
    34  * Global list of guest operating system types. They are grouped
    35  * into families. A family identifer is always has mod 0x10000 == 0.
    36  * New entries can be added, however other components might depend
    37  * on the values (e.g. the Qt GUI) so if possible, the values should
    38  * stay the same.
    39  *
    40  * @todo This typedef crashes with a core Mac OS X typedef, please rename it.
     34 * Global list of guest operating system types.
     35 *
     36 * They are grouped into families. A family identifer is always has
     37 * mod 0x10000 == 0. New entries can be added, however other components
     38 * depend on the values (e.g. the Qt GUI and guest additions) so the
     39 * existing values MUST stay the same.
    4140 */
    42 typedef enum
     41typedef enum VBOXOSTYPE
    4342{
    44     OSTypeUnknown   = 0,
    45     OSTypeDOS       = 0x10000,
    46     OSTypeWin31     = 0x15000,
    47     OSTypeWin9x     = 0x20000,
    48     OSTypeWin95     = 0x21000,
    49     OSTypeWin98     = 0x22000,
    50     OSTypeWinMe     = 0x23000,
    51     OSTypeWinNT     = 0x30000,
    52     OSTypeWinNT4    = 0x31000,
    53     OSTypeWin2k     = 0x32000,
    54     OSTypeWinXP     = 0x33000,
    55     OSTypeWin2k3    = 0x34000,
    56     OSTypeWinVista  = 0x35000,
    57     OSTypeOS2       = 0x40000,
    58     OSTypeOS2Warp3  = 0x41000,
    59     OSTypeOS2Warp4  = 0x42000,
    60     OSTypeOS2Warp45 = 0x43000,
    61     OSTypeLinux     = 0x50000,
    62     OSTypeLinux22   = 0x51000,
    63     OSTypeLinux24   = 0x52000,
    64     OSTypeLinux26   = 0x53000,
    65     OSTypeFreeBSD   = 0x60000,
    66     OSTypeOpenBSD   = 0x61000,
    67     OSTypeNetBSD    = 0x62000,
    68     OSTypeNetware   = 0x70000,
    69     OSTypeSolaris   = 0x80000,
    70     OSTypeL4        = 0x90000
    71 } OSType, VBOXOSTYPE;
     43    VBOXOSTYPE_Unknown   = 0,
     44    VBOXOSTYPE_DOS       = 0x10000,
     45    VBOXOSTYPE_Win31     = 0x15000,
     46    VBOXOSTYPE_Win9x     = 0x20000,
     47    VBOXOSTYPE_Win95     = 0x21000,
     48    VBOXOSTYPE_Win98     = 0x22000,
     49    VBOXOSTYPE_WinMe     = 0x23000,
     50    VBOXOSTYPE_WinNT     = 0x30000,
     51    VBOXOSTYPE_WinNT4    = 0x31000,
     52    VBOXOSTYPE_Win2k     = 0x32000,
     53    VBOXOSTYPE_WinXP     = 0x33000,
     54    VBOXOSTYPE_Win2k3    = 0x34000,
     55    VBOXOSTYPE_WinVista  = 0x35000,
     56    VBOXOSTYPE_OS2       = 0x40000,
     57    VBOXOSTYPE_OS2Warp3  = 0x41000,
     58    VBOXOSTYPE_OS2Warp4  = 0x42000,
     59    VBOXOSTYPE_OS2Warp45 = 0x43000,
     60    VBOXOSTYPE_Linux     = 0x50000,
     61    VBOXOSTYPE_Linux22   = 0x51000,
     62    VBOXOSTYPE_Linux24   = 0x52000,
     63    VBOXOSTYPE_Linux26   = 0x53000,
     64    VBOXOSTYPE_FreeBSD   = 0x60000,
     65    VBOXOSTYPE_OpenBSD   = 0x61000,
     66    VBOXOSTYPE_NetBSD    = 0x62000,
     67    VBOXOSTYPE_Netware   = 0x70000,
     68    VBOXOSTYPE_Solaris   = 0x80000,
     69    VBOXOSTYPE_L4        = 0x90000,
     70    /** The usual 32-bit hack. */
     71    VBOXOSTYPE_32BIT_HACK = 0x7fffffff
     72} VBOXOSTYPE;
    7273
    7374__END_DECLS
  • trunk/src/VBox/Additions/WINNT/VBoxGuest/Helper.cpp

    r5999 r7233  
    201201        {
    202202            case WINNT4:
    203                 req->guestInfo.osType = OSTypeWinNT4;
     203                req->guestInfo.osType = VBOXOSTYPE_WinNT4;
    204204                break;
    205205            case WIN2K:
    206                 req->guestInfo.osType = OSTypeWin2k;
     206                req->guestInfo.osType = VBOXOSTYPE_Win2k;
    207207                break;
    208208            case WINXP:
    209                 req->guestInfo.osType = OSTypeWinXP;
     209                req->guestInfo.osType = VBOXOSTYPE_WinXP;
    210210                break;
    211211            case WIN2K3:
    212                 req->guestInfo.osType = OSTypeWin2k3;
     212                req->guestInfo.osType = VBOXOSTYPE_Win2k3;
    213213                break;
    214214            case WINVISTA:
    215                 req->guestInfo.osType = OSTypeWinVista;
     215                req->guestInfo.osType = VBOXOSTYPE_WinVista;
    216216                break;
    217217            default:
    218218                /* we don't know, therefore NT family */
    219                 req->guestInfo.osType = OSTypeWinNT;
     219                req->guestInfo.osType = VBOXOSTYPE_WinNT;
    220220                break;
    221221        }
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-os2.cpp

    r6654 r7233  
    335335static VBOXOSTYPE vboxGuestOS2DetectVersion(void)
    336336{
    337     VBOXOSTYPE enmOSType = OSTypeOS2;
     337    VBOXOSTYPE enmOSType = VBOXOSTYPE_OS2;
    338338
    339339#if 0 /** @todo dig up the version stuff from GIS later and verify that the numbers are actually decimal. */
     
    342342    {
    343343        if (uMinor >= 30 && uMinor < 40)
    344             enmOSType = OSTypeOS2Warp3;
     344            enmOSType = VBOXOSTYPE_OS2Warp3;
    345345        else if (uMinor >= 40 && uMinor < 45)
    346             enmOSType = OSTypeOS2Warp4;
     346            enmOSType = VBOXOSTYPE_OS2Warp4;
    347347        else if (uMinor >= 45 && uMinor < 50)
    348             enmOSType = OSTypeOS2Warp45;
     348            enmOSType = VBOXOSTYPE_OS2Warp45;
    349349    }
    350350#endif
  • trunk/src/VBox/Additions/linux/module/vboxmod.c

    r7166 r7233  
    874874    infoReq->guestInfo.additionsVersion = VMMDEV_VERSION;
    875875#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 0)
    876     infoReq->guestInfo.osType = OSTypeLinux26;
     876    infoReq->guestInfo.osType = VBOXOSTYPE_Linux26;
    877877#else
    878     infoReq->guestInfo.osType = OSTypeLinux24;
     878    infoReq->guestInfo.osType = VBOXOSTYPE_Linux24;
    879879#endif
    880880    rcVBox = VbglGRPerform(&infoReq->header);
  • trunk/src/VBox/Frontends/VBoxBFE/SDLConsole.cpp

    r6886 r7233  
    2323#ifdef RT_OS_DARWIN
    2424# include <Carbon/Carbon.h>
    25 # define OSType VBoxOSType
    2625# undef PAGE_SIZE
    2726# undef PAGE_SHIFT
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h

    r7207 r7233  
    4040# include <Carbon/Carbon.h>
    4141# include "DarwinCursor.h"
    42 /** @todo remove this hack when somebody get around fixing the conflicting typedef/enum OSType. */
    43 # define OSType VBoxOSType
    4442#endif
    4543
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r7221 r7233  
    35963596     *       succeeded. */
    35973597    ICInstance icInstance;
    3598     OSType psiSignature = 'psi ';
     3598    VBOXOSTYPE psiSignature = 'psi ';
    35993599    OSStatus error = ::ICStart (&icInstance, psiSignature);
    36003600    if (error == noErr)
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h

    r7220 r7233  
    4545# include <Carbon/Carbon.h>
    4646# include "DarwinCursor.h"
    47 /** @todo remove this hack when somebody get around fixing the conflicting typedef/enum OSType. */
    48 # define OSType VBoxOSType
    4947#endif
    5048
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp

    r7226 r7233  
    36023602     *       succeeded. */
    36033603    ICInstance icInstance;
    3604     OSType psiSignature = 'psi ';
     3604    VBOXOSTYPE psiSignature = 'psi ';
    36053605    OSStatus error = ::ICStart (&icInstance, psiSignature);
    36063606    if (error == noErr)
  • trunk/src/VBox/Main/GuestOSTypeImpl.cpp

    r5999 r7233  
    2424
    2525GuestOSType::GuestOSType()
    26     : mOSType (OSTypeUnknown)
     26    : mOSType (VBOXOSTYPE_Unknown)
    2727    , mRAMSize (0), mVRAMSize (0)
    2828    , mHDDSize (0), mMonitorCount (0)
     
    5858 * @param aHDDSize     recommended HDD size in megabytes
    5959 */
    60 HRESULT GuestOSType::init (const char *aId, const char *aDescription, OSType aOSType,
     60HRESULT GuestOSType::init (const char *aId, const char *aDescription, VBOXOSTYPE aOSType,
    6161                           uint32_t aRAMSize, uint32_t aVRAMSize, uint32_t aHDDSize)
    6262{
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r7207 r7233  
    43164316        const char    *id;          // utf-8
    43174317        const char    *description; // utf-8
    4318         const OSType  osType;
     4318        const VBOXOSTYPE osType;
    43194319        const uint32_t recommendedRAM;
    43204320        const uint32_t recommendedVRAM;
     
    43264326         * NOTE2: please use powers of 2 when specifying the size of harddisks since
    43274327         *        '2GB' looks better than '1.95GB' (= 2000MB) */
    4328         { "unknown",    tr ("Other/Unknown"),  OSTypeUnknown,     64,   4,  2 * _1K },
    4329         { "dos",        "DOS",                 OSTypeDOS,         32,   4,      512 },
    4330         { "win31",      "Windows 3.1",         OSTypeWin31,       32,   4,  1 * _1K },
    4331         { "win95",      "Windows 95",          OSTypeWin95,       64,   4,  2 * _1K },
    4332         { "win98",      "Windows 98",          OSTypeWin98,       64,   4,  2 * _1K },
    4333         { "winme",      "Windows Me",          OSTypeWinMe,       64,   4,  4 * _1K },
    4334         { "winnt4",     "Windows NT 4",        OSTypeWinNT4,     128,   4,  2 * _1K },
    4335         { "win2k",      "Windows 2000",        OSTypeWin2k,      168,   4,  4 * _1K },
    4336         { "winxp",      "Windows XP",          OSTypeWinXP,      192,   4, 10 * _1K },
    4337         { "win2k3",     "Windows Server 2003", OSTypeWin2k3,     256,   4, 20 * _1K },
    4338         { "winvista",   "Windows Vista",       OSTypeWinVista,   512,   4, 20 * _1K },
    4339         { "os2warp3",   "OS/2 Warp 3",         OSTypeOS2Warp3,    48,   4,  1 * _1K },
    4340         { "os2warp4",   "OS/2 Warp 4",         OSTypeOS2Warp4,    64,   4,  2 * _1K },
    4341         { "os2warp45",  "OS/2 Warp 4.5",       OSTypeOS2Warp45,   96,   4,  2 * _1K },
    4342         { "linux22",    "Linux 2.2",           OSTypeLinux22,     64,   4,  2 * _1K },
    4343         { "linux24",    "Linux 2.4",           OSTypeLinux24,    128,   4,  4 * _1K },
    4344         { "linux26",    "Linux 2.6",           OSTypeLinux26,    256,   4,  8 * _1K },
    4345         { "freebsd",    "FreeBSD",             OSTypeFreeBSD,     64,   4,  2 * _1K },
    4346         { "openbsd",    "OpenBSD",             OSTypeOpenBSD,     64,   4,  2 * _1K },
    4347         { "netbsd",     "NetBSD",              OSTypeNetBSD,      64,   4,  2 * _1K },
    4348         { "netware",    "Netware",             OSTypeNetware,    128,   4,  4 * _1K },
    4349         { "solaris",    "Solaris",             OSTypeSolaris,    128,   4,  8 * _1K },
    4350         { "l4",         "L4",                  OSTypeL4,          64,   4,  2 * _1K }
     4328        { "unknown",    tr ("Other/Unknown"),  VBOXOSTYPE_Unknown,     64,   4,  2 * _1K },
     4329        { "dos",        "DOS",                 VBOXOSTYPE_DOS,         32,   4,      512 },
     4330        { "win31",      "Windows 3.1",         VBOXOSTYPE_Win31,       32,   4,  1 * _1K },
     4331        { "win95",      "Windows 95",          VBOXOSTYPE_Win95,       64,   4,  2 * _1K },
     4332        { "win98",      "Windows 98",          VBOXOSTYPE_Win98,       64,   4,  2 * _1K },
     4333        { "winme",      "Windows Me",          VBOXOSTYPE_WinMe,       64,   4,  4 * _1K },
     4334        { "winnt4",     "Windows NT 4",        VBOXOSTYPE_WinNT4,     128,   4,  2 * _1K },
     4335        { "win2k",      "Windows 2000",        VBOXOSTYPE_Win2k,      168,   4,  4 * _1K },
     4336        { "winxp",      "Windows XP",          VBOXOSTYPE_WinXP,      192,   4, 10 * _1K },
     4337        { "win2k3",     "Windows Server 2003", VBOXOSTYPE_Win2k3,     256,   4, 20 * _1K },
     4338        { "winvista",   "Windows Vista",       VBOXOSTYPE_WinVista,   512,   4, 20 * _1K },
     4339        { "os2warp3",   "OS/2 Warp 3",         VBOXOSTYPE_OS2Warp3,    48,   4,  1 * _1K },
     4340        { "os2warp4",   "OS/2 Warp 4",         VBOXOSTYPE_OS2Warp4,    64,   4,  2 * _1K },
     4341        { "os2warp45",  "OS/2 Warp 4.5",       VBOXOSTYPE_OS2Warp45,   96,   4,  2 * _1K },
     4342        { "linux22",    "Linux 2.2",           VBOXOSTYPE_Linux22,     64,   4,  2 * _1K },
     4343        { "linux24",    "Linux 2.4",           VBOXOSTYPE_Linux24,    128,   4,  4 * _1K },
     4344        { "linux26",    "Linux 2.6",           VBOXOSTYPE_Linux26,    256,   4,  8 * _1K },
     4345        { "freebsd",    "FreeBSD",             VBOXOSTYPE_FreeBSD,     64,   4,  2 * _1K },
     4346        { "openbsd",    "OpenBSD",             VBOXOSTYPE_OpenBSD,     64,   4,  2 * _1K },
     4347        { "netbsd",     "NetBSD",              VBOXOSTYPE_NetBSD,      64,   4,  2 * _1K },
     4348        { "netware",    "Netware",             VBOXOSTYPE_Netware,    128,   4,  4 * _1K },
     4349        { "solaris",    "Solaris",             VBOXOSTYPE_Solaris,    128,   4,  8 * _1K },
     4350        { "l4",         "L4",                  VBOXOSTYPE_L4,          64,   4,  2 * _1K }
    43514351    };
    43524352
  • trunk/src/VBox/Main/include/GuestOSTypeImpl.h

    r5999 r7233  
    5151
    5252    // public initializer/uninitializer for internal purposes only
    53     HRESULT init (const char *aId, const char *aDescription, OSType aOSType,
     53    HRESULT init (const char *aId, const char *aDescription, VBOXOSTYPE aOSType,
    5454                  uint32_t aRAMSize, uint32_t aVRAMSize, uint32_t aHDDSize);
    5555    void uninit();
     
    7272    const Bstr mID;
    7373    const Bstr mDescription;
    74     const OSType mOSType;
     74    const VBOXOSTYPE mOSType;
    7575    const uint32_t mRAMSize;
    7676    const uint32_t mVRAMSize;
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