Article View: de.alt.comm.mgetty
Article #8Re: distinguish solaris 1 (SunOS 4) from solaris 2.x?
From: Casper H.S. Dik
Date: Fri, 10 Jun 1994 11:08
Date: Fri, 10 Jun 1994 11:08
28 lines
1678 bytes
1678 bytes
iiitac@uk.ac.swan.pyr (Alan Cox) writes:
}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.
Really? I haven't seen many compilers supporting sizeof() in
the preprocessor.
Casper
Technical Details
Message-ID:
<2t9hk9$sg0@mail.fwi.uva.nl>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!xlink.net!howland.reston.ans.net!EU.net!sun4nl!fwi.uva.nl!casperReferences:
<FDC.94Jun4112458@cliwe.uucp> <1994Jun7.192234.11742@chemabs.uucp> <Cr4EwE.q@greenie.muc.de> <1994Jun10.100729.5860@uk.ac.swan.pyr>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit 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-Thread: 1025b4,c90ac97a442d5221 X-Google-Attributes: gid1025b4,public X-Google-ArrivalTime: 1994-06-10 04:17:18 PST Path: arc1-ca.pugleaf.net!nntp.gmd.de!xlink.net!howland.reston.ans.net!EU.net!sun4nl!fwi.uva.nl!casper From: casper@fwi.uva.nl (Casper H.S. Dik) Newsgroups: de.alt.comm.mgetty,comp.unix.solaris,comp.sys.sun.misc,gnu.misc.discuss Subject: Re: distinguish solaris 1 (SunOS 4) from solaris 2.x? Date: 10 Jun 1994 11:08:57 GMT Organization: FWI, University of Amsterdam Lines: 28 Distribution: world Message-ID: <2t9hk9$sg0@mail.fwi.uva.nl> References: <FDC.94Jun4112458@cliwe.uucp> <1994Jun7.192234.11742@chemabs.uucp> <Cr4EwE.q@greenie.muc.de> <1994Jun10.100729.5860@uk.ac.swan.pyr> NNTP-Posting-Host: adam.fwi.uva.nl