Article View: borland.public.cppbuilder.nativeapi
Article #9385Re: Big, Little and Bi endians
From: Donut
Date: Fri, 09 Jul 2004 11:09
Date: Fri, 09 Jul 2004 11:09
14 lines
1538 bytes
1538 bytes
htons, nstoh, htonl, nltoh, WSAHtonl, ... are good but they do not solve the mian problem that is being able to convert an arbitary structure. > Look up the htons, nstoh, htonl, nltoh, WSAHtonl, ... functions. These > functions convert from whatever the hardware uses natively to a neutral > consistent ordering. If you use the same functions on the different > platforms (well, OK, the WSAHxxx functions are Windows specific), then > it should all work fine, since the different platforms will supply their > own versions which Just Do The Right Thing. > > Note that the functions may just return whatever they're fed with if > that's already in network order. > > Alan Bellingham
Technical Details
Message-ID:
<40ee7ce6@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<40ee62ed$1@newsgroups.borland.com> <u1sse0t3kjlaedjkiifjg3ffjf8anhuhb7@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,e4fd0ef684fef580 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: <Donut> Newsgroups: borland.public.cppbuilder.nativeapi References: <40ee62ed$1@newsgroups.borland.com> <u1sse0t3kjlaedjkiifjg3ffjf8anhuhb7@4ax.com> Subject: Re: Big, Little and Bi endians Date: Fri, 9 Jul 2004 21:09:23 +1000 Lines: 16 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 211.30.68.31 Message-ID: <40ee7ce6@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1089371366 211.30.68.31 (9 Jul 2004 04:09:26 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail