lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lwip-users] Problem With dns.c Using 32-Bit Compilers


From: Bill Auerbach
Subject: RE: [lwip-users] Problem With dns.c Using 32-Bit Compilers
Date: Fri, 29 Aug 2008 09:36:14 -0400

> What about macros to make it portable and universal?

Not sure why it concatenated line... <sigh>

#ifdef WORD_ACCESS_PROCESSOR
#if BYTE_ORDER == LITTLE_ENDIAN
#define _W(w) ((*(u8_t*) &(w))+(*(((u8_t*) &(w))+1)<<8))
#endif
#if BYTE_ORDER == BIG_ENDIAN
#define _W(w) (*(((u8_t*) &(w))+1)+(*((u8_t*) &(w))<<8))
#endif
#else
#define _W(w) w
#endif

Bill





reply via email to

[Prev in Thread] Current Thread [Next in Thread]