Subject: Re: mmap problems
To: None <tech-x11@netbsd.org>
From: Matthias Scheler <tron@zhadum.de>
List: tech-x11
Date: 06/10/2001 12:17:21
In article <20010527224700.S23342-100000@blackhole.invisible.ca>,
"Jared D. McNeill" <jmcneill@invisible.yi.org> writes:
> In xsrc/xc/lib/Xxf86dga/XF86DGA.c, in XF86DGAGetVideo(), I changed the line:
> int offset, fd;
> to read:
> int fd;
> unsigned long offset;
>
> The libXxf86dga code compiles (with a warning), but snes9x works like a
> charm with DGA (and as a result, full-screen mode works now too).
This is incorret because it will cause serious problems on LP64 systems.
A few lines later you will find this code:
XF86DGAGetVideoLL(dis, screen , &offset, width, bank, ram);
And "XF86DGAGetVideoLL" expects a pointer to an "int" (32Bit on LP64) while
with your patch it will get a pointer to a "unsigned long" (64Bit on LP64).
Kind regards
--
Matthias Scheler http://scheler.de/~matthias/