diff options
author | William Ahern <william@25thandclement.com> | 2006-06-19 06:41:55 +0000 |
---|---|---|
committer | William Ahern <william@25thandclement.com> | 2006-06-19 06:41:55 +0000 |
commit | d1ad89f943fa5abc98d8fd446d1869ac3bb363e3 (patch) | |
tree | 05eb98a37b2bcee5637acb3205b44103eec6fead | |
parent | 70dbc3725d9d297e3caa30f65cb4137c93420ba4 (diff) | |
download | c-ares-d1ad89f943fa5abc98d8fd446d1869ac3bb363e3.tar.gz c-ares-d1ad89f943fa5abc98d8fd446d1869ac3bb363e3.tar.bz2 c-ares-d1ad89f943fa5abc98d8fd446d1869ac3bb363e3.zip |
Remove "big endian" DNS section and RR data integer parser macros from
ares_dns.h, which break c-ares on my Sparc64. Bit-wise operations in C
operate on logical values. And in any event the octets are already in
big-endian (aka network) byte order so they're being reversed (thus the
source of the breakage).
-rw-r--r-- | CHANGES | 8 | ||||
-rw-r--r-- | ares_dns.h | 13 |
2 files changed, 8 insertions, 13 deletions
@@ -1,5 +1,13 @@ Changelog for the c-ares project +* June 19, 2006 + +- (wahern) Removed "big endian" DNS section and RR data integer parser + macros from ares_dns.h, which break c-ares on my Sparc64. Bit-wise + operations in C operate on logical values. And in any event the octets are + already in big-endian (aka network) byte order so they're being reversed + (thus the source of the breakage). + * June 18, 2006 - William Ahern handles EAGAIN/EWOULDBLOCK errors in most of the I/O calls @@ -18,18 +18,6 @@ #ifndef ARES__DNS_H #define ARES__DNS_H -#ifdef ARES_BIG_ENDIAN -/* big-endian aware versions */ -#define DNS__16BIT(p) (((p)[1] << 8) | (p)[0]) -#define DNS__32BIT(p) (((p)[3] << 24) | ((p)[2] << 16) | \ - ((p)[1] << 8) | (p)[0]) -#define DNS__SET16BIT(p, v) (((p)[1] = ((v) >> 8) & 0xff), \ - ((p)[0] = (v) & 0xff)) -#define DNS__SET32BIT(p, v) (((p)[3] = ((v) >> 24) & 0xff), \ - ((p)[2] = ((v) >> 16) & 0xff), \ - ((p)[1] = ((v) >> 8) & 0xff), \ - ((p)[0] = (v) & 0xff)) -#else #define DNS__16BIT(p) (((p)[0] << 8) | (p)[1]) #define DNS__32BIT(p) (((p)[0] << 24) | ((p)[1] << 16) | \ ((p)[2] << 8) | (p)[3]) @@ -39,7 +27,6 @@ ((p)[1] = ((v) >> 16) & 0xff), \ ((p)[2] = ((v) >> 8) & 0xff), \ ((p)[3] = (v) & 0xff)) -#endif #if 0 /* we cannot use this approach on systems where we can't access 16/32 bit |