Re: libcurl byte order
Date: Tue, 17 May 2005 12:16:44 -0700
On Tue, May 17, 2005 at 12:48:04PM -0400, ER wrote:
> Hi allan,
> I've used cross tool to build several libraries before and didn't have the problem.
> When I grap info from my uri I'm expecting the first two bytes to be 0xffcf but I'm getting 0xcfff.
> I have two sets of cross tools I used and both give me the same result.
> Any ideas?
libcurl just delivers you an octet stream. How that stream is interpreted
is up to your program. It sounds like it's not interpreting the data
correctly. Are you mapping a struct* or int* or similar on top of your data
buffer? That's not portable. To fix that kind of situation, you'll need to
use endian translation function, such as ntoh() and its relatives. If
that's the case, I can point you to some macros I've written to reduce
the pain of this kind of manipulation.
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2005-05-17