VirtualBox

Changeset 43363 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Sep 20, 2012 9:56:07 AM (12 years ago)
Author:
vboxsync
Message:

Haiku Additions.

Location:
trunk/src/VBox/Additions/common
Files:
3 added
5 edited

Legend:

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

    r41477 r43363  
    2323 include $(PATH_SUB_CURRENT)/VBoxGuestLib/Makefile.kmk
    2424 include $(PATH_SUB_CURRENT)/VBoxControl/Makefile.kmk
    25  if1of ($(KBUILD_TARGET), freebsd linux os2 solaris win)
     25 if1of ($(KBUILD_TARGET), freebsd haiku linux os2 solaris win)
    2626  include $(PATH_SUB_CURRENT)/VBoxGuest/Makefile.kmk
    2727 endif
    28  if1of ($(KBUILD_TARGET), freebsd linux os2 solaris win)
     28 if1of ($(KBUILD_TARGET), freebsd haiku linux os2 solaris win)
    2929  include $(PATH_SUB_CURRENT)/VBoxService/Makefile.kmk
    3030 endif
  • trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk

    r42239 r43363  
    2020
    2121
    22 if1of ($(KBUILD_TARGET), freebsd $(if $(defined VBOX_WITH_ADDITION_DRIVERS),linux,) os2 solaris win)
     22if1of ($(KBUILD_TARGET), freebsd haiku $(if $(defined VBOX_WITH_ADDITION_DRIVERS),linux,) os2 solaris win)
    2323 #
    2424 # VBoxGuest - The Guest Additions Driver.
     
    2727 VBoxGuest_TEMPLATE      = VBOXGUESTR0
    2828 VBoxGuest_NAME.freebsd  = vboxguest
     29 VBoxGuest_NAME.haiku    = vboxguest
    2930 VBoxGuest_NAME.linux    = vboxguest
    3031 VBoxGuest_NAME.solaris  = vboxguest
     
    3334  VBoxGuest_DEBUG_INSTTYPE.win = both
    3435 endif
     36 VBoxGuest_DEFS.haiku    = VBOX_SVN_REV=$(VBOX_SVN_REV) _KERNEL_MODE=1
    3537 VBoxGuest_DEFS.linux    = KBUILD_MODNAME=KBUILD_STR\(vboxguest\) KBUILD_BASENAME=KBUILD_STR\(vboxguest\) DEBUG_HASH=2 DEBUG_HASH2=3 EXPORT_SYMTAB
    3638 VBoxGuest_DEFS.solaris  = VBOX_SVN_REV=$(VBOX_SVN_REV)
     
    5052 VBoxGuest_DEPS.linux   += $(VBOX_SVN_REV_HEADER)
    5153 VBoxGuest_DEPS.freebsd += $(VBOX_SVN_REV_HEADER)
     54 VBoxGuest_DEPS.haiku   += $(VBOX_SVN_REV_HEADER)
    5255 VBoxGuest_DEFS          = VBGL_VBOXGUEST VBOX_WITH_HGCM
    5356 VBoxGuest_INCS          = .
     
    7578   endif
    7679  endif # win
    77   ifn1of ($(KBUILD_TARGET), linux freebsd solaris)
     80  ifn1of ($(KBUILD_TARGET), linux freebsd solaris haiku)
    7881   VBoxGuest_SOURCES    = VBoxGuest-$(KBUILD_TARGET).cpp
    7982  else
     
    9598        $(PATH_STAGE)/gen-sys-hdrs/bus_if.h \
    9699        $(PATH_STAGE)/gen-sys-hdrs/device_if.h
     100  ifeq ($(KBUILD_TARGET),haiku)
     101   # Haiku drivers cannot export symbols for other drivers, but modules can.
     102   # Therefore vboxguest is a module containing the ring-0 guest lib, and vboxdev/vboxsf
     103   # use this module to access the guest lib
     104   SYSMODS += VBoxDev
     105   VBoxDev_TEMPLATE      = VBOXGUESTR0
     106   VBoxDev_NAME          = vboxdev
     107   VBoxDev_DEFS          = VBOX_SVN_REV=$(VBOX_SVN_REV) _KERNEL_MODE=1 VBGL_VBOXGUEST VBOX_WITH_HGCM IN_RING0
     108   VBoxDev_SOURCES       = VBoxDev-haiku.c VBoxGuest-haiku-stubs.c
     109  endif
    97110 else # OS/2:
    98111  # The library order is crucial, so a bit of trickery is necessary.
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp

    r43016 r43363  
    3838
    3939#elif defined(RT_OS_FREEBSD) \
     40   || defined(RT_OS_HAIKU) \
    4041   || defined(RT_OS_LINUX) \
    4142   || defined(RT_OS_SOLARIS)
     
    198199#else
    199200
    200     /* The default implementation. (linux, solaris, freebsd) */
     201    /* The default implementation. (linux, solaris, freebsd, haiku) */
    201202    RTFILE File;
    202203    int rc = RTFileOpen(&File, pszDeviceName, RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);
     
    381382    return rc;
    382383
     384#elif defined(RT_OS_HAIKU)
     385        /* The ioctl hook in Haiku does take the len parameter when specified,
     386         * so just use it.
     387         */
     388    int rc = ioctl((int)g_File, iFunction, pvData, cbData);
     389    if (RT_LIKELY(rc == 0))
     390        return VINF_SUCCESS;
     391
     392    /* Positive values are negated VBox error status codes. */
     393    if (rc > 0)
     394        rc = -rc;
     395    else
     396        rc = RTErrConvertFromErrno(errno);
     397    return rc;
     398
    383399#elif defined(VBOX_VBGLR3_XFREE86)
    384400    /* PORTME - This is preferred over the RTFileIOCtl variant below, just be careful with the (int). */
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp

    r37608 r43363  
    411411        VBoxServiceError("VBoxServiceTimeSyncAdjust: GetSystemTimeAdjustment failed, error=%ld\n", GetLastError());
    412412
    413 #elif defined(RT_OS_OS2)
     413#elif defined(RT_OS_OS2) || defined(RT_OS_HAIKU)
    414414    /* No API for doing gradual time adjustments. */
    415415
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp

    r43230 r43363  
    4040# include <net/if.h>
    4141# include <unistd.h>
    42 # ifndef RT_OS_OS2
    43 #  ifndef RT_OS_FREEBSD
    44 #   include <utmpx.h> /* @todo FreeBSD 9 should have this. */
    45 #  endif
     42# if !defined(RT_OS_OS2) && !defined(RT_OS_FREEBSD) && !defined(RT_OS_HAIKU)
     43#  include <utmpx.h> /* @todo FreeBSD 9 should have this. */
    4644# endif
    4745# ifdef RT_OS_SOLARIS
     
    266264    rc = VERR_NOT_IMPLEMENTED;
    267265
     266#elif defined(RT_OS_HAIKU)
     267    /** @todo Haiku: Port logged on user info retrieval. */
     268    rc = VERR_NOT_IMPLEMENTED;
     269
    268270#elif defined(RT_OS_OS2)
    269271    /** @todo OS/2: Port logged on (LAN/local/whatever) user info retrieval. */
     
    519521    if (sd >= 0)
    520522        closesocket(sd);
     523
     524#elif defined(RT_OS_HAIKU)
     525    /** @todo Haiku: implement network info. retreival */
     526    return VERR_NOT_IMPLEMENTED;
    521527
    522528#elif defined(RT_OS_FREEBSD)
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