Re: [AD] Linux headers problem

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, Jul 08, 1999 at 02:24:00PM +0200, Stepan Roh wrote:
> I have Slackware 4.0 and there were 2 problems with linux headers (against
> Allegro 3.9.20 WIP).
> 
> 1. header <sys/io.h> is not there, but removing is safe.
> 
> 2. there is no #define for MMAP_FAILED (or how is it) although manpage for
> mmap() say it.  I think that's bug in Slack (I wrote this #define to
> <linux/mmap.h> and it is working now).

Yes; the former seems to be a bug in at least Red Hat, which I
use.  It should be `#include <unistd.h>', but in Red Hat you
need sys/io.h instead.  The safe thing is for all distributions to
include unistd.h, and where necessary to include sys/io.h; I'm not
sure how to get the configure script to handle this though.

The latter does seem to be a Slackware problem; MAP_FAILED is
defined by POSIX, I think.  Try defining it to `(void *)-1'.

Making these changes solved the problems for someone else who
contacted me, so hopefully it'll work for you too.  Does the
Slackware manpage for mmap mention MAP_FAILED at all?  Does your
sys/mmap.h define _POSIX_MAPPED_FILES?  If it doesn't, other
errors should be generated instead.

-- 
George



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/