🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3684

Re: Help: How to determine big/little endian?

#3684
From: Pete Forman
Date: Wed, 09 Aug 1995 08:17
27 lines
1411 bytes
In article <408q5f$7is@news.hic.net> weddb@hic.net (Bruce Wedding) writes:
> Is that public domain code?  If so, Bob Stout may want it for
> Snippets.  

Yes.  I wrote it myself.   Feel free to do what you like with it.

There is a bit more of the program which prints out defined symbols,
e.g.

#if defined(__STDC__)
    (void) printf("__STDC__         defined\n");
#else
    (void) printf("__STDC__         not defined\n");
#endif
#if defined(_POSIX_SOURCE)
    (void) printf("_POSIX_SOURCE    defined\n");
#else
    (void) printf("_POSIX_SOURCE    not defined\n");
#endif

The list of symbols so tested is specific to the platforms that I
compile on (AIX, HPUX, ISC, IRIX).  It needs to be tweaked to look at
interesting symbols on other platforms.
-- 
Pete Forman
Western Geophysical
pete.forman@bedford.waii.com
Technical Details
Message-ID: <GSEZ020.95Aug9091713@mandy.bedford.waii.com>
Path: arc1-ca.pugleaf.net!airgun.wg.waii.com!gsez020
References: <40762c$nh7@masala.cc.uh.edu> <GSEZ020.95Aug8094207@mandy.bedford.waii.com> <408q5f$7is@news.hic.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!airgun.wg.waii.com!gsez020
From: gsez020@mandy.bedford.waii.com (Pete Forman)
Newsgroups: comp.std.c
Subject: Re: Help: How to determine big/little endian?
Date: 09 Aug 1995 08:17:13 GMT
Organization: Western Geophysical, Div. of Western Atlas Int'l, Houston, TX
Message-ID: <GSEZ020.95Aug9091713@mandy.bedford.waii.com>
References: <40762c$nh7@masala.cc.uh.edu> <GSEZ020.95Aug8094207@mandy.bedford.waii.com>
 <408q5f$7is@news.hic.net>
NNTP-Posting-Host: mandy.bedford.waii.com
In-reply-to: weddb@hic.net's message of Tue, 08 Aug 1995 22:54:08 GMT