updated FreeBSD patch

Hampton Maxwell maxwell at 101freeway.com
Mon Jan 28 04:47:30 EST 2002


Included is an updated patch for building on FreeBSD.  Everything nows 
works using the sdlquake2 executable including glx support.  Due to some 
mmap issues, sound won't work with the regular quake2 executable as well 
as glx support is broken on my system because of some linker issues. 
I'll send a patch if I figure out either.  In theory all these changes 
should be portable to Net/OpenBSD but I don't have a machine to test 
them.  All that would be needed would be to change all the #if defined 
__FreeBSD__'s to #if defined __BSD__

For the guy who wanted to port to Solaris: it should be relatively 
simple.  You will need to do is search all the source for __linux__ & 
__FreeBSD__ and make changes to get solaris working.  In some cases no 
changes would be necessary other than something like:
#if defined __linux__ || defined __FreeBSD__
-> #if defined __linux || defined __FreeBSD__ || defined __solaristag__
Others will require you to rewrite the ioctl arguments to use the 
appropriate structs for Solaris.  If you look at all the FreeBSD 
specific changes, you'll get the idea.  I found the source for FreeBSD's 
linux compatibility layer extremely helpful, getting a copy of the 
Solaris source (if still available) would be a good start.  I was able 
to do this without having any experience with the source or knowledge of 
porting to FreeBSD.  Feel free to email me with questions.

Which brings me to another point.  I would recommend folding all the 
unix files into the linux tree.  If Solaris/Irix/etc. are at all similar 
to Linux & FreeBSD this would be quite simple and make updating the 
source a one-stop endevour.

Hampton
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: q2freebsd-2.diff
URL: <http://icculus.org/pipermail/quake2/attachments/20020128/efcbd68a/attachment.diff>


More information about the quake2 mailing list