VirtualBox

Ignore:
Timestamp:
Jun 21, 2007 3:44:41 AM (18 years ago)
Author:
vboxsync
Message:

Make it build on OS/2.

Location:
trunk/src/VBox/Additions/common/VBoxGuestLib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk

    r3090 r3192  
    4040        VBoxGuestLibBaseLinux
    4141 endif
     42endif
     43ifdef VBOX_WITH_OS2_ADDITIONS
     44 LIBRARIES += \
     45        VBoxGuestLibOS2 \
     46        VBoxGuestLibBaseOS2
    4247endif
    4348
     
    105110
    106111
     112#
     113# VBoxGuestLibOS2
     114#
     115VBoxGuestLibOS2_TEMPLATE  = VBOXR0DRV
     116VBoxGuestLibOS2_SOURCES   = $(SOURCES_GUESTLIB)
     117VBoxGuestLibOS2_INCS      = $(VBoxGuestLib_INCS)
     118VBoxGuestLibOS2_DEFS      = VBOX_HGCM LOG_TO_BACKDOOR IN_GUEST_R0 IN_GUEST
     119
     120
     121#
     122# VBoxGuestLibBaseOS2
     123#
     124VBoxGuestLibBaseOS2_TEMPLATE = VBOXR0DRV
     125VBoxGuestLibBaseOS2_SOURCES  = $(SOURCES_GUESTLIBBASE)
     126VBoxGuestLibBaseOS2_INCS     = $(VBoxGuestLib_INCS)
     127VBoxGuestLibBaseOS2_DEFS     = VBOX_HGCM VBGL_VBOXGUEST LOG_TO_BACKDOOR IN_GUEST_R0 IN_GUEST
     128
     129
    107130include $(PATH_KBUILD)/subfooter.kmk
    108131
  • trunk/src/VBox/Additions/common/VBoxGuestLib/SysHlp.cpp

    r3105 r3192  
    125125    Log(("vbglDriverOpen VBoxGuest failed with ntstatus=%x\n", rc));
    126126    return rc;
    127 #else
     127
     128#elif defined (__LINUX__)
    128129    void *opaque;
    129130
     
    135136    pDriver->opaque = opaque;
    136137    return VINF_SUCCESS;
     138
     139#elif defined (__OS2__)
     140    return VERR_NOT_IMPLEMENTED;
     141
     142#else
     143# error "Port me"
    137144#endif
    138145}
     
    179186
    180187    return NT_SUCCESS(rc)? VINF_SUCCESS: VERR_VBGL_IOCTL_FAILED;
    181 #else
     188
     189#elif defined (__LINUX__)
    182190    return vboxadd_cmc_call (pDriver->opaque, u32Function, pvData);
     191
     192#elif defined (__OS2__)
     193    return VERR_NOT_IMPLEMENTED;
     194
     195#else
     196# error "Port me"
    183197#endif
    184198}
     
    189203    Log(("vbglDriverClose pDeviceObject=%x\n", pDriver->pDeviceObject));
    190204    ObDereferenceObject (pDriver->pFileObject);
    191 #else
     205
     206#elif defined (__LINUX__)
    192207    vboxadd_cmc_close (pDriver->opaque);
     208
     209#elif defined (__OS2__)
     210   
     211
     212#else
     213# error "Port me"
    193214#endif
    194215}
  • trunk/src/VBox/Additions/common/VBoxGuestLib/SysHlp.h

    r3090 r3192  
    5252    PDEVICE_OBJECT pDeviceObject;
    5353    PFILE_OBJECT pFileObject;
    54 #else /* !__WIN__ */
     54#elif defined (__LINUX__)
    5555    void *opaque;
    56 #endif /* !__WIN__ */
     56#elif defined (__OS2__)
     57    uint32_t placeholder;
     58#else
     59# error "Port me"
     60#endif
    5761} VBGLDRIVER;
    5862
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxCalls.c

    r3108 r3192  
    3232#include <iprt/time.h>
    3333#include <iprt/path.h>
     34#include <iprt/string.h>
    3435
    3536#define SHFL_CPARMS_SET_UTF8 0
     
    4142    (a)->cParms      = SHFL_CPARMS_##b
    4243
    43 #ifdef __linux__
    44 # include <linux/string.h>
     44#ifndef __WIN__
    4545# define RtlZeroMemory(a, b) memset (a, 0, b)
    4646#endif
     
    182182
    183183DECLVBGL(int) vboxCallMapFolder(PVBSFCLIENT pClient, PSHFLSTRING szFolderName,
    184                       PVBSFMAP pMap)
     184                                PVBSFMAP pMap)
    185185{
    186186    int rc = VINF_SUCCESS;
     
    237237
    238238DECLVBGL(int) vboxCallCreate (PVBSFCLIENT pClient, PVBSFMAP pMap,
    239                     PSHFLSTRING pParsedPath, PSHFLCREATEPARMS pCreateParms)
     239                              PSHFLSTRING pParsedPath, PSHFLCREATEPARMS pCreateParms)
    240240{
    241241    /** @todo copy buffers to physical or mapped memory. */
     
    297297
    298298DECLVBGL(int) vboxCallRemove (PVBSFCLIENT pClient, PVBSFMAP pMap,
    299                     PSHFLSTRING pParsedPath, uint32_t flags)
     299                              PSHFLSTRING pParsedPath, uint32_t flags)
    300300{
    301301    int rc = VINF_SUCCESS;
     
    329329
    330330DECLVBGL(int) vboxCallRename (PVBSFCLIENT pClient, PVBSFMAP pMap,
    331                     PSHFLSTRING pSrcPath, PSHFLSTRING pDestPath, uint32_t flags)
     331                              PSHFLSTRING pSrcPath, PSHFLSTRING pDestPath, uint32_t flags)
    332332{
    333333    int rc = VINF_SUCCESS;
     
    364364
    365365DECLVBGL(int) vboxCallRead(PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile,
    366                  uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer)
     366                           uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer)
    367367{
    368368    int rc = VINF_SUCCESS;
     
    399399
    400400DECLVBGL(int) vboxCallWrite(PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile,
    401                   uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer)
     401                            uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer)
    402402{
    403403    int rc = VINF_SUCCESS;
     
    514514
    515515DECLVBGL(int) vboxCallFSInfo(PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile,
    516                    uint32_t flags, uint32_t *pcbBuffer, PSHFLDIRINFO pBuffer)
     516                             uint32_t flags, uint32_t *pcbBuffer, PSHFLDIRINFO pBuffer)
    517517{
    518518    int rc = VINF_SUCCESS;
     
    549549
    550550DECLVBGL(int) vboxCallLock(PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile,
    551                  uint64_t offset, uint64_t cbSize, uint32_t fLock)
     551                           uint64_t offset, uint64_t cbSize, uint32_t fLock)
    552552{
    553553    int rc = VINF_SUCCESS;
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxCalls.h

    r3108 r3192  
    8686#define DRIVE_FLAG_WRITE_PROTECTED (0x4)
    8787
    88 #ifndef __linux__
     88#ifdef __WIN__
    8989/** Device extension structure for each drive letter we created. */
    9090typedef struct _VBSFDRIVE
     
    112112} VBSFDRIVE;
    113113typedef VBSFDRIVE *PVBSFDRIVE;
    114 #endif
     114#endif /* __WIN__ */
    115115
    116116/* forward decl */
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