With the patches I posted over the weekend, FlightGear as of todays CVS
compiles cleanly on FreeBSD 5.0 (released yesterday :-)

It's dog slow, because NVidia have not yet released accelerated drivers
for FreeBSD 5.0 (they've had all Monday to do it -- what's holding them
up?   :-)    [1]

The only snag I ran into was in SimGear, which has this in
simgear/xgl/xglUtils.c:

#if !defined( WIN32 )
#  if !defined( HAVE_STL_SGI_PORT ) && !defined( __MWERKS__ ) && !defined( __APPLE__ )
//   Avoid malloc with STLport and MSL
#    include <malloc.h>
#  endif
#endif

FreeBSD 5.0 finally made malloc.h obsolete (it was deprecated for
probably the whole 4.x range, if not longer), and the compile barfs on
it. I simply wrapped the whole thing in an #ifdef HAVE_MALLOC_H, but
this begs the question: why not do away with this whole #ifdef mess?

I presume a consed up config.h is around somewhere for non-autoconf
ports, and/or Windows ports require autoconf? Didn't check, Windows
isn't that close to my heart, but I'd expect the attached diff to do the
right thing, seeing that stdlib.h is similarly wrapped.

Cheers,

                                -- Bert


[1] For the humor impaired: I'm pretty happy with the work they did to
support FreeBSD 4.7. I may not like their stance on proprietary drivers,
but at least their stuff is stable.
-- 
Bert Driehuis -- [EMAIL PROTECTED] -- +31-20-3116119
If the only tool you've got is an axe, every problem looks like fun!
Index: simgear/xgl/xglUtils.c
===================================================================
RCS file: /var/cvs/SimGear-0.3/SimGear/simgear/xgl/xglUtils.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 xglUtils.c
*** simgear/xgl/xglUtils.c      7 Sep 2002 02:58:19 -0000       1.1.1.1
--- simgear/xgl/xglUtils.c      21 Jan 2003 01:30:20 -0000
***************
*** 3,13 ****
--- 3,15 ----
  #include <stdlib.h>
  #include <string.h>
  
+ #ifdef HAVE_MALLOC_H
  #if !defined( WIN32 )
  #  if !defined( HAVE_STL_SGI_PORT ) && !defined( __MWERKS__ ) && !defined( __APPLE__ 
)
  //   Avoid malloc with STLport and MSL
  #    include <malloc.h>
  #  endif
+ #endif
  #endif
  
  #ifdef HAVE_UNISTD_H

Reply via email to