#11 FreeBSD compatibility

open
nobody
None
5
2013-02-19
2009-09-14
Aragon
No

There are some parts of the d2x-xl source that are incompatible with FreeBSD. Some are a simple case of patching, others I think need some discussion so as to benefit more than just FreeBSD.

Firstly, I've attached a small patch that fixes some OpenGL defines for FreeBSD.

In include/pstypes.h, ushort, uint, and ulong get defined for non-Unix platforms. To my knowledge these types are non-standard and so won't be defined on any standards compliant system. For certain they're not defined in FreeBSD and so pstypes.h should define them itself. In your experience, which Unix systems define these types internally? I'm thinking it would be better to exclude those specific systems rather than blanketing the whole of __unix__.

In a few places malloc.h is #included conditionally for non-macosx systems. To my knowledge malloc.h has been deprecated for years on all standards compliant systems, including FreeBSD, and replaced with stdlib.h. Can references to malloc.h be changed to stdlib.h unconditionally? What has been your experience?

Discussion

  • Aragon

    Aragon - 2009-09-14

    include/ogl_defs.h fix for FreeBSD

     
  • karx11erx

    karx11erx - 2009-10-24

    Regarding ushort etc.: The compile works on my Linux system, so I suppose they get defined somewhere by gcc. I have made these types available when __FreeBSD__ is defined.

     
  • karx11erx

    karx11erx - 2009-10-24

    Patch applied. malloc.h is not needed anymore -> deleted from the source code.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks