Hi,

here are two patches to compile virtualbox with gcc 4.3.

Cheers,

        -- andreas

License of the patches:

Copyright (c) 2007 Novell, Inc
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Index: src/VBox/Main/VMMDevInterface.cpp
===================================================================
--- src/VBox/Main/VMMDevInterface.cpp.orig
+++ src/VBox/Main/VMMDevInterface.cpp
@@ -27,6 +27,7 @@
 #include <VBox/VBoxGuest.h>
 #include <VBox/shflsvc.h>
 #include <iprt/asm.h>
+#include <stdio.h>
 
 #ifdef VBOX_HGCM
 #include "hgcm/HGCM.h"
Index: src/VBox/Additions/linux/xclient/main.cpp
===================================================================
--- src/VBox/Additions/linux/xclient/main.cpp.orig
+++ src/VBox/Additions/linux/xclient/main.cpp
@@ -30,6 +30,7 @@ using std::endl;
 #include <sys/types.h>
 #include <unistd.h>
 #include <getopt.h>
+#include <stdlib.h>
 
 #include <X11/Xlib.h>
 #include <X11/Intrinsic.h>
Index: src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
===================================================================
--- src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp.orig
+++ src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
@@ -28,6 +28,8 @@
 #include "VBoxRegistrationDlg.h"
 #endif
 
+#include <stdlib.h>
+
 #include <qapplication.h>
 #include <qmessagebox.h>
 #include <qpixmap.h>
Index: src/VBox/Frontends/VirtualBox/src/HappyHttp.cpp
===================================================================
--- src/VBox/Frontends/VirtualBox/src/HappyHttp.cpp.orig
+++ src/VBox/Frontends/VirtualBox/src/HappyHttp.cpp
@@ -68,6 +68,7 @@
 #include <cstdarg>
 #include <assert.h>
 
+#include <locale>
 #include <string>
 #include <vector>
 #include <string>
@@ -86,6 +87,23 @@ namespace happyhttp
 const char* GetWinsockErrorString( int err );
 #endif
 
+/*
+ * structs needed for std::transform()
+ * See: http://gcc.gnu.org/onlinedocs/libstdc++/22_locale/howto.html#7
+ */
+struct ToUpper {
+  ToUpper(std::locale const& l) : loc(l) {;}
+  char operator() (char c) const  { return std::toupper(c,loc); }
+private:
+  std::locale const& loc;
+};
+
+struct ToLower {
+  ToLower(std::locale const& l) : loc(l) {;}
+  char operator() (char c) const  { return std::tolower(c,loc); }
+private:
+  std::locale const& loc;
+};
 
 //---------------------------------------------------------------------
 // Helper functions
@@ -537,8 +555,10 @@ Response::Response( const char* method, 
 
 const char* Response::getheader( const char* name ) const
 {
+    ToLower __tolower(std::locale::classic());
+
     std::string lname( name );
-    std::transform( lname.begin(), lname.end(), lname.begin(), tolower );
+    std::transform( lname.begin(), lname.end(), lname.begin(), __tolower );
 
     std::map< std::string, std::string >::const_iterator it = m_Headers.find( lname );
     if( it == m_Headers.end() )
Index: src/recompiler/InnoTek/op-validate.sed
===================================================================
--- src/recompiler/InnoTek/op-validate.sed.orig
+++ src/recompiler/InnoTek/op-validate.sed
@@ -63,6 +63,8 @@ s/^[[:blank:]]*ret[[:blank:]]*\n*[[:blan
 /\.Lfe[0-9][0-9]*:/d
 /\.LFE[0-9][0-9]*:/d
 /size[[:space:]]/d
+/p2align[[:space:]]/d
+/^[/#][[:space:]]0[[:space:]]\"\"[[:space:]]2[[:space:]]*$/d
 /^[/#]NO_APP[[:space:]]*$/d
 /^$/!b bad
 b end

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev

Reply via email to