summaryrefslogtreecommitdiffstats
path: root/include/arpa
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2002-05-28 04:32:25 +0000
committermike <mike@FreeBSD.org>2002-05-28 04:32:25 +0000
commit4edee95d825d290477e6a78d4a2936913736fa4a (patch)
treeb4e4879625b93a1c997167a6ef65f65a748d6a6a /include/arpa
parent5125105610503017a3dbbcb09ffba1015781143b (diff)
downloadFreeBSD-src-4edee95d825d290477e6a78d4a2936913736fa4a.zip
FreeBSD-src-4edee95d825d290477e6a78d4a2936913736fa4a.tar.gz
Prepend BIG_ENDIAN, BYTE_ORDER, LITTLE_ENDIAN, and PDP_ENDIAN with an
underscore. This is the preferred form. Also fix a preprocessor syntax error in an error-detection section.
Diffstat (limited to 'include/arpa')
-rw-r--r--include/arpa/nameser_compat.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/arpa/nameser_compat.h b/include/arpa/nameser_compat.h
index 2321797..e4f8ab8 100644
--- a/include/arpa/nameser_compat.h
+++ b/include/arpa/nameser_compat.h
@@ -43,15 +43,15 @@
#include <machine/endian.h>
-#if !defined(BYTE_ORDER) || \
- (BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN && \
- BYTE_ORDER != PDP_ENDIAN)
+#if !defined(_BYTE_ORDER) || \
+ (_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
/*
@@ -63,7 +63,7 @@
typedef struct {
unsigned id :16; /* query identification number */
-#if BYTE_ORDER == BIG_ENDIAN
+#if _BYTE_ORDER == _BIG_ENDIAN
/* fields in third byte */
unsigned qr: 1; /* response flag */
unsigned opcode: 4; /* purpose of message */
@@ -77,7 +77,7 @@ typedef struct {
unsigned cd: 1; /* checking disabled by resolver */
unsigned rcode :4; /* response code */
#endif
-#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
+#if _BYTE_ORDER == _LITTLE_ENDIAN || _BYTE_ORDER == _PDP_ENDIAN
/* fields in third byte */
unsigned rd :1; /* recursion desired */
unsigned tc :1; /* truncated message */
OpenPOWER on IntegriCloud