Changeset 43363 in vbox
- Timestamp:
- Sep 20, 2012 9:56:07 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 66 added
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r43318 r43363 252 252 else ifeq ($(KBUILD_TARGET),os2) 253 253 VBOX_PACKAGE_OS = OS2 254 else ifeq ($(KBUILD_TARGET),haiku) 255 VBOX_PACKAGE_OS = HAIKU 254 256 else if1of ($(KBUILD_TARGET), dragonfly freebsd netbsd openbsd) 255 257 VBOX_PACKAGE_OS = BSD … … 686 688 else ifeq ($(KBUILD_TARGET),freebsd) 687 689 VBOX_PATH_APP_PRIVATE = /usr/local/lib/virtualbox 690 else ifeq ($(KBUILD_TARGET),haiku) 691 VBOX_PATH_APP_PRIVATE = /boot/apps/VirtualBox 688 692 endif 689 693 endif … … 846 850 VBOX_WITH_DOCS= 847 851 endif 852 853 ifeq ($(KBUILD_TARGET),haiku) 854 # Don't bother with SDL ttf for now. 855 VBOX_WITH_SECURELABEL= 856 # We'll use the native html/help viewer. 857 VBOX_WITH_KCHMVIEWER= 858 VBOX_WITH_VRDP_RDESKTOP= 859 # Permanent (no working SDL). 860 VBOX_WITH_VBOXSDL= 861 VBOX_WITH_VBOXBFE= 862 VBOX_WITH_DOCS= 863 VBOX_WITH_VBOXDRV= 864 VBOX_WITH_VRDP= 865 VBOX_WITH_HEADLESS= 866 VBOX_WITH_VBOXSDL= 867 VBOX_WITH_QTGUI= 868 # VBOX_WITH_MAIN= 869 VBOX_WITH_DOCS= 870 VBOX_WITH_ISCSI= 871 VBOX_WITH_INIP= 872 VBOX_WITH_INTERNAL_NETWORKING= 873 VBOX_WITH_PDM_ASYNC_COMPLETION= 874 VBOX_WITH_KCHMVIEWER= 875 VBOX_WITH_HARDENING= 876 endif 877 848 878 849 879 ifeq ($(KBUILD_TARGET),l4) … … 1159 1189 # Image and object format config. 1160 1190 # 1161 if1of ($(KBUILD_TARGET), freebsd linux l4 netbsd openbsd solaris)1191 if1of ($(KBUILD_TARGET), freebsd haiku linux l4 netbsd openbsd solaris) 1162 1192 VBOX_LDR_FMT = elf 1163 1193 endif … … 1284 1314 else ifeq ($(KBUILD_TARGET),darwin) 1285 1315 VBOX_GCC_TOOL := GXX4MACHO 1316 else ifeq ($(KBUILD_TARGET),haiku) 1317 # Haiku shouldn't pass '-r' to the linker by default 1318 VBOX_GCC_TOOL := GXX3PLAIN 1286 1319 else ifeq ($(KBUILD_TARGET),solaris) 1287 1320 VBOX_GCC_TOOL := GXX3PLAIN … … 1400 1433 DEFS.darwin = RT_OS_DARWIN __DARWIN__ 1401 1434 DEFS.freebsd = RT_OS_FREEBSD __FREEBSD__ 1435 DEFS.haiku = RT_OS_HAIKU 1402 1436 DEFS.l4 = RT_OS_L4 __L4__ __L4ENV__ L4API_l4v2 ARCH_$(KBUILD_TARGET_ARCH) __NO_CTYPE _FILE_OFFSET_BITS=64 1403 1437 DEFS.linux = RT_OS_LINUX _FILE_OFFSET_BITS=64 … … 1598 1632 export LD_LIBRARY_PATH:=$(PATH_STAGE_BIN):$(PATH_STAGE_LIB):$(LD_LIBRARY_PATH) 1599 1633 endif 1634 ifeq ($(KBUILD_HOST),haiku) 1635 export LIBRARY_PATH:=$(PATH_STAGE_BIN):$(PATH_STAGE_LIB):$(LIBRARY_PATH) 1636 endif 1600 1637 ifeq ($(KBUILD_HOST),os2) 1601 1638 #fixme! export BEGINLIBPATH:=$(PATH_STAGE_BIN);$(PATH_STAGE_LIB);$(BEGINLIBPATH) … … 1628 1665 LIB_DDU = $(PATH_STAGE_BIN)/VBoxDDU.s.so 1629 1666 endif 1630 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)1667 if1of ($(KBUILD_TARGET), freebsd haiku linux netbsd openbsd solaris) 1631 1668 LIB_RUNTIME = $(PATH_STAGE_BIN)/VBoxRT.so 1632 1669 LIB_RUNTIME_EF = $(PATH_STAGE_LIB)/RuntimeEFCPP.a … … 1738 1775 else ifeq ($(KBUILD_HOST),os2) 1739 1776 VBOX_XSLTPROC ?= BEGINLIBPATH="$(PATH_DEVTOOLS_BLD)/bin;$$BEGINLIBPATH" $(PATH_DEVTOOLS_BLD)/bin/xsltproc.exe 1777 else ifeq ($(KBUILD_HOST),haiku) 1778 VBOX_XSLTPROC ?= $(PATH_DEVTOOLS)/haiku.x86/bin/xsltproc 1740 1779 else 1741 1780 VBOX_XSLTPROC ?= xsltproc$(HOSTSUFF_EXE) … … 2196 2235 # Some versions of gcc (e.g. openSUSE11) return only major.minor on `gcc -dumpversion`. 2197 2236 VBOX_GCC_VERSION = $(shell \ 2198 $(1) -dumpversion | $(SED_EXT) 's|\([0-9]\)\.\([0-9]\)\.\{0,1\}\([0-9]\{0,1\}\) |$$(int-add $$(int-mul 10000, \1), $$(int-mul 100, \2), $$(firstword \3 0))|' )2237 $(1) -dumpversion | $(SED_EXT) 's|\([0-9]\)\.\([0-9]\)\.\{0,1\}\([0-9]\{0,1\}\).*|$$(int-add $$(int-mul 10000, \1), $$(int-mul 100, \2), $$(firstword \3 0))|' ) 2199 2238 endif 2200 2239 … … 2248 2287 $(QUIET)$(APPEND) '$@' 'endif' 2249 2288 endif 2250 ifn eq ($(KBUILD_TARGET),l4)2289 ifn1of ($(KBUILD_TARGET),haiku l4) 2251 2290 # Set default attribute for inline functions to ``hidden'' to reduce the number 2252 2291 # of relocation entries and PLT indirections in shared libraries. Don't allow for gcc version < 4. … … 2578 2617 endif 2579 2618 2619 2620 # 2621 # Haiku resource and version generation. 2622 # 2623 ifeq ($(KBUILD_HOST),haiku) 2624 VBOX_HAIKU_RCTOOL := rc 2625 VBOX_HAIKU_XRESTOOL := xres 2626 VBOX_HAIKU_SETVERSIONTOOL := setversion 2627 # XXX: install won't preserve attributes... 2628 VBOX_HAIKU_MIMESETTOOL := mimeset 2629 2630 ## Add optional resources to the program, set its version info, and sniff its mime properties. 2631 # @param 1 The file to add resources to. 2632 # @param 2 The resource files. 2633 # @param 3 The target name. 2634 define VBOX_HAIKU_XRES_SETVER_FN 2635 $(if $(2),$(call MSG_TOOL,HaikuAddResources,$(3),$(2)) 2636 $(QUIET)$(VBOX_HAIKU_XRESTOOL) -o $(1) $(2),) 2637 $(call MSG_TOOL,HaikuSetVersion,$(3)) 2638 $(QUIET)$(VBOX_HAIKU_SETVERSIONTOOL) $(1) \ 2639 -app $(VBOX_VERSION_MAJOR) $(VBOX_VERSION_MINOR) $(VBOX_VERSION_BUILD) d $(VBOX_SVN_REV) \ 2640 -short "$(VBOX_PRODUCT)" \ 2641 -long "$(VBOX_PRODUCT) $(VBOX_VERSION_STRING) $(shell /bin/echo -e '\xC2\xA9')2009-$(VBOX_C_YEAR) $(VBOX_VENDOR)" 2642 $(call MSG_TOOL,HaikuMimeSet,$(3)) 2643 $(QUIET)$(VBOX_HAIKU_MIMESETTOOL) -f $(1) 2644 endef 2645 2646 VBOX_HAIKU_XRES_SETVER_CMDS ?= $(if $(eq $(tool_do),LINK_PROGRAM),$(call VBOX_HAIKU_XRES_SETVER_FN,$(out),$($(target)_RSRCS),$(target)),) 2647 endif 2580 2648 2581 2649 # … … 3297 3365 3298 3366 endif # FreeBSD 3367 3368 ifeq ($(KBUILD_TARGET),haiku) 3369 ## The Haiku include directories 3370 VBOX_HAIKU_SYS_INCS ?= /boot/develop/headers/os/kernel /boot/develop/headers/os/drivers 3371 3372 TEMPLATE_VBOXR0DRV_TOOL = $(VBOX_GCC_TOOL) 3373 TEMPLATE_VBOXR0DRV_LDTOOL = $(VBOX_GCC_TOOL) 3374 TEMPLATE_VBOXR0DRV_DEFS = _KERNEL_MODE=1 _STRICT_STDC IN_RING0 IN_RT_R0 3375 TEMPLATE_VBOXR0DRV_INCS = $(VBOX_HAIKU_SYS_INCS) 3376 #TODO: sort this out 3377 TEMPLATE_VBOXR0DRV_LDFLAGS = -shared -no-undefined -dc -dy -nostdlib -rpath-link /boot/develop/lib/x86 --no-add-needed /boot/develop/lib/x86/_KERNEL_ --no-add-needed /boot/develop/lib/x86/haiku_version_glue.o 3378 TEMPLATE_VBOXR0DRV_CFLAGS = -no-fpic \ 3379 $(VBOX_GCC_WARN) -Wstrict-prototypes $(VBOX_GCC_Wno-pointer-sign) -Wno-sign-compare \ 3380 $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration 3381 TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -mno-sse -mno-mmx -mno-sse2 -mno-3dnow 3382 TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow 3383 TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow \ 3384 -fno-reorder-blocks -ffreestanding -fno-asynchronous-unwind-tables -funit-at-a-time \ 3385 -Wno-sign-compare -Wdeclaration-after-statement 3386 TEMPLATE_VBOXR0DRV_CXXFLAGS = -no-fpic -Wpointer-arith \ 3387 -Wshadow -Wuninitialized -Wunused-function -Wunused-label -Wunused-value -Wunused-variable \ 3388 -Wformat \ 3389 -O2 -nodefaultlibs -fno-omit-frame-pointer -fno-strict-aliasing -fno-common -fno-exceptions -fno-rtti 3390 TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86) -fno-exceptions -fno-rtti 3391 TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64 = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64) -fno-exceptions -fno-rtti 3392 endif # Haiku 3299 3393 3300 3394 ifdef VBOX_WITH_VBOXDRV … … 3460 3554 TEMPLATE_VBOXR3EXE_CXXFLAGS := $(filter-out -pedantic,$(TEMPLATE_VBOXR3EXE_CXXFLAGS)) -fdollars-in-identifiers # annoying gcc option precedence. 3461 3555 endif 3556 else ifeq ($(KBUILD_TARGET),haiku) 3557 TEMPLATE_VBOXR3EXE_TOOL = GXX3 3558 TEMPLATE_VBOXR3EXE_POST_CMDS = $(VBOX_HAIKU_XRES_SETVER_CMDS) 3559 TEMPLATE_VBOXR3EXE_LIBS = network iconv stdc++ supc++ 3560 TEMPLATE_VBOXR3EXE_LIBPATH += \ 3561 /boot/common/lib 3562 # Haiku uses PIC by default... 3563 TEMPLATE_VBOXR3EXE_CFLAGS += -fno-pic 3564 TEMPLATE_VBOXR3EXE_CXXFLAGS += -fno-pic 3565 TEMPLATE_VBOXR3EXE_LDFLAGS += -fno-pic 3462 3566 else if1of ($(KBUILD_TARGET), freebsd netbsd openbsd) 3463 3567 TEMPLATE_VBOXR3EXE_TOOL = GXX3 … … 3508 3612 TEMPLATE_VBOXR3_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) -fPIC 3509 3613 TEMPLATE_VBOXR3_LDFLAGS = $(TEMPLATE_VBOXR3EXE_LDFLAGS) -fPIC 3614 endif 3615 ifeq ($(KBUILD_TARGET),haiku) 3616 # Haiku uses PIC by default... 3617 TEMPLATE_VBOXR3_CFLAGS = $(TEMPLATE_VBOXR3EXE_CFLAGS) -fno-pic 3618 TEMPLATE_VBOXR3_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) -fno-pic 3619 TEMPLATE_VBOXR3_LDFLAGS = $(TEMPLATE_VBOXR3EXE_LDFLAGS) -fno-pic 3510 3620 endif 3511 3621 … … 3949 4059 TEMPLATE_VBOXMAINEXE_LDFLAGS += $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -framework Carbon 3950 4060 TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME) 4061 else ifeq ($(KBUILD_TARGET),haiku) 4062 TEMPLATE_VBOXMAINEXE_TOOL = GXX3 4063 TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME) network stdc++ supc++ 3951 4064 else if1of ($(KBUILD_TARGET), freebsd netbsd openbsd) 3952 4065 TEMPLATE_VBOXMAINEXE_TOOL = GXX3 … … 4011 4124 TEMPLATE_VBOXMAINDLL = VBox Main Component (shared library) 4012 4125 TEMPLATE_VBOXMAINDLL_EXTENDS = VBOXMAINEXE 4013 ifn1of ($(KBUILD_TARGET), darwin os2 win)4126 ifn1of ($(KBUILD_TARGET), darwin haiku os2 win) 4014 4127 TEMPLATE_VBOXMAINDLL_DEFS = PIC $(TEMPLATE_VBOXMAINEXE_DEFS) 4015 4128 TEMPLATE_VBOXMAINDLL_CFLAGS = -fPIC $(TEMPLATE_VBOXMAINEXE_CFLAGS) … … 4549 4662 endif 4550 4663 TEMPLATE_VBOXBLDPROG_LIBS = 4664 else ifeq ($(KBUILD_HOST),haiku) 4665 TEMPLATE_VBOXBLDPROG_TOOL = GXX3 4666 TEMPLATE_VBOXBLDPROG_LIBS = network iconv 4667 TEMPLATE_VBOXBLDPROG_LIBPATH += \ 4668 /boot/common/lib 4551 4669 else if1of ($(KBUILD_HOST), freebsd netbsd openbsd) 4552 4670 TEMPLATE_VBOXBLDPROG_TOOL = GXX3 … … 4889 5007 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/int64.lib 4890 5008 TEMPLATE_VBOXGUESTR0_DEFS = $(TEMPLATE_VBOXR0DRV_DEFS) IN_GUEST IN_GUEST_R0 4891 ifeq ($(KBUILD_TARGET),solaris) # No VBI for the guest additions yet.5009 ifeq ($(KBUILD_TARGET),solaris) 4892 5010 TEMPLATE_VBOXGUESTR0_LDFLAGS = -r -dy 4893 5011 endif … … 4905 5023 TEMPLATE_VBOXGUESTR0LIB_INSTTYPE.linux = stage 4906 5024 TEMPLATE_VBOXGUESTR0LIB_INST = $(INST_ADDITIONS_LIB) 5025 ifeq ($(KBUILD_TARGET),haiku) 5026 TEMPLATE_VBOXGUESTR0LIB_LDFLAGS = -r -dy 5027 endif 4907 5028 4908 5029 # -
trunk/configure
r42002 r43363 54 54 sunos) 55 55 OS='solaris' 56 ;; 57 haiku) 56 58 ;; 57 59 *) … … 333 335 [ "$OS" = "solaris" ] && BUILD_CPU=`isainfo | cut -f 1 -d ' '` 334 336 case "$BUILD_CPU" in 335 i[3456789]86|x86|i86pc )337 i[3456789]86|x86|i86pc|BePC) 336 338 BUILD_MACHINE='x86' 337 339 LIB='lib' … … 650 652 check_xsltproc() 651 653 { 654 if [ -n "$BUILD_LIBXSLT" ]; then 655 return 0; 656 fi 652 657 test_header xslt 653 658 if check_avail "$XSLTPROC" XSLTPROC; then … … 897 902 if test_compile "$LIBZ $I_INCZ" zlib zlib; then 898 903 if test_execute; then 899 echo "if1of (\$(KBUILD_TARGET),darwin freebsd linux solaris)" >> $CNF904 echo "if1of (\$(KBUILD_TARGET),darwin freebsd haiku linux solaris)" >> $CNF 900 905 cnf_append " SDK_VBOX_ZLIB_LIBS" "`strip_l "$LIBZ"`" 901 906 cnf_append " SDK_VBOX_ZLIB_INCS" "$INCZ" … … 2246 2251 BUILD_LIBXML2=1 2247 2252 [ $OSE -eq 1 ] || BUILD_LIBCURL=1 2253 elif [ "$OS" = "haiku" ]; then 2254 #WITH_SDL=0 2255 WITH_SDL_TTF=0 2256 WITH_X11=0 2257 WITH_ALSA=0 2258 WITH_PULSE=0 2259 WITH_DBUS=0 2260 WITH_KMODS=0 2261 WITH_LIBIDL=0 2262 WITH_XPCOM=0 2263 BUILD_LIBXSLT=1 2264 BUILD_LIBXML2=1 2265 # it is part of libroot, which is linked by default, 2266 # but the script wants something 2267 LIBPTHREAD="-lroot" 2268 #[ $OSE -eq 1] || BUILD_LIBCURL=1 2269 [ $OSE -eq 1] || BUILD_LIBSSL=1 2248 2270 fi 2249 2271 -
trunk/include/VBox/VBoxGuest.h
r41972 r43363 6 6 7 7 /* 8 * Copyright (C) 2006-20 09Oracle Corporation8 * Copyright (C) 2006-2012 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 62 62 # define VBOXGUEST_DEVICE_NAME_DOS L"\\DosDevices\\VBoxGuest" 63 63 64 #elif defined(RT_OS_HAIKU) 65 # define VBOXGUEST_DEVICE_NAME "/dev/misc/vboxguest" 66 64 67 #else /* (PORTME) */ 65 68 # define VBOXGUEST_DEVICE_NAME "/dev/vboxguest" … … 175 178 # define VBOXGUEST_IOCTL_CODE_FAST_(Function) _IO( 'V', (Function)) 176 179 # define VBOXGUEST_IOCTL_STRIP_SIZE(Code) VBOXGUEST_IOCTL_CODE_(_IOC_NR((Code)), 0) 180 181 #elif defined(RT_OS_HAIKU) 182 /* No automatic buffering, size not encoded. */ 183 /** @todo do something better */ 184 # define VBOXGUEST_IOCTL_CODE_(Function, Size) (0x56420000 | (Function)) 185 # define VBOXGUEST_IOCTL_CODE_FAST_(Function) (0x56420000 | (Function)) 186 # define VBOXGUEST_IOCTL_STRIP_SIZE(Code) (Code) 177 187 178 188 #elif defined(RT_OS_FREEBSD) /** @todo r=bird: Please do it like SUPDRVIOC to keep it as similar as possible. */ -
trunk/include/VBox/ostypes.h
r43248 r43363 4 4 5 5 /* 6 * Copyright (C) 2006-201 1Oracle Corporation6 * Copyright (C) 2006-2012 Oracle Corporation 7 7 * 8 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 117 117 VBOXOSTYPE_MacOS_x64 = 0xB0100, 118 118 VBOXOSTYPE_JRockitVE = 0xC0000, 119 VBOXOSTYPE_Haiku = 0xD0000, 120 VBOXOSTYPE_Haiku_x64 = 0xD0100, 119 121 /** The bit number which indicates 64-bit or 32-bit. */ 120 122 #define VBOXOSTYPE_x64_BIT 8 -
trunk/include/iprt/assert.h
r43043 r43363 505 505 */ 506 506 #if defined(IN_RING0) \ 507 && (defined(RT_OS_DARWIN) || defined(RT_OS_ SOLARIS))507 && (defined(RT_OS_DARWIN) || defined(RT_OS_HAIKU) || defined(RT_OS_SOLARIS)) 508 508 # define RTAssertDoPanic() RTR0AssertPanicSystem() 509 509 #else -
trunk/include/iprt/thread.h
r39836 r43363 4 4 5 5 /* 6 * Copyright (C) 2006-20 07Oracle Corporation6 * Copyright (C) 2006-2012 Oracle Corporation 7 7 * 8 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 534 534 uint8_t bReserved3; 535 535 # define RTTHREADPREEMPTSTATE_INITIALIZER { NIL_RTCPUID, 255, 0, 0, 0 } 536 # elif defined(RT_OS_HAIKU) 537 /** The cpu_state. Don't touch! */ 538 uint32_t uOldCpuState; 539 # define RTTHREADPREEMPTSTATE_INITIALIZER { NIL_RTCPUID, 0 } 536 540 # elif defined(RT_OS_SOLARIS) 537 541 /** The Old PIL. Don't touch! */ -
trunk/include/iprt/types.h
r40946 r43363 4 4 5 5 /* 6 * Copyright (C) 2006-201 1Oracle Corporation6 * Copyright (C) 2006-2012 Oracle Corporation 7 7 * 8 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 206 206 # endif 207 207 # else 208 # if defined(RT_OS_DARWIN) && defined(_STDBOOL_H)208 # if (defined(RT_OS_DARWIN) || defined(RT_OS_HAIKU)) && defined(_STDBOOL_H) 209 209 # undef bool 210 210 # endif -
trunk/src/VBox/Additions/Makefile.kmk
r41477 r43363 70 70 ifeq ($(KBUILD_TARGET),darwin) 71 71 include $(PATH_SUB_CURRENT)/darwin/Makefile.kmk 72 endif 73 ifeq ($(KBUILD_TARGET),haiku) 74 include $(PATH_SUB_CURRENT)/haiku/Makefile.kmk 72 75 endif 73 76 … … 286 289 endif # win.x86 287 290 291 ifdef VBOX_WITH_ADDITIONS_ISO.haiku.x86 292 VBOX_PATH_ADDITIONS.haiku.x86 = $(PATH_OUT_BASE)/haiku.x86/$(KBUILD_TYPE)/bin/additions 293 # or bfs? 294 GUESTADDITIONS_FILESPEC.haiku.x86 = \ 295 VBoxHaikuAdditions-x86.run=$(VBOX_PATH_ADDITIONS.haiku.x86)/VBoxHaikuAdditions-x86.run 296 endif 297 288 298 289 299 # … … 303 313 $(GUESTADDITIONS_FILESPEC.freebsd.x86) \ 304 314 $(GUESTADDITIONS_FILESPEC.freebsd.amd64) \ 315 $(GUESTADDITIONS_FILESPEC.haiku.x86) \ 305 316 $(GUESTADDITIONS_FILESPEC.darwin.x86) \ 306 317 $(GUESTADDITIONS_FILESPEC.darwin.amd64) \ … … 325 336 $(GUESTADDITIONS_FILESPEC.freebsd.x86) \ 326 337 $(GUESTADDITIONS_FILESPEC.freebsd.amd64) \ 338 $(GUESTADDITIONS_FILESPEC.haiku.x86) \ 327 339 $(GUESTADDITIONS_FILESPEC.darwin.x86) \ 328 340 $(GUESTADDITIONS_FILESPEC.darwin.amd64) -
trunk/src/VBox/Additions/common/Makefile.kmk
r41477 r43363 23 23 include $(PATH_SUB_CURRENT)/VBoxGuestLib/Makefile.kmk 24 24 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) 26 26 include $(PATH_SUB_CURRENT)/VBoxGuest/Makefile.kmk 27 27 endif 28 if1of ($(KBUILD_TARGET), freebsd linux os2 solaris win)28 if1of ($(KBUILD_TARGET), freebsd haiku linux os2 solaris win) 29 29 include $(PATH_SUB_CURRENT)/VBoxService/Makefile.kmk 30 30 endif -
trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
r42239 r43363 20 20 21 21 22 if1of ($(KBUILD_TARGET), freebsd $(if $(defined VBOX_WITH_ADDITION_DRIVERS),linux,) os2 solaris win)22 if1of ($(KBUILD_TARGET), freebsd haiku $(if $(defined VBOX_WITH_ADDITION_DRIVERS),linux,) os2 solaris win) 23 23 # 24 24 # VBoxGuest - The Guest Additions Driver. … … 27 27 VBoxGuest_TEMPLATE = VBOXGUESTR0 28 28 VBoxGuest_NAME.freebsd = vboxguest 29 VBoxGuest_NAME.haiku = vboxguest 29 30 VBoxGuest_NAME.linux = vboxguest 30 31 VBoxGuest_NAME.solaris = vboxguest … … 33 34 VBoxGuest_DEBUG_INSTTYPE.win = both 34 35 endif 36 VBoxGuest_DEFS.haiku = VBOX_SVN_REV=$(VBOX_SVN_REV) _KERNEL_MODE=1 35 37 VBoxGuest_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxguest\) KBUILD_BASENAME=KBUILD_STR\(vboxguest\) DEBUG_HASH=2 DEBUG_HASH2=3 EXPORT_SYMTAB 36 38 VBoxGuest_DEFS.solaris = VBOX_SVN_REV=$(VBOX_SVN_REV) … … 50 52 VBoxGuest_DEPS.linux += $(VBOX_SVN_REV_HEADER) 51 53 VBoxGuest_DEPS.freebsd += $(VBOX_SVN_REV_HEADER) 54 VBoxGuest_DEPS.haiku += $(VBOX_SVN_REV_HEADER) 52 55 VBoxGuest_DEFS = VBGL_VBOXGUEST VBOX_WITH_HGCM 53 56 VBoxGuest_INCS = . … … 75 78 endif 76 79 endif # win 77 ifn1of ($(KBUILD_TARGET), linux freebsd solaris )80 ifn1of ($(KBUILD_TARGET), linux freebsd solaris haiku) 78 81 VBoxGuest_SOURCES = VBoxGuest-$(KBUILD_TARGET).cpp 79 82 else … … 95 98 $(PATH_STAGE)/gen-sys-hdrs/bus_if.h \ 96 99 $(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 97 110 else # OS/2: 98 111 # The library order is crucial, so a bit of trickery is necessary. -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
r43016 r43363 38 38 39 39 #elif defined(RT_OS_FREEBSD) \ 40 || defined(RT_OS_HAIKU) \ 40 41 || defined(RT_OS_LINUX) \ 41 42 || defined(RT_OS_SOLARIS) … … 198 199 #else 199 200 200 /* The default implementation. (linux, solaris, freebsd ) */201 /* The default implementation. (linux, solaris, freebsd, haiku) */ 201 202 RTFILE File; 202 203 int rc = RTFileOpen(&File, pszDeviceName, RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE); … … 381 382 return rc; 382 383 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 383 399 #elif defined(VBOX_VBGLR3_XFREE86) 384 400 /* 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 411 411 VBoxServiceError("VBoxServiceTimeSyncAdjust: GetSystemTimeAdjustment failed, error=%ld\n", GetLastError()); 412 412 413 #elif defined(RT_OS_OS2) 413 #elif defined(RT_OS_OS2) || defined(RT_OS_HAIKU) 414 414 /* No API for doing gradual time adjustments. */ 415 415 -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
r43230 r43363 40 40 # include <net/if.h> 41 41 # 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. */ 46 44 # endif 47 45 # ifdef RT_OS_SOLARIS … … 266 264 rc = VERR_NOT_IMPLEMENTED; 267 265 266 #elif defined(RT_OS_HAIKU) 267 /** @todo Haiku: Port logged on user info retrieval. */ 268 rc = VERR_NOT_IMPLEMENTED; 269 268 270 #elif defined(RT_OS_OS2) 269 271 /** @todo OS/2: Port logged on (LAN/local/whatever) user info retrieval. */ … … 519 521 if (sd >= 0) 520 522 closesocket(sd); 523 524 #elif defined(RT_OS_HAIKU) 525 /** @todo Haiku: implement network info. retreival */ 526 return VERR_NOT_IMPLEMENTED; 521 527 522 528 #elif defined(RT_OS_FREEBSD) -
trunk/src/VBox/Makefile.kmk
r41477 r43363 22 22 ifdef VBOX_ONLY_ADDITIONS 23 23 include $(PATH_SUB_CURRENT)/Runtime/Makefile.kmk 24 if def VBOX_WITH_CROGL25 if1of ($(KBUILD_TARGET),win linux solaris freebsd )24 if defined(VBOX_WITH_CROGL) || defined(VBOX_WITH_HGSMI) 25 if1of ($(KBUILD_TARGET),win linux solaris freebsd haiku) 26 26 include $(PATH_SUB_CURRENT)/GuestHost/Makefile.kmk 27 27 endif -
trunk/src/VBox/Runtime/VBox/log-vbox.cpp
r40938 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 138 138 # include <stdlib.h> 139 139 # include <unistd.h> 140 # elif defined(RT_OS_HAIKU) 141 # include <OS.h> 140 142 # elif defined(RT_OS_SOLARIS) 141 143 # define _STRUCTURED_PROC 1 … … 369 371 } 370 372 373 # elif defined(RT_OS_HAIKU) 374 team_info info; 375 if (get_team_info(0, &info) == B_OK) 376 { 377 /* there is an info.argc, but no way to know arg boundaries */ 378 RTLogLoggerEx(pLogger, 0, ~0U, "Commandline: %.64s\n", info.args); 379 } 380 371 381 # elif defined(RT_OS_FREEBSD) 372 382 /* Retrieve the required length first */ -
trunk/src/VBox/Runtime/common/err/RTErrConvertFromErrno.cpp
r40824 r43363 431 431 #endif 432 432 #ifdef EDOOFUS 433 # if EDOOFUS != EINVAL 433 434 case EDOOFUS: return VERR_INTERNAL_ERROR; 435 # endif 434 436 #endif 435 437 #ifdef ENOTSUP -
trunk/src/VBox/Runtime/r3/posix/RTHandleGetStandard-posix.cpp
r33973 r43363 5 5 6 6 /* 7 * Copyright (C) 201 0Oracle Corporation7 * Copyright (C) 2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 33 33 #include <sys/types.h> 34 34 #include <sys/ioctl.h> 35 #include <sys/fcntl.h>36 35 #include <fcntl.h> 37 36 #ifdef _MSC_VER -
trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp
r39627 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 0Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 34 34 #include <sys/types.h> 35 35 #include <sys/stat.h> 36 #include <sys/fcntl.h>37 36 #include <fcntl.h> 38 37 #include <dirent.h> … … 54 53 #include "internal/path.h" 55 54 56 #if !defined(RT_OS_SOLARIS) 55 #if !defined(RT_OS_SOLARIS) && !defined(RT_OS_HAIKU) 57 56 # define HAVE_DIRENT_D_TYPE 1 58 57 #endif -
trunk/src/VBox/Runtime/r3/posix/fileio-posix.cpp
r39627 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 0Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 35 35 #include <sys/types.h> 36 36 #include <sys/ioctl.h> 37 #include <sys/fcntl.h>38 37 #include <fcntl.h> 39 38 #ifdef _MSC_VER -
trunk/src/VBox/Runtime/r3/posix/fileio2-posix.cpp
r40553 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 57 57 #endif 58 58 59 #ifdef RT_OS_HAIKU 60 # define USE_FUTIMENS 61 #endif 62 59 63 #include <iprt/file.h> 60 64 #include <iprt/path.h> … … 144 148 return VINF_SUCCESS; 145 149 150 #ifdef USE_FUTIMENS 151 struct timespec aTimespecs[2]; 152 if (pAccessTime && pModificationTime) 153 { 154 memcpy(&aTimespecs[0], pAccessTime, sizeof(struct timespec)); 155 memcpy(&aTimespecs[1], pModificationTime, sizeof(struct timespec)); 156 } 157 else 158 { 159 RTFSOBJINFO ObjInfo; 160 int rc = RTFileQueryInfo(hFile, &ObjInfo, RTFSOBJATTRADD_UNIX); 161 if (RT_FAILURE(rc)) 162 return rc; 163 memcpy(&aTimespecs[0], pAccessTime ? pAccessTime : &ObjInfo.AccessTime, sizeof(struct timespec)); 164 memcpy(&aTimespecs[1], pModificationTime ? pModificationTime : &ObjInfo.ModificationTime, sizeof(struct timespec)); 165 } 166 167 if (futimens(RTFileToNative(hFile), aTimespecs)) 168 { 169 int rc = RTErrConvertFromErrno(errno); 170 Log(("RTFileSetTimes(%RTfile,%p,%p,,): returns %Rrc\n", hFile, pAccessTime, pModificationTime, rc)); 171 return rc; 172 } 173 #else 146 174 /* 147 175 * Convert the input to timeval, getting the missing one if necessary, … … 172 200 return rc; 173 201 } 202 #endif 174 203 return VINF_SUCCESS; 175 204 } -
trunk/src/VBox/Runtime/r3/posix/filelock-posix.cpp
r37596 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 34 34 #include <sys/types.h> 35 35 #include <sys/ioctl.h> 36 #include <sys/fcntl.h>37 36 #include <fcntl.h> 38 37 #include <unistd.h> -
trunk/src/VBox/Runtime/r3/posix/fs2-posix.cpp
r34015 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 0Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 34 34 #ifndef DEV_BSIZE 35 35 # include <sys/stat.h> 36 # if defined(RT_OS_HAIKU) && !defined(S_BLKSIZE) 37 # define S_BLKSIZE 512 38 # endif 36 39 # define DEV_BSIZE S_BLKSIZE /** @todo bird: add DEV_BSIZE to sys/param.h on OS/2. */ 37 40 #endif -
trunk/src/VBox/Runtime/r3/posix/rand-posix.cpp
r37596 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 33 33 #include <sys/types.h> 34 34 #include <sys/ioctl.h> 35 #include <sys/fcntl.h>36 35 #include <fcntl.h> 37 36 #ifdef _MSC_VER -
trunk/src/VBox/Runtime/r3/posix/semevent-posix.cpp
r39032 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 0Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 49 49 #endif 50 50 51 #if def RT_OS_SOLARIS51 #if defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) 52 52 # include <sched.h> 53 53 # define pthread_yield() sched_yield() … … 398 398 */ 399 399 struct timespec ts = {0,0}; 400 #if def RT_OS_DARWIN400 #if defined(RT_OS_DARWIN) || defined(RT_OS_HAIKU) 401 401 struct timeval tv = {0,0}; 402 402 gettimeofday(&tv, NULL); -
trunk/src/VBox/Runtime/r3/posix/semeventmulti-posix.cpp
r40103 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 482 482 if (!pThis->fMonotonicClock) 483 483 { 484 #if def RT_OS_DARWIN484 #if defined(RT_OS_DARWIN) || defined(RT_OS_HAIKU) 485 485 struct timeval tv = {0,0}; 486 486 gettimeofday(&tv, NULL); -
trunk/src/VBox/Runtime/r3/posix/semmutex-posix.cpp
r28800 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 250 250 */ 251 251 struct timespec ts = {0,0}; 252 #ifdef RT_OS_HAIKU 253 struct timeval tv = {0,0}; 254 gettimeofday(&tv, NULL); 255 ts.tv_sec = tv.tv_sec; 256 ts.tv_nsec = tv.tv_usec * 1000; 257 #else 252 258 clock_gettime(CLOCK_REALTIME, &ts); 259 #endif 253 260 if (cMillies != 0) 254 261 { -
trunk/src/VBox/Runtime/r3/posix/thread-posix.cpp
r41881 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 52 52 # define IPRT_MAY_HAVE_PTHREAD_SET_NAME_NP 53 53 # include <dlfcn.h> 54 #endif 55 #if defined(RT_OS_HAIKU) 56 # include <OS.h> 54 57 #endif 55 58 … … 413 416 414 417 return VINF_SUCCESS; 418 #elif defined(RT_OS_HAIKU) 419 thread_info ThreadInfo; 420 status_t status = get_thread_info(find_thread(NULL), &ThreadInfo); 421 AssertReturn(status == B_OK, RTErrConvertFromErrno(status)); 422 423 *pKernelTime = ThreadInfo.kernel_time / 1000; 424 *pUserTime = ThreadInfo.user_time / 1000; 425 426 return VINF_SUCCESS; 415 427 #else 416 428 return VERR_NOT_IMPLEMENTED; -
trunk/src/VBox/Runtime/r3/posix/thread2-posix.cpp
r39443 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 63 63 #elif defined(RT_OS_FREEBSD) /* void pthread_yield */ 64 64 pthread_yield(); 65 #elif defined(RT_OS_SOLARIS) 65 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) 66 66 sched_yield(); 67 67 #else … … 102 102 #elif defined(RT_OS_FREEBSD) /* void pthread_yield */ 103 103 pthread_yield(); 104 #elif defined(RT_OS_SOLARIS) 104 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) 105 105 sched_yield(); 106 106 #else … … 131 131 #ifdef RT_OS_DARWIN 132 132 pthread_yield_np(); 133 #elif defined(RT_OS_SOLARIS) 133 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) 134 134 sched_yield(); 135 135 #else -
trunk/src/VBox/Runtime/r3/posix/utf8-posix.cpp
r40654 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 0Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 194 194 const void *pvInputLeft = pvInput; 195 195 void *pvOutputLeft = pvOutput; 196 #if defined(RT_OS_LINUX) || defined(RT_OS_ SOLARIS) || (defined(RT_OS_DARWIN) && defined(_DARWIN_FEATURE_UNIX_CONFORMANCE)) /* there are different opinions about the constness of the input buffer. */196 #if defined(RT_OS_LINUX) || defined(RT_OS_HAIKU) || defined(RT_OS_SOLARIS) || (defined(RT_OS_DARWIN) && defined(_DARWIN_FEATURE_UNIX_CONFORMANCE)) /* there are different opinions about the constness of the input buffer. */ 197 197 if (iconv(hIconv, (char **)&pvInputLeft, &cbInLeft, (char **)&pvOutputLeft, &cbOutLeft) != (size_t)-1) 198 198 #else … … 320 320 const void *pvInputLeft = pvInput; 321 321 void *pvOutputLeft = pvOutput; 322 #if defined(RT_OS_LINUX) || defined(RT_OS_ SOLARIS) || (defined(RT_OS_DARWIN) && defined(_DARWIN_FEATURE_UNIX_CONFORMANCE)) /* there are different opinions about the constness of the input buffer. */322 #if defined(RT_OS_LINUX) || defined(RT_OS_HAIKU) || defined(RT_OS_SOLARIS) || (defined(RT_OS_DARWIN) && defined(_DARWIN_FEATURE_UNIX_CONFORMANCE)) /* there are different opinions about the constness of the input buffer. */ 323 323 if (iconv(icHandle, (char **)&pvInputLeft, &cbInLeft, (char **)&pvOutputLeft, &cbOutLeft) != (size_t)-1) 324 324 #else -
trunk/src/VBox/Runtime/r3/socket.cpp
r43213 r43363 34 34 #else /* !RT_OS_WINDOWS */ 35 35 # include <errno.h> 36 # include <sys/select.h> 36 37 # include <sys/stat.h> 37 38 # include <sys/socket.h>
Note:
See TracChangeset
for help on using the changeset viewer.