Actions
Bug #2169
closedarpa/nameser_compat.h: wrong macros
Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Start date:
2012-02-23
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
Description
arpa/nameser_compat.h
has macros to test endianless but it work incorretcly at least with GCC 4.7 :-)
Parentheses are needed.
# diff -dub nameser_compat.h nameser_compat.h.new --- nameser_compat.h 2012-02-23 19:20:34.000000000 +0400 +++ nameser_compat.h.new 2012-02-23 19:22:06.000000000 +0400 @@ -110,15 +110,15 @@ #endif /* BYTE_ORDER */ #if !defined(BYTE_ORDER) || \ - (BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN && \ - BYTE_ORDER != PDP_ENDIAN) + ((BYTE_ORDER != BIG_ENDIAN) && (BYTE_ORDER != LITTLE_ENDIAN) && \ + (BYTE_ORDER != PDP_ENDIAN)) /* * you must determine what the correct bit order is for * your compiler - the next line is an intentional error * which will force your compiles to bomb until you fix * the above macros. */ - error "Undefined or invalid BYTE_ORDER"; +# error "Undefined or invalid BYTE_ORDER"; #endif /*
Files
Updated by Electric Monk about 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 5566946ddee5d74cd7ce592465b954f7d90f62f7
commit 5566946ddee5d74cd7ce592465b954f7d90f62f7 Author: Igor Pashev <pashev.igor@gmail.com> Date: 2016-03-10T20:02:56.000Z 2169 arpa/nameser_compat.h: wrong macros Reviewed by: Dan McDonald <danmcd@omniti.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Lauri Tirkkonen <lotheac@iki.fi> Approved by: Garrett D'Amore <garrett@damore.org>
Actions