Subject: Re: LP64 advice
To: john heasley <heas@shrubbery.net>
From: Martin Husemann <martin@duskware.de>
List: port-sparc64
Date: 01/26/2003 10:22:46
On Sun, Jan 26, 2003 at 04:58:44AM +0000, john heasley wrote:

> thanks.  i didnt realize that xfree had sparc servers, but i will
> restart with xfree.

Yes, the only way anything moving forward will go is getting the XFree servers
of XFree 4.2.x going. Those will give us more or less accelerated drivers
for ~all hardwarre available for Suns.

Part of this is providing (optional) a wskbd/wsdisplay console attachement,
which I'm working on. This will make it possible to use the same kernel
interface as for example macppc uses.

> i figured a good starting point might be to clean-up the o/p of
> gcc -Wall...

Yes. And no. See below.

> what is normally done for printfs of addresses? eg
> 
> 	printf("%d", ptr - otherptr);

We used to do "%lld" and (long long int)(ptr - otherptr).
The C99 way would be "%zd" and no cast. But see below.

> i noticed jason's comment
> 
> 	Use <inttypes.h> and PRIx64 or the like.

This mainly applies to the kernel I guess.

What now?

A primary goal has to be to get all local changes back to the xfree 
maintainers and get them integrated. So, the cast question realy has to go to
them - whetever style they prefer is better for us.

Then note that the next XFree release is supposed to happen very soon. They
have lots of changes in there, probably mostly fixing all your problems already
since I suppose they integrated the OpenBSD XFree support (and/or FreeBSD) for
sparc64.

So I'd suggest you either get their changes and compare to our in tree stuff,
or you just start with one of their latest snapshots/cvs trees.

Martin