Article View: de.alt.comm.mgetty
Article #6Re: distinguish solaris 1 (SunOS 4) from solaris 2.x?
From: Alan Cox
Date: Fri, 10 Jun 1994 10:07
Date: Fri, 10 Jun 1994 10:07
23 lines
1430 bytes
1430 bytes
In article <Cr4EwE.q@greenie.muc.de> gert@greenie.muc.de (Gert Doering) writes:
>I think that's a major design error from sun - no way to determine the
>exact type of machine by C preprocessor statements.
You can actually do this. The byteorder macros let you spot a 386 and
sizeof(float) [from memory] lets you spot a sparc as does the structure
packing rules. Ok so
struct blah
{
...
}
#if sizeof(blah) == 12
#define sparc
#else
#define sun3
#endif
is nasty but it works.
Alan
Technical Details
Message-ID:
<1994Jun10.100729.5860@uk.ac.swan.pyr>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!Germany.EU.net!EU.net!uknet!cf-cm!cybaswan!iiitacReferences:
<FDC.94Jun4112458@cliwe.uucp> <1994Jun7.192234.11742@chemabs.uucp> <Cr4EwE.q@greenie.muc.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1025b4,c90ac97a442d5221 X-Google-Attributes: gid1025b4,public X-Google-Thread: f6653,c90ac97a442d5221 X-Google-Attributes: gidf6653,public X-Google-Thread: f52a0,c90ac97a442d5221 X-Google-Attributes: gidf52a0,public X-Google-Thread: 11035d,c90ac97a442d5221 X-Google-Attributes: gid11035d,public X-Google-ArrivalTime: 1994-06-10 03:48:20 PST Newsgroups: de.alt.comm.mgetty,comp.unix.solaris,comp.sys.sun.misc,gnu.misc.discuss Path: arc1-ca.pugleaf.net!nntp.gmd.de!Germany.EU.net!EU.net!uknet!cf-cm!cybaswan!iiitac From: iiitac@uk.ac.swan.pyr (Alan Cox) Subject: Re: distinguish solaris 1 (SunOS 4) from solaris 2.x? Message-ID: <1994Jun10.100729.5860@uk.ac.swan.pyr> Organization: Swansea University College References: <FDC.94Jun4112458@cliwe.uucp> <1994Jun7.192234.11742@chemabs.uucp> <Cr4EwE.q@greenie.muc.de> Date: Fri, 10 Jun 1994 10:07:29 GMT Lines: 24