Subject: ARES_BIG_ENDIAN Wrong

ARES_BIG_ENDIAN Wrong

From: William Ahern <william_at_25thandclement.com>
Date: 2006-06-09

So, testing my previous patch on OpenBSD/sparc64, I found that the 1.3.1
library just didn't work. Turns out, responses were being discarded as
corrupted. I traced the problem to the ARES_BIG_ENDIAN patch.

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.

- Bill
Received on Fri Jun 9 10:03:46 2006