Subject: Re: how to detect at runtime which system you're running on...
To: Chris Gilbert <chris@paradox.demon.co.uk>
From: Todd Vierling <tv@wasabisystems.com>
List: port-arm
Date: 06/19/2001 17:58:20
On Tue, 19 Jun 2001, Chris Gilbert wrote:

: What I really meant the platform, IE CATS and EBSA are identical bar one
: section of code in footbridge_pci.c, so the arch is cats, but the platform is
: ebsa or cats.  However footbridge is shared with netwinder, so the variable
: either becomes footbridge specific, or I generalise it.  So that anyone
: looking at the code sees:
:
: if (platform_type == pt_EBSA)
: or
: if (platform_type == pt_A7000)
:
: they can clearly see what it means, for archs that are just one platform it's
: just a macro, and gets delt with at compile_time.

It should be a footbridge-specific variable, but you can name it whatever
you like.  You have to detect the difference somehow, so that detection
should set an appropriate flag.

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi NetBSD:  Run with it.
-- NetBSD 1.5 now available on CD-ROM  --  http://www.wasabisystems.com/