Subject: Re: X server for sparc
To: Dennis Ferguson <dennis@ans.net>
From: Theo de Raadt <deraadt@fsa.ca>
List: port-sparc
Date: 07/21/1994 14:43:06
> I'm not sure what you're seeing.  To be very clear I was not telling you
> where to put files, I was telling you exactly what I did to do a quick
> compile.  What I was asking is for you to tell me where I should be including
> this stuff from so I can do it right.

I understand it was a quick hack -- I would like to see something that
we can give the the X consortium.  As well, I would like it so that people do
not need to reorganize their /usr/include tree. Also, the sbus/* and dev/*
files do not belong in /usr/include because no other NetBSD architecture
copies anything similar -- it is always in /usr/include/machine.

> >> A few #include files from arch/sparc/{dev,sbus} need to be copied somewhere
> >> easier to get at.  Absolutely required are

That copying is unacceptable!

> >>	dev/kbio.h
> >>	dev/kbd.h
> >>	dev/vuid_event.h
> I need the entire contents of these three include files (as far as I can
> tell the only reason they exist is to provide SunOS-compatible support
> for the X server, the X server requires everything in there), and it would
> be less work on the server if you included the extra defines I sent in the
> last message.

You are saying that these files belong in arch/sparc/include (which is
copied to /usr/include/machine) instead.  That sounds reasonable.

> >>	sbus/btreg.h
> >>	sbus/bwtworeg.h
> >>	sbus/cgthreereg.h
> >>	sbus/cgsixreg.h
[...]
> I included bwtworeg.h where the server includes <sundev/bw2reg.h>, but
> it doesn't seem to me that anything is used from here (I'll try to take
> it out).  If you had a clean way to make device include files as accessable
> as the rest of the machine-dependent include files I would include these
> to pick up the constants, otherwise it isn't worth worrying about.

Good. If you can remove the reliance on these files that would be cool.
If you need a new file (or files) in arch/sparc/include, let me know.

> Is that better?  I don't care where the files go, or how they're rearranged,
> I just need a #include which gives me the contents of the first three.

Excellent. Yes, the idea is that a user shouldn't need to
rearrange/touch his /usr/include directory to compile X11R6. Nor
should we need to install any more files besides those in
arch/sparc/include which are copied to /usr/include/machine.

> The trouble is, I did a most of the work by inserting #ifdef __NetBSD__'s
> in places where it needed something different.

Yeah, it shouldn't be too hard. If you can make your diffs as minimal
as possible the chances of getting them into an X11R6 patch are
greater than a messy patch.

> I also
> am in need of a way to distinguish a NetBSD sparc machine from a NetBSD 386
> machine.

#if defined(__NetBSD__) && defined(sparc)
#if defined(__NetBSD__) && defined(i386)
That's the basic idea.

Of course, there are also a bunch of other NetBSD architectures out there,
so please be careful.

> In any case, if there is someone who knows enough about X and NetBSD to take
> this from crude hack to a clean set of patches and has time to work a bit on
> this, please let me know.

I think that Matthew is the best person.. but I don't think he has his
SLC yet (yes, imagine it! a slow SLC!)

------------------------------------------------------------------------------