machine label.
Chris Johns
cjohns at cybertec.com.au
Tue Nov 19 11:45:18 UTC 2002
Ralf Corsepius wrote:
> Am Die, 2002-11-19 um 04.21 schrieb Chris Johns:
>
> >Does a define exist that describes the "machine" ?
>
> What do you mean by "machine", here?
I suppose it is the label returned by "uname -m" on FreeBSD or which
ever Unix.
> architecture/cpu?
> cpu-variant?
> OS?
> uname?
>
> There exist several defines and variables in RTEMS which could be used
> for such purposes.
This is what I was wondering. If it existed I would use it.
> >This is for the global "extern char machine[];" that is found on
> FreeBSD boxes.
>
> This doesn't exist in RTEMS ;)
Does in my code. I am porting the FreeBSD sysctl call :-)
If you look in the sys/sysctl.h file you will see a few externs. The
FreeBSD kernel file kern/kern_mib.c references these variables as they
are exported via the sysctl call. If there was something around I would
define them and have provide sysctl provide them.
> > I
> >have found PACKAGE_VERSION" for the version,
>
> Don't use this one - It is autoconf adding it per configure script (In
> autoconf terms each configure script sets up a "PACKAGE")
Sure, and it appears in a header file that included. Is this a problem ?
> > and ostype is set to "RTEMS".
>
> Do you want to destinguish RTEMS from other OSes?
> Then you could use __rtems__ (defined by gcc).
You may remotely via a protocol such as SNMP.
It was a case of looking at what it takes to include these variables. If
it is not worth including that is fine.
--
Chris Johns, cjohns at cybertec.com.au
More information about the users
mailing list