Subject: Re: ARES_BIG_ENDIAN Wrong

Re: ARES_BIG_ENDIAN Wrong

From: Daniel Stenberg <daniel_at_haxx.se>
Date: 2006-06-09

On Fri, 9 Jun 2006, William Ahern wrote:

> This patch is completely wrong. Bit-wise operations in C are on _logical_
> values. Therefore, the previous DNS__16BIT and DNS__32BIT code was just fine
> (the shifts are logically correct). Endianness would matter if you tried to
> read or write directly from an integer type cast to a character array, at
> which point you'd be going behind the compiler's back.

Can you please post a patch that corrects this flaw?

-- 
   c-ares -- my preferred DNS asynch resolver library
Received on Fri Jun 9 10:07:52 2006