> Cool! Thanks. But why did you gzip the patch? :) I am curious to
> look at the text of the patch even though my FreeBSD laptop is
> currently powered off.
>
Sorry for that, that's a mistake.
You'll find a clear text version attached
Bye .
Olivier
Index: configure
===================================================================
--- configure (révision 4824)
+++ configure (copie de travail)
@@ -38,6 +38,9 @@
CXX="g++"
CXX32=""
CXX64=""
+CC_INC=""
+CC_LIB=""
+
BCC="bcc"
YASM="yasm"
IASL="iasl"
@@ -177,8 +180,12 @@
echo "compiling the following source file:" >> $LOG
cat .tmp_src.cc >> $LOG
echo "using the following command line:" >> $LOG
- echo "$CXX -O -Wall -o .tmp_out .tmp_src.cc \"$1\"" >> $LOG
- $CXX -O -Wall -o .tmp_out .tmp_src.cc $1 >> $LOG 2>&1
+ [ "$OS" = "freebsd" ] && {
+ CC_INC="-I/usr/local/include"
+ CC_LIB="-L/usr/local/lib"
+ }
+ echo "$CXX $CC_INC $CC_LIB-O -Wall -o .tmp_out .tmp_src.cc \"$1\"" >> $LOG
+ $CXX $CC_INC $CC_LIB -O -Wall -o .tmp_out .tmp_src.cc $1 >> $LOG 2>&1
if [ $? -ne 0 ]; then
if [ -z "$4" ]; then
echo
@@ -244,6 +251,7 @@
darwin)
;;
freebsd)
+ OS='freebsd'
;;
sunos)
OS='solaris'
@@ -792,7 +800,7 @@
{
test_header SDL
if which_wrapper sdl-config > /dev/null; then
- FLGSDL=`sdl-config --cflags`
+ FLGSDL=`sdl-config --cflags`
INCSDL=`strip_I "$FLGSDL"`
LIBSDL=`sdl-config --libs`
LIBSDLMAIN="-lSDLmain"
@@ -813,7 +821,7 @@
#endif
}
EOF
- [ -n "$INCSDL" ] && I_INCSDL="-I$INCSDL"
+ [ -n "$INCSDL" ] && I_INCSDL=`echo $INCSDL | $KBUILD_SED 's/^\//-I/' | $KBUILD_SED 's/ \// -I\//'`
if test_compile "$LIBSDL $LIBSDLMAIN $I_INCSDL" SDL SDL; then
if test_execute; then
cnf_append "LIB_SDK_LIBSDL_SDL" "`strip_l "$LIBSDL"`"
@@ -968,9 +976,8 @@
echo "compiling the following source file:" >> $LOG
cat .tmp_src.cc >> $LOG
echo "using the following command line:" >> $LOG
- echo "$CXX -O -Wall -o .tmp_out .tmp_src.cc -I$q/include -L$q/$l -lqt-mt" >> $LOG
-
- $CXX -O -Wall -o .tmp_out .tmp_src.cc -I$q/include -L$q/$l -lqt-mt >> $LOG 2>&1
+ echo "$CXX -O -Wall -o .tmp_out .tmp_src.cc -I$q/include -L$q/$l -lqt-mt $LIBPTHREAD" >> $LOG
+ $CXX -O -Wall -o .tmp_out .tmp_src.cc -I$q/include -L$q/$l -lqt-mt $LIBPTHREAD>> $LOG 2>&1
if [ $? -eq 0 ]; then
if test_execute; then
cnf_append "QTDIR" "`cd $q ; pwd`"
Index: Config.kmk
===================================================================
--- Config.kmk (révision 4817)
+++ Config.kmk (copie de travail)
@@ -284,7 +284,8 @@
endif
# Most stuff doesn't build yet on the new targets.
-ifeq ($(filter-out freebsd solaris,$(BUILD_TARGET)),)
+#OF ifeq ($(filter-out freebsd solaris,$(BUILD_TARGET)),)
+ifeq ($(filter-out solaris,$(BUILD_TARGET)),)
#VBOX_WITH_VBOXBFE=
VBOX_WITH_MAIN=
VBOX_WITH_VBOXSDL=
Index: src/libs/xpcom18a4/nsprpub/pr/include/md/_freebsd.h
===================================================================
--- src/libs/xpcom18a4/nsprpub/pr/include/md/_freebsd.h (révision 4817)
+++ src/libs/xpcom18a4/nsprpub/pr/include/md/_freebsd.h (copie de travail)
@@ -101,6 +101,19 @@
#define _PR_INET6_PROBE
#endif
+
+#if (__FreeBSD_version >= 700016) || (__FreeBSD_version < 700000 && __FreeBSD_version >= 601103)
+#if defined(_PR_PTHREADS)
+#define _PR_HAVE_GETPROTO_R
+#define _PR_HAVE_5_ARG_GETPROTO_R
+#define _PR_HAVE_GETHOST_R
+#define _PR_HAVE_GETHOST_R_INT
+#define _PR_HAVE_THREADSAFE_GETHOST
+#endif
+#endif
+
+
+
#define USE_SETJMP
#ifndef _PR_PTHREADS
Index: src/libs/xpcom18a4/Makefile.kmk
===================================================================
--- src/libs/xpcom18a4/Makefile.kmk (révision 4817)
+++ src/libs/xpcom18a4/Makefile.kmk (copie de travail)
@@ -34,13 +34,15 @@
TEMPLATE_XPCOM_CXXFLAGS.profile = -O
TEMPLATE_XPCOM_CXXFLAGS.darwin = -fpascal-strings -fshort-wchar -fno-common -fno-rtti
TEMPLATE_XPCOM_CXXFLAGS.l4 = -fno-exceptions -nostdinc
-TEMPLATE_XPCOM_CXXFLAGS.linux = -pthread
+TEMPLATE_XPCOM_CXXFLAGS.linux = -pthread
+TEMPLATE_XPCOM_CXXFLAGS.frebsd = -pthread
TEMPLATE_XPCOM_CFLAGS = -pipe -Wall -Wno-unused -Wno-parentheses -Wno-uninitialized $(VBOX_GCC_fvisibility-hidden)
TEMPLATE_XPCOM_CFLAGS.debug = -fno-inline
TEMPLATE_XPCOM_CFLAGS.release = -O
TEMPLATE_XPCOM_CFLAGS.profile = -O
TEMPLATE_XPCOM_CFLAGS.l4 = -nostdinc
-TEMPLATE_XPCOM_CFLAGS.linux = -pthread -ansi
+TEMPLATE_XPCOM_CFLAGS.linux = -pthread -ansi
+TEMPLATE_XPCOM_CFLAGS.freebsd = -pthread -ansi
TEMPLATE_XPCOM_DEFS = MOZILLA_CLIENT=1 NDEBUG=1 _IMPL_NS_COM \
XPCOM_DLL_BASE=\"$(basename $(notdir $(LIB_XPCOM)))\" \
MOZ_DLL_SUFFIX=\"$(suffix $(LIB_XPCOM))\"
@@ -48,6 +50,7 @@
TEMPLATE_XPCOM_DEFS.amd64 = HAVE_VA_LIST_AS_ARRAY HAVE_VA_COPY VA_COPY\(a\,b\)=__builtin_va_copy\(a\,b\)
TEMPLATE_XPCOM_DEFS.darwin = OSTYPE=\"Darwin8.8.1\" OSARCH=\"Darwin\" XP_UNIX=1 XP_MACOSX=1 TARGET_CARBON=1 HAVE_VISIBILITY_ATTRIBUTE=1
TEMPLATE_XPCOM_DEFS.linux = OSTYPE=\"Linux2.6\" OSARCH=\"Linux\" XP_UNIX=1 _GNU_SOURCE HAVE_VISIBILITY_ATTRIBUTE=1
+TEMPLATE_XPCOM_DEFS.freebsd = OSTYPE=\"FreeBSD6.2\" OSARCH=\"FreeBSD\" XP_UNIX=1 _GNU_SOURCE HAVE_VISIBILITY_ATTRIBUTE=1
TEMPLATE_XPCOM_DEFS.l4 = OSTYPE=\"L4ENV\" OSARCH=\"L4\" XP_UNIX=1 L4ENV HAVE_VISIBILITY_ATTRIBUTE=1
TEMPLATE_XPCOM_DEFS.os2 = OSTYPE=\"OS/2_4.5\" OSARCH=\"OS/2\" XP_OS2 XP_PC BSD_SELECT
TEMPLATE_XPCOM_LDFLAGS.darwin = $(VBOXR3NP_LDFLAGS.darwin) \
@@ -122,6 +125,7 @@
$(TARGET_VBox-xpcom-ipcshared) \
$(TARGET_VBoxXPCOM)
TEMPLATE_XPCOMEXE_LIBS.linux = dl $(LIB_PTHREAD)
+TEMPLATE_XPCOMEXE_LIBS.freebsd = $(LIB_PTHREAD)
TEMPLATE_XPCOMEXE_LIBS.l4 = $(LIB_RUNTIME) $(VBOX_GCC_LIBGCC)
TEMPLATE_XPCOMEXE_LDFLAGS.darwin = -bind_at_load $(TEMPLATE_XPCOM_LDFLAGS.darwin)
TEMPLATE_XPCOMEXE_LDFLAGS.l4 = $(L4_DIR)/lib/x86_586/crt0.o \
@@ -145,10 +149,12 @@
TEMPLATE_XPCOMBLDPROG_DEFS.$(BUILD_TARGET_ARCH) = $(TEMPLATE_BLDPROG_DEFS.$(BUILD_TARGET_ARCH)) $(TEMPLATE_XPCOMEXE_DEFS.$(BUILD_TARGET_ARCH))
TEMPLATE_XPCOMBLDPROG_CXXFLAGS = -ansi -Wall -Wno-non-virtual-dtor
TEMPLATE_XPCOMBLDPROG_CXXFLAGS.linux = -pthread
+TEMPLATE_XPCOMBLDPROG_CXXFLAGS.freebsd = -pthread
TEMPLATE_XPCOMBLDPROG_CXXFLAGS.release = -O
TEMPLATE_XPCOMBLDPROG_CXXFLAGS.profile = -O
TEMPLATE_XPCOMBLDPROG_CFLAGS = -pipe -ansi -Wall -Wno-unused
TEMPLATE_XPCOMBLDPROG_CFLAGS.linux = -pthread
+TEMPLATE_XPCOMBLDPROG_CFLAGS.freebsd = -pthread
TEMPLATE_XPCOMBLDPROG_CFLAGS.release = -O
TEMPLATE_XPCOMBLDPROG_CFLAGS.profile = -O
TEMPLATE_XPCOMBLDPROG_INCS = $(VBOX_PATH_SDK)/include \
@@ -255,6 +261,8 @@
$(XPCOM_TYPELIB)
+#OF OVERRIDE
+XPCOM_TYPELIB = $(PATH_BIN)/VBoxXPCOMBase.xpt
#
# SDK headers - lot's of files to install...
@@ -618,6 +626,16 @@
HAVE_FCNTL_FILE_LOCKING=1 \
HAVE_CVAR_BUILT_ON_SEM \
_PR_PTHREADS
+VBox-xpcom-nspr_DEFS.freebsd = \
+ FREEBSD=1 \
+ _POSIX_SOURCE=1 \
+ _BSD_SOURCE=1 \
+ _SVID_SOURCE=1 \
+ _REENTRANT=1 \
+ _LARGEFILE64_SOURCE=1 \
+ HAVE_FCNTL_FILE_LOCKING=1 \
+ HAVE_CVAR_BUILT_ON_SEM \
+ _PR_PTHREADS
# _BSD_SOURCE is here to keep the Glibc header files happy and make them include the right things
# FIXME: L4 should be defined by _linux.cfg
VBox-xpcom-nspr_DEFS.l4 = \
@@ -632,6 +650,8 @@
_PR_PTHREADS
VBox-xpcom-nspr_DEFS.openbsd = \
_PR_PTHREADS
+VBox-xpcom-nspr_DEFS.freebsd = \
+ _PR_PTHREADS
VBox-xpcom-nspr_DEFS.os2 =
VBox-xpcom-nspr_DEFS.solaris = \
_PR_PTHREADS
@@ -751,7 +771,20 @@
nsprpub/pr/src/pthreads/ptsynch.c \
nsprpub/pr/src/pthreads/ptthread.c \
nsprpub/pr/src/pthreads/ptmisc.c
+VBox-xpcom-nspr_SOURCES.freebsd = \
+ nsprpub/pr/src/md/unix/unix.c \
+ nsprpub/pr/src/md/unix/unix_errors.c \
+ nsprpub/pr/src/md/unix/uxproces.c \
+ nsprpub/pr/src/md/unix/uxrng.c \
+ nsprpub/pr/src/md/unix/uxshm.c \
+ nsprpub/pr/src/md/unix/uxwrap.c \
+ nsprpub/pr/src/md/unix/freebsd.c \
+ nsprpub/pr/src/pthreads/ptio.c \
+ nsprpub/pr/src/pthreads/ptsynch.c \
+ nsprpub/pr/src/pthreads/ptthread.c \
+ nsprpub/pr/src/pthreads/ptmisc.c
VBox-xpcom-nspr_SOURCES.linux.x86 = nsprpub/pr/src/md/unix/os_Linux_x86.s
+#VBox-xpcom-nspr_SOURCES.freebsd.x86 = nsprpub/pr/src/md/unix/os_FreeBSD_x86.s
VBox-xpcom-nspr_SOURCES.linux.amd64 = nsprpub/pr/src/md/unix/os_Linux_x86_64.s
VBox-xpcom-nspr_SOURCES.os2 = \
@@ -959,6 +992,8 @@
xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp
VBox-xpcom-xptcall_SOURCES.linux.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp \
xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
+VBox-xpcom-xptcall_SOURCES.freebsd.x86 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp \
+ xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
VBox-xpcom-xptcall_SOURCES.linux.amd64 = xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_linux.cpp \
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
# gcc/emx sources
@@ -1043,6 +1078,21 @@
$(TARGET_VBox-xpcom-proxy) \
$(TARGET_VBox-xpcom-nspr) \
-Wl,--no-whole-archive
+
+VBoxXPCOM_LDFLAGS.freebsd = -Wl,--whole-archive \
+ $(TARGET_VBox-xpcom-typelib) \
+ $(TARGET_VBox-xpcom-string) \
+ $(TARGET_VBox-xpcom-base) \
+ $(TARGET_VBox-xpcom-ds) \
+ $(TARGET_VBox-xpcom-io) \
+ $(TARGET_VBox-xpcom-components) \
+ $(TARGET_VBox-xpcom-threads) \
+ $(TARGET_VBox-xpcom-xptinfo) \
+ $(TARGET_VBox-xpcom-xptcall) \
+ $(TARGET_VBox-xpcom-proxy) \
+ $(TARGET_VBox-xpcom-nspr) \
+ -Wl,--no-whole-archive
+
#VBoxXPCOM_LIBS.l4 = $(L4_LIBDIR)/libxpcomstubs.a $(L4_LIBDIR)/../libuc_c++.a \
# $(VBOX_PATH_L4_GCC3_INSTALL)/libsupc++.a $(VBOX_PATH_L4_GCC3_INSTALL)/libgcc_eh.a
# EF heap
@@ -1062,6 +1112,7 @@
TEMPLATE_XPCOMIPC_DEFS.win = $(TEMPLATE_XPCOM_DEFS.win) IPC_DAEMON_APP_NAME=\"VBoxXPCOMIPCD.exe\"
TEMPLATE_XPCOMIPC_DEFS.darwin = $(TEMPLATE_XPCOM_DEFS.darwin) IPC_DAEMON_APP_NAME=\"VBoxXPCOMIPCD\"
TEMPLATE_XPCOMIPC_DEFS.linux = $(TEMPLATE_XPCOM_DEFS.linux) IPC_DAEMON_APP_NAME=\"VBoxXPCOMIPCD\"
+TEMPLATE_XPCOMIPC_DEFS.freebsd = $(TEMPLATE_XPCOM_DEFS.freebsd) IPC_DAEMON_APP_NAME=\"VBoxXPCOMIPCD\"
TEMPLATE_XPCOMIPC_DEFS.l4 = $(TEMPLATE_XPCOM_DEFS.l4) IPC_DAEMON_APP_NAME=\"VBoxXPCOMIPCD\"
TEMPLATE_XPCOMIPC_DEFS.os2 = $(TEMPLATE_XPCOM_DEFS.os2) IPC_DAEMON_APP_NAME=\"VBoxXPCOMIPCD.exe\"
@@ -1135,6 +1186,8 @@
ipc/ipcd/client/src/ipcConnectionUnix.cpp
VBoxXPCOMIPCC_SOURCES.linux = \
ipc/ipcd/client/src/ipcConnectionUnix.cpp
+VBoxXPCOMIPCC_SOURCES.freebsd = \
+ ipc/ipcd/client/src/ipcConnectionUnix.cpp
VBoxXPCOMIPCC_SOURCES.os2 = \
ipc/ipcd/client/src/ipcConnectionUnix.cpp
VBoxXPCOMIPCC_LDFLAGS.darwin = -install_name @executable_path/components/VBoxXPCOMIPCC.dylib
@@ -1162,6 +1215,8 @@
ipc/ipcd/daemon/src/ipcdUnix.cpp
VBoxXPCOMIPCD_SOURCES.linux = \
ipc/ipcd/daemon/src/ipcdUnix.cpp
+VBoxXPCOMIPCD_SOURCES.freebsd = \
+ ipc/ipcd/daemon/src/ipcdUnix.cpp
VBoxXPCOMIPCD_SOURCES.os2 = \
ipc/ipcd/daemon/src/ipcdUnix.cpp
Index: src/VBox/Frontends/VirtualBox/include/XKeyboard.h
===================================================================
--- src/VBox/Frontends/VirtualBox/include/XKeyboard.h (révision 4817)
+++ src/VBox/Frontends/VirtualBox/include/XKeyboard.h (copie de travail)
@@ -19,9 +19,9 @@
#ifndef __XKeyboard_h__
#define __XKeyboard_h__
-#ifndef RT_OS_LINUX
-#error This file is X11/Linux specific!
-#endif
+//#ifndef RT_OS_LINUX
+#warning This file is X11/Linux specific! IT WAS AN ERROR ...... IF !=LINUX ... FIXME
+// # endif
// our structure used to return keyboard event information
typedef struct _WINEKEYBOARDINFO
Index: src/VBox/Frontends/VirtualBox/src/VBoxDownloaderWgt.cpp
===================================================================
--- src/VBox/Frontends/VirtualBox/src/VBoxDownloaderWgt.cpp (révision 4817)
+++ src/VBox/Frontends/VirtualBox/src/VBoxDownloaderWgt.cpp (copie de travail)
@@ -319,6 +319,7 @@
mConn->pump();
}
}
+
catch (happyhttp::Wobbly &ex)
{
QApplication::postEvent (mParent,
Index: src/VBox/Frontends/VirtualBox/ui/VBoxNewHDWzd.ui.h
===================================================================
--- src/VBox/Frontends/VirtualBox/ui/VBoxNewHDWzd.ui.h (révision 4817)
+++ src/VBox/Frontends/VirtualBox/ui/VBoxNewHDWzd.ui.h (copie de travail)
@@ -316,7 +316,8 @@
QString ext = QFileInfo (name).extension();
/* compare against the proper case */
-#if defined (Q_OS_LINUX)
+#if defined (Q_OS_LINUX) || defined (Q_OS_FREEBSD)
+#warning Dirty Hack to pass 'Port me' problem on FreeBSD... Check that code .
#elif defined (Q_OS_WIN) || defined (Q_OS_OS2) || defined (Q_OS_MACX)
ext = ext.lower();
#else
Index: src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- src/VBox/Frontends/VirtualBox/Makefile.kmk (révision 4817)
+++ src/VBox/Frontends/VirtualBox/Makefile.kmk (copie de travail)
@@ -36,16 +36,20 @@
PROGRAMS = VirtualBox
DLLS.linux = VBoxKeyboard
+DLLS.freebsd = VBoxKeyboard
INSTALLS = VirtualBox.nls
VBoxKeyboard_TEMPLATE = VBOXR3
VBoxKeyboard_SOURCES = \
src/linux/keyboard.c
+VBoxKeyboard_INCS.freebsd = \
+ /usr/local/include
VirtualBox_TEMPLATE = VBOXQTGUIEXE
VirtualBox_SDKS.win = WINPSDK DXSDK
VirtualBox_SDKS.linux = LIBSDL
+VirtualBox_SDKS.freebsd = LIBSDL
VirtualBox_SDKS.os2 = LIBSDL
ifeq ($(BUILD_TARGET),darwin)
@@ -89,7 +93,7 @@
# Sources containing local definitions of classes that use the Q_OBJECT macro
VirtualBox_QT_MOCSRCS = src/VBoxSelectorWnd.cpp
-ifeq ($(BUILD_TARGET),linux)
+ifeq ($(filter-out linux freebsd, $(BUILD_TARGET)),)
VirtualBox_QT_MOCSRCS += src/VBoxGlobal.cpp
endif
ifdef VBOX_WITH_XPCOM
@@ -160,6 +164,9 @@
VirtualBox_SOURCES.linux = \
src/linux/XKeyboard.cpp
+VirtualBox_SOURCES.freebsd = \
+ src/linux/XKeyboard.cpp
+
VirtualBox_SOURCES.darwin = \
src/darwin/DarwinKeyboard.cpp \
src/darwin/DarwinCursor.cpp \
@@ -167,9 +174,11 @@
src/darwin/VBoxUtils-darwin.cpp
src/HappyHttp.cpp_CXXFLAGS.linux += -fexceptions -O2
+src/HappyHttp.cpp_CXXFLAGS.freebsd += -fexceptions
src/HappyHttp.cpp_CXXFLAGS.darwin += -fexceptions
src/HappyHttp.cpp_CXXFLAGS.os2 += -fexceptions
src/VBoxDownloaderWgt.cpp_CXXFLAGS.linux += -fexceptions
+src/VBoxDownloaderWgt.cpp_CXXFLAGS.freebsd += -fexceptions
src/VBoxDownloaderWgt.cpp_CXXFLAGS.darwin += -fexceptions
src/VBoxDownloaderWgt.cpp_CXXFLAGS.os2 += -fexceptions
@@ -184,6 +193,7 @@
VirtualBox_DEFS.debug = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT
VirtualBox_DEFS.darwin = VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
VirtualBox_DEFS.linux = VBOX_GUI_USE_SDL
+VirtualBox_DEFS.freebsd = VBOX_GUI_USE_SDL
VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
VirtualBox_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
VirtualBox_DEFS.os2 = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL QT_DLL
@@ -195,6 +205,7 @@
VirtualBox_DEFS += VBOX_GUI_USE_REFRESH_TIMER
VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
VirtualBox_DEFS.linux += VBOX_GUI_USE_QIMAGE
+ VirtualBox_DEFS.freebsd += VBOX_GUI_USE_QIMAGE
endif
ifdef VBOX_WITH_ALSA
VirtualBox_DEFS += VBOX_WITH_ALSA
@@ -212,7 +223,6 @@
$(PATH_VirtualBox)/moc \
$(PATH_VirtualBox)/include \
-
ifeq ($(BUILD_TYPE),release)
VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
else
@@ -229,6 +239,7 @@
$(PATH_SDK_DXSDK_LIB)/ddraw.lib \
$(PATH_SDK_DXSDK_LIB)/dxguid.lib
VirtualBox_LIBS.linux = $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
+VirtualBox_LIBS.freebsd = $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
ifdef VBOX_WITH_DEBUGGER_GUI
Index: src/VBox/Frontends/VBoxSDL/Makefile.kmk
===================================================================
--- src/VBox/Frontends/VBoxSDL/Makefile.kmk (révision 4817)
+++ src/VBox/Frontends/VBoxSDL/Makefile.kmk (copie de travail)
@@ -63,6 +63,8 @@
endif
VBoxSDL_LIBS.linux = \
$(LIB_XCURSOR)
+VBoxSDL_LIBS.freebsd = \
+ $(LIB_XCURSOR)
VBoxSDL_LDFLAGS.darwin = \
-framework Foundation -framework AppKit
ifdef VBOX_OPENGL
Index: src/VBox/Frontends/VBoxBFE/Makefile.kmk
===================================================================
--- src/VBox/Frontends/VBoxBFE/Makefile.kmk (révision 4817)
+++ src/VBox/Frontends/VBoxBFE/Makefile.kmk (copie de travail)
@@ -67,6 +67,9 @@
VBoxBFE_SOURCES.os2 = \
SDLConsole.cpp \
SDLFramebuffer.cpp
+VBoxBFE_SOURCES.freebsd = \
+ SDLConsole.cpp \
+ SDLFramebuffer.cpp
VBoxBFE_SOURCES.linux = \
SDLConsole.cpp \
SDLFramebuffer.cpp \
@@ -92,6 +95,7 @@
VBoxBFE_LIBS = \
$(LIB_RUNTIME) \
+ $(LIB_REM) \
$(LIB_VMM)
ifneq ($(filter-out win os2 l4,$(BUILD_TARGET)),)
VBoxBFE_LIBS += \
@@ -104,6 +108,7 @@
VBoxBFE_LIBS.linux = \
$(LIB_RUNTIME) \
$(LIB_XCURSOR)
+
VBoxBFE_LIBS.l4 = \
$(L4_LIBDIR)/libl4con-idl.a \
$(L4_LIBDIR)/libdm_generic.a \
Index: src/VBox/Main/include/VirtualBoxXMLUtil.h
===================================================================
--- src/VBox/Main/include/VirtualBoxXMLUtil.h (révision 4817)
+++ src/VBox/Main/include/VirtualBoxXMLUtil.h (copie de travail)
@@ -39,6 +39,8 @@
# define VBOX_XML_PLATFORM "macosx"
#elif defined (RT_OS_OS2)
# define VBOX_XML_PLATFORM "os2"
+#elif defined (RT_OS_FREEBSD)
+# define VBOX_XML_PLATFORM "freebsd"
#else
# error Unsupported platform!
#endif
Index: src/VBox/Main/Makefile.kmk
===================================================================
--- src/VBox/Main/Makefile.kmk (révision 4817)
+++ src/VBox/Main/Makefile.kmk (copie de travail)
@@ -375,6 +375,20 @@
$(PATH_TARGET)
VBoxXML_SOURCES = \
xml/cfgldr.cpp
+VBoxXML_CFLAGS += \
+ -L/usr/local/lib
+
+ifeq ($(BUILD_TARGET),freebsd)
+VBoxXML_INCS += \
+ /usr/local/include
+VBoxXML_LIBPATH += \
+ /usr/local/lib
+endif
+#OF ifeq ($(BUILD_TARGET),freebsd)
+#VBoxXML_INCS += \
+# -I/usr/local/include -L/usr/local/lib
+#endif
+
VBoxXML_LDFLAGS.darwin = -install_name @executable_path/VBoxXML.dylib -Wl,-x # no debug info please.
## @todo (dmik): temporarily embed SettingsConverter.xsl into VBoxXML,
@@ -412,6 +426,7 @@
glue/string.cpp \
glue/EventQueue.cpp \
glue/ErrorInfo.cpp
+
ifeq ($(BUILD_TARGET),win)
VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
@@ -454,6 +469,7 @@
VBOX_XML_SCHEMA_COMMON = xml/VirtualBox-settings-common.xsd
VBOX_XML_SCHEMA.darwin = xml/VirtualBox-settings-macosx.xsd
VBOX_XML_SCHEMA.linux = xml/VirtualBox-settings-linux.xsd
+VBOX_XML_SCHEMA.freebsd = xml/VirtualBox-settings-freebsd.xsd
VBOX_XML_SCHEMA.win = xml/VirtualBox-settings-windows.xsd
VBOX_XML_SCHEMA.os2 = xml/VirtualBox-settings-os2.xsd
@@ -597,6 +613,7 @@
VBoxC_TRANSLATIONS = \
nls/VBoxC_de.ts
+
updatenls:
$(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_HEADERS) -ts $(VBoxSVC_TRANSLATIONS)
$(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_HEADERS) -ts $(VBoxC_TRANSLATIONS)
Index: src/VBox/Main/xml/VirtualBox-settings-freebsd.xsd
===================================================================
--- src/VBox/Main/xml/VirtualBox-settings-freebsd.xsd (révision 0)
+++ src/VBox/Main/xml/VirtualBox-settings-freebsd.xsd (révision 0)
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * :tabSize=2:indentSize=2:noTabs=true:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * innotek VirtualBox Settings Schema Version 1.0-linux
+
+ Copyright (C) 2004-2007 innotek GmbH
+
+ This file is part of VirtualBox Open Source Edition (OSE), as
+ available from http://www.virtualbox.org. This file is free software;
+ you can redistribute it and/or modify it under the terms of the GNU
+ General Public License as published by the Free Software Foundation,
+ in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
+ distribution. VirtualBox OSE is distributed in the hope that it will
+ be useful, but WITHOUT ANY WARRANTY of any kind.
+-->
+
+<xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://www.innotek.de/VirtualBox-settings"
+ xmlns:vb="http://www.innotek.de/VirtualBox-settings"
+ targetNamespace="http://www.innotek.de/VirtualBox-settings"
+ elementFormDefault="qualified"
+>
+
+<xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ innotek VirtualBox Settings Schema Version 1.0-linux.
+ Copyright (c) 2004-2007 innotek GmbH.
+ </xsd:documentation>
+</xsd:annotation>
+
+<xsd:include schemaLocation="VirtualBox-settings-common.xsd"/>
+
+<!--
+// Simple types
+/////////////////////////////////////////////////////////////////////////
+-->
+
+<!--
+// Complex types
+/////////////////////////////////////////////////////////////////////////
+-->
+
+<xsd:complexType name="TMemory">
+ <xsd:attribute name="RAMSize" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:unsignedInt">
+ <xsd:minInclusive value="4"/>
+ <xsd:maxInclusive value="2000"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+</xsd:complexType>
+
+<xsd:complexType name="TNetwork">
+ <xsd:sequence>
+ <xsd:element name="Adapter" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="TAdapter">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="NAT">
+ <xsd:complexType/>
+ </xsd:element>
+ <xsd:element name="HostInterface">
+ <xsd:complexType>
+ <xsd:attribute name="name" type="TLocalFile"/>
+ <xsd:attribute name="TAPSetup" type="TLocalFile"/>
+ <xsd:attribute name="TAPTerminate" type="TLocalFile"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="InternalNetwork">
+ <xsd:complexType>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="TAudioAdapter">
+ <xsd:attribute name="enabled" type="xsd:boolean"/>
+ <xsd:attribute name="driver" use="required">
+ <!--- @todo (dmik) capitalize enum values on next format change! -->
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="null"/>
+ <xsd:enumeration value="oss"/>
+ <xsd:enumeration value="alsa"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+</xsd:complexType>
+
+<!--
+// Root element
+/////////////////////////////////////////////////////////////////////////
+-->
+
+<xsd:element name="VirtualBox">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="TVirtualBox">
+ <xsd:attribute name="version" type="xsd:token" fixed="1.2-linux" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+</xsd:element>
+
+</xsd:schema>
Index: src/VBox/Main/ConsoleImpl.cpp
===================================================================
--- src/VBox/Main/ConsoleImpl.cpp (révision 4817)
+++ src/VBox/Main/ConsoleImpl.cpp (copie de travail)
@@ -17,19 +17,31 @@
#if defined(RT_OS_WINDOWS)
#elif defined(RT_OS_LINUX)
+#elif defined(RT_OS_FREEBSD)
# include <errno.h>
# include <sys/ioctl.h>
# include <sys/poll.h>
# include <sys/fcntl.h>
# include <sys/types.h>
# include <sys/wait.h>
+#if defined(RT_OS_FREEBSD)
+#warning "FREEBSD INCLUDES DEBUG!"
+# include <sys/socket.h>
+#endif
# include <net/if.h>
-# include <linux/if_tun.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
#endif
+
+#if defined(RT_OS_LINUX)
+# include <linux/if_tun.h>
+# endif
+
+
+
+
#include "ConsoleImpl.h"
#include "GuestImpl.h"
#include "KeyboardImpl.h"
@@ -5221,6 +5233,9 @@
#elif defined(RT_OS_OS2)
/** @todo Implement tap networking for OS/2. */
int rcVBox = VERR_NOT_IMPLEMENTED;
+#elif defined(RT_OS_FREEBSD)
+ /** @todo Implement tap networking for OS/2. */
+ int rcVBox = VERR_NOT_IMPLEMENTED;
#elif defined(VBOX_WITH_UNIXY_TAP_NETWORKING)
# error "PORTME: Implement OS specific TAP interface open/creation."
#else
Index: src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp
===================================================================
--- src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp (révision 4817)
+++ src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp (copie de travail)
@@ -111,8 +111,12 @@
{
AssertMsg(g_hDevice != -1, ("SUPLIB not initiated successfully!\n"));
- if (RT_LIKELY(ioctl((g_hDevice, uFunction, pvReq) >= 0))
+#if defined(RT_OS_LINUX)
+ if (RT_LIKELY(ioctl((g_hDevice, uFunction, pvReq) >= 0)))
return VINF_SUCCESS;
+#elif defined(RT_OS_FREEBSD)
+# warning FIXME FIXME FIXME !!!!!
+#endif
return RTErrConvertFromErrno(errno);
}
_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev