Subject: Re: mmap problems
To: Matthias Scheler <email@example.com>
From: Chuck Silvers <firstname.lastname@example.org>
Date: 06/10/2001 18:11:19
what is this "offset" supposed to be, anyway?
if it's a memory or bus address, defining it as "int"
may make it impossible to support this on a 64-bit platform.
making it "unsigned int" will also fix the sign-extension problem,
but I don't know if that will make things any better on a 64-bit platform.
On Sun, Jun 10, 2001 at 12:17:21PM +0000, Matthias Scheler wrote:
> In article <20010527224700.S23342email@example.com>,
> "Jared D. McNeill" <firstname.lastname@example.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/