summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-07-21 01:51:12 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-07-21 01:51:12 +0000
commitaa9ef24e4656ff609846592e4a0986d78591ad4f (patch)
tree3e0e3b87efa9679d68f3c087efc8d191949505e6
parent378b6fbd3692c1ba624cff8309b6bdbcd76657a5 (diff)
Switch from <sys/endian.h> or <machine/endian.h> to the new,
being-standardized <endian.h> ok deraadt@ millert@ beck@
-rw-r--r--lib/libc/arch/arm/gen/infinity.c5
-rw-r--r--lib/libc/arch/arm/gen/nan.c5
-rw-r--r--lib/libc/arch/mips64/gen/infinity.c4
-rw-r--r--lib/libc/arch/mips64/gen/nan.c5
-rw-r--r--lib/libc/arch/sh/gen/infinity.c5
-rw-r--r--lib/libc/arch/sh/gen/nan.c5
-rw-r--r--lib/libc/arch/sh/net/htonl.c4
-rw-r--r--lib/libc/arch/sh/net/htons.c4
-rw-r--r--lib/libc/arch/sh/net/ntohl.c4
-rw-r--r--lib/libc/arch/sh/net/ntohs.c4
-rw-r--r--lib/libc/gen/ldexp.c4
-rw-r--r--lib/libc/hash/rmd160.c4
-rw-r--r--lib/libc/net/htonl.c4
-rw-r--r--lib/libc/net/htons.c4
-rw-r--r--lib/libc/net/ntohl.c4
-rw-r--r--lib/libc/net/ntohs.c4
-rw-r--r--lib/libc/rpc/xdr_float.c4
-rw-r--r--lib/libm/src/ld128/s_exp2l.c3
-rw-r--r--lib/libm/src/ld80/s_exp2l.c3
-rw-r--r--lib/libm/src/s_nan.c8
-rw-r--r--regress/lib/libc/cephes/mconf.h4
-rw-r--r--sbin/pdisk/convert.c2
-rw-r--r--sbin/restore/dirs.c5
-rw-r--r--sbin/restore/tape.c3
-rw-r--r--usr.sbin/npppd/l2tp/l2tp_ctrl.c6
-rw-r--r--usr.sbin/npppd/npppd/mppe.c6
-rw-r--r--usr.sbin/npppd/pppoe/pppoe.h4
-rw-r--r--usr.sbin/npppd/pppoe/pppoed.c6
-rw-r--r--usr.sbin/snmpd/snmp.h4
29 files changed, 60 insertions, 67 deletions
diff --git a/lib/libc/arch/arm/gen/infinity.c b/lib/libc/arch/arm/gen/infinity.c
index 2e3eb42111b..9bda3bbc3d6 100644
--- a/lib/libc/arch/arm/gen/infinity.c
+++ b/lib/libc/arch/arm/gen/infinity.c
@@ -1,13 +1,12 @@
-/* $OpenBSD: infinity.c,v 1.3 2004/02/02 07:03:21 drahn Exp $ */
+/* $OpenBSD: infinity.c,v 1.4 2014/07/21 01:51:10 guenther Exp $ */
/* $NetBSD: infinity.c,v 1.3 2002/02/19 20:08:19 bjh21 Exp $ */
/*
* IEEE-compatible infinity.c -- public domain.
*/
-#include <sys/types.h>
+#include <endian.h>
#include <math.h>
-#include <machine/endian.h>
char __infinity[] __attribute__((__aligned__(sizeof(double)))) =
#if BYTE_ORDER == BIG_ENDIAN
diff --git a/lib/libc/arch/arm/gen/nan.c b/lib/libc/arch/arm/gen/nan.c
index 6c75f3060c2..66e09dce829 100644
--- a/lib/libc/arch/arm/gen/nan.c
+++ b/lib/libc/arch/arm/gen/nan.c
@@ -1,10 +1,9 @@
-/* $OpenBSD: nan.c,v 1.1 2008/07/24 09:31:06 martynas Exp $ */
+/* $OpenBSD: nan.c,v 1.2 2014/07/21 01:51:10 guenther Exp $ */
/* Written by Martynas Venckus. Public Domain. */
-#include <sys/types.h>
+#include <endian.h>
#include <math.h>
-#include <machine/endian.h>
/* bytes for qNaN on an arm (IEEE single format) */
char __nan[] __attribute__((__aligned__(sizeof(float)))) =
diff --git a/lib/libc/arch/mips64/gen/infinity.c b/lib/libc/arch/mips64/gen/infinity.c
index 239a16d14c0..896ca679066 100644
--- a/lib/libc/arch/mips64/gen/infinity.c
+++ b/lib/libc/arch/mips64/gen/infinity.c
@@ -1,8 +1,8 @@
-/* $OpenBSD: infinity.c,v 1.2 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: infinity.c,v 1.3 2014/07/21 01:51:10 guenther Exp $ */
/* infinity.c */
+#include <endian.h>
#include <math.h>
-#include <sys/types.h>
/* bytes for +Infinity on a MIPS */
#if BYTE_ORDER == BIG_ENDIAN
diff --git a/lib/libc/arch/mips64/gen/nan.c b/lib/libc/arch/mips64/gen/nan.c
index 73ebf3b9a0f..431df4302f7 100644
--- a/lib/libc/arch/mips64/gen/nan.c
+++ b/lib/libc/arch/mips64/gen/nan.c
@@ -1,10 +1,9 @@
-/* $OpenBSD: nan.c,v 1.2 2008/09/07 20:36:07 martynas Exp $ */
+/* $OpenBSD: nan.c,v 1.3 2014/07/21 01:51:10 guenther Exp $ */
/* Written by Martynas Venckus. Public Domain. */
-#include <sys/types.h>
+#include <endian.h>
#include <math.h>
-#include <machine/endian.h>
/* bytes for qNaN on a mips64 (IEEE single format) */
char __nan[] __attribute__((__aligned__(sizeof(float)))) =
diff --git a/lib/libc/arch/sh/gen/infinity.c b/lib/libc/arch/sh/gen/infinity.c
index 18d7a1b1ad1..a4f3e8ae9e4 100644
--- a/lib/libc/arch/sh/gen/infinity.c
+++ b/lib/libc/arch/sh/gen/infinity.c
@@ -1,12 +1,13 @@
-/* $OpenBSD: infinity.c,v 1.3 2006/11/13 07:00:59 otto Exp $ */
+/* $OpenBSD: infinity.c,v 1.4 2014/07/21 01:51:10 guenther Exp $ */
/* infinity.c */
+#include <endian.h>
#include <math.h>
/* bytes for +Infinity on a SH4 FPU (double precision) */
char __infinity[] __attribute__((__aligned__(sizeof(double)))) =
-#if _BYTE_ORDER == _LITTLE_ENDIAN
+#if BYTE_ORDER == LITTLE_ENDIAN
{ 0, 0, 0, 0, 0, 0, (char)0xf0, 0x7f };
#else
{ 0x7f, (char)0xf0, 0, 0, 0, 0, 0, 0 };
diff --git a/lib/libc/arch/sh/gen/nan.c b/lib/libc/arch/sh/gen/nan.c
index c7a2be8ba66..c1a28f75f01 100644
--- a/lib/libc/arch/sh/gen/nan.c
+++ b/lib/libc/arch/sh/gen/nan.c
@@ -1,10 +1,9 @@
-/* $OpenBSD: nan.c,v 1.1 2008/07/24 09:31:06 martynas Exp $ */
+/* $OpenBSD: nan.c,v 1.2 2014/07/21 01:51:10 guenther Exp $ */
/* Written by Martynas Venckus. Public Domain. */
-#include <sys/types.h>
+#include <endian.h>
#include <math.h>
-#include <machine/endian.h>
/* bytes for qNaN on a sh (IEEE single format) */
char __nan[] __attribute__((__aligned__(sizeof(float)))) =
diff --git a/lib/libc/arch/sh/net/htonl.c b/lib/libc/arch/sh/net/htonl.c
index a4c056d616e..a515606f67e 100644
--- a/lib/libc/arch/sh/net/htonl.c
+++ b/lib/libc/arch/sh/net/htonl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: htonl.c,v 1.1 2006/10/10 22:07:10 miod Exp $ */
+/* $OpenBSD: htonl.c,v 1.2 2014/07/21 01:51:10 guenther Exp $ */
/* $NetBSD: htonl.c,v 1.3 2005/12/24 23:10:08 perry Exp $ */
/*-
@@ -36,7 +36,7 @@
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#undef htonl
diff --git a/lib/libc/arch/sh/net/htons.c b/lib/libc/arch/sh/net/htons.c
index ae414edc399..1d7a7de297c 100644
--- a/lib/libc/arch/sh/net/htons.c
+++ b/lib/libc/arch/sh/net/htons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: htons.c,v 1.1 2006/10/10 22:07:10 miod Exp $ */
+/* $OpenBSD: htons.c,v 1.2 2014/07/21 01:51:10 guenther Exp $ */
/* $NetBSD: htons.c,v 1.3 2005/12/24 23:10:08 perry Exp $ */
/*-
@@ -36,7 +36,7 @@
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#undef htons
diff --git a/lib/libc/arch/sh/net/ntohl.c b/lib/libc/arch/sh/net/ntohl.c
index 964938ebf6a..78ca2462f15 100644
--- a/lib/libc/arch/sh/net/ntohl.c
+++ b/lib/libc/arch/sh/net/ntohl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntohl.c,v 1.1 2006/10/10 22:07:10 miod Exp $ */
+/* $OpenBSD: ntohl.c,v 1.2 2014/07/21 01:51:10 guenther Exp $ */
/* $NetBSD: ntohl.c,v 1.3 2005/12/24 23:10:08 perry Exp $ */
/*-
@@ -36,7 +36,7 @@
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#undef ntohl
diff --git a/lib/libc/arch/sh/net/ntohs.c b/lib/libc/arch/sh/net/ntohs.c
index 3945ae77c87..f57c8a90d57 100644
--- a/lib/libc/arch/sh/net/ntohs.c
+++ b/lib/libc/arch/sh/net/ntohs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntohs.c,v 1.1 2006/10/10 22:07:10 miod Exp $ */
+/* $OpenBSD: ntohs.c,v 1.2 2014/07/21 01:51:10 guenther Exp $ */
/* $NetBSD: ntohs.c,v 1.3 2005/12/24 23:10:08 perry Exp $ */
/*-
@@ -36,7 +36,7 @@
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#undef ntohs
diff --git a/lib/libc/gen/ldexp.c b/lib/libc/gen/ldexp.c
index 751d28a4ca7..eb0829e7007 100644
--- a/lib/libc/gen/ldexp.c
+++ b/lib/libc/gen/ldexp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldexp.c,v 1.8 2013/07/03 04:46:36 espie Exp $ */
+/* $OpenBSD: ldexp.c,v 1.9 2014/07/21 01:51:10 guenther Exp $ */
/* @(#)s_scalbn.c 5.1 93/09/24 */
/* @(#)fdlibm.h 5.1 93/09/24 */
/*
@@ -13,7 +13,7 @@
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#include <float.h>
#include <math.h>
diff --git a/lib/libc/hash/rmd160.c b/lib/libc/hash/rmd160.c
index d1047b87ee5..afd119e524e 100644
--- a/lib/libc/hash/rmd160.c
+++ b/lib/libc/hash/rmd160.c
@@ -26,9 +26,9 @@
* RSA Laboratories, CryptoBytes, Volume 3, Number 2, Autumn 1997,
* ftp://ftp.rsasecurity.com/pub/cryptobytes/crypto3n2.pdf
*/
-#include <string.h>
#include <sys/types.h>
-#include <sys/endian.h>
+#include <endian.h>
+#include <string.h>
#include <rmd160.h>
#define PUT_64BIT_LE(cp, value) do { \
diff --git a/lib/libc/net/htonl.c b/lib/libc/net/htonl.c
index 5ab4189597c..6ee6e7efbf3 100644
--- a/lib/libc/net/htonl.c
+++ b/lib/libc/net/htonl.c
@@ -1,11 +1,11 @@
-/* $OpenBSD: htonl.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */
+/* $OpenBSD: htonl.c,v 1.7 2014/07/21 01:51:10 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#undef htonl
diff --git a/lib/libc/net/htons.c b/lib/libc/net/htons.c
index c8b73fdbb77..f48d91ee035 100644
--- a/lib/libc/net/htons.c
+++ b/lib/libc/net/htons.c
@@ -1,11 +1,11 @@
-/* $OpenBSD: htons.c,v 1.8 2005/08/06 20:30:03 espie Exp $ */
+/* $OpenBSD: htons.c,v 1.9 2014/07/21 01:51:10 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#undef htons
diff --git a/lib/libc/net/ntohl.c b/lib/libc/net/ntohl.c
index 36414b7a132..0d05bac78a1 100644
--- a/lib/libc/net/ntohl.c
+++ b/lib/libc/net/ntohl.c
@@ -1,11 +1,11 @@
-/* $OpenBSD: ntohl.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */
+/* $OpenBSD: ntohl.c,v 1.7 2014/07/21 01:51:10 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#undef ntohl
diff --git a/lib/libc/net/ntohs.c b/lib/libc/net/ntohs.c
index 8f345e84ad7..b5ea361f830 100644
--- a/lib/libc/net/ntohs.c
+++ b/lib/libc/net/ntohs.c
@@ -1,11 +1,11 @@
-/* $OpenBSD: ntohs.c,v 1.8 2005/08/06 20:30:03 espie Exp $ */
+/* $OpenBSD: ntohs.c,v 1.9 2014/07/21 01:51:10 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#undef ntohs
diff --git a/lib/libc/rpc/xdr_float.c b/lib/libc/rpc/xdr_float.c
index f0fd5e0eeb9..4ff14885a35 100644
--- a/lib/libc/rpc/xdr_float.c
+++ b/lib/libc/rpc/xdr_float.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xdr_float.c,v 1.20 2011/07/26 11:43:01 martynas Exp $ */
+/* $OpenBSD: xdr_float.c,v 1.21 2014/07/21 01:51:11 guenther Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
@@ -81,7 +81,7 @@ static struct sgl_limits {
};
#else
-#include <machine/endian.h>
+#include <endian.h>
#define IEEEFP
#endif
diff --git a/lib/libm/src/ld128/s_exp2l.c b/lib/libm/src/ld128/s_exp2l.c
index 1bba73bb688..9b68a1a477f 100644
--- a/lib/libm/src/ld128/s_exp2l.c
+++ b/lib/libm/src/ld128/s_exp2l.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_exp2l.c,v 1.1 2008/12/09 20:00:35 martynas Exp $ */
+/* $OpenBSD: s_exp2l.c,v 1.2 2014/07/21 01:51:11 guenther Exp $ */
/*-
* Copyright (c) 2005-2008 David Schultz <das@FreeBSD.ORG>
* All rights reserved.
@@ -26,7 +26,6 @@
*/
#include <sys/types.h>
-#include <sys/endian.h>
#include <machine/ieee.h>
#include <float.h>
#include <math.h>
diff --git a/lib/libm/src/ld80/s_exp2l.c b/lib/libm/src/ld80/s_exp2l.c
index b84dc955f66..edcbc8e1839 100644
--- a/lib/libm/src/ld80/s_exp2l.c
+++ b/lib/libm/src/ld80/s_exp2l.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_exp2l.c,v 1.2 2008/12/22 05:22:27 miod Exp $ */
+/* $OpenBSD: s_exp2l.c,v 1.3 2014/07/21 01:51:11 guenther Exp $ */
/*-
* Copyright (c) 2005-2008 David Schultz <das@FreeBSD.ORG>
* All rights reserved.
@@ -26,7 +26,6 @@
*/
#include <sys/types.h>
-#include <sys/endian.h>
#include <machine/ieee.h>
#include <float.h>
#include <math.h>
diff --git a/lib/libm/src/s_nan.c b/lib/libm/src/s_nan.c
index 0179df446a1..33628c82390 100644
--- a/lib/libm/src/s_nan.c
+++ b/lib/libm/src/s_nan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_nan.c,v 1.12 2013/11/22 18:27:25 deraadt Exp $ */
+/* $OpenBSD: s_nan.c,v 1.13 2014/07/21 01:51:11 guenther Exp $ */
/*-
* Copyright (c) 2007 David Schultz
* All rights reserved.
@@ -28,8 +28,8 @@
*/
#include <sys/types.h>
-#include <sys/endian.h>
#include <ctype.h>
+#include <endian.h>
#include <float.h>
#include <math.h>
#include <stdint.h>
@@ -81,7 +81,7 @@ _scan_nan(uint32_t *words, int num_words, const char *s)
;
/* Scan backwards, filling in the bits in words[] as we go. */
-#if _BYTE_ORDER == _LITTLE_ENDIAN
+#if BYTE_ORDER == LITTLE_ENDIAN
for (bitpos = 0; bitpos < 32 * num_words; bitpos += 4) {
#else
for (bitpos = 32 * num_words - 4; bitpos >= 0; bitpos -= 4) {
@@ -101,7 +101,7 @@ nan(const char *s)
} u;
_scan_nan(u.bits, 2, s);
-#if _BYTE_ORDER == _LITTLE_ENDIAN
+#if BYTE_ORDER == LITTLE_ENDIAN
u.bits[1] |= 0x7ff80000;
#else
u.bits[0] |= 0x7ff80000;
diff --git a/regress/lib/libc/cephes/mconf.h b/regress/lib/libc/cephes/mconf.h
index a92bd3ab643..7527193e2ac 100644
--- a/regress/lib/libc/cephes/mconf.h
+++ b/regress/lib/libc/cephes/mconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mconf.h,v 1.1 2011/07/02 18:11:01 martynas Exp $ */
+/* $OpenBSD: mconf.h,v 1.2 2014/07/21 01:51:11 guenther Exp $ */
/*
* Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
@@ -76,7 +76,7 @@
*/
#include <sys/types.h>
-#include <sys/endian.h>
+#include <endian.h>
/* Constant definitions for math error conditions
*/
diff --git a/sbin/pdisk/convert.c b/sbin/pdisk/convert.c
index 10ad7f98bb7..2b6a26d98d7 100644
--- a/sbin/pdisk/convert.c
+++ b/sbin/pdisk/convert.c
@@ -28,7 +28,7 @@
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#include "convert.h"
diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c
index 46966278fc3..58b4a1dce08 100644
--- a/sbin/restore/dirs.c
+++ b/sbin/restore/dirs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dirs.c,v 1.36 2014/07/20 01:38:40 guenther Exp $ */
+/* $OpenBSD: dirs.c,v 1.37 2014/07/21 01:51:11 guenther Exp $ */
/* $NetBSD: dirs.c,v 1.26 1997/07/01 05:37:49 lukem Exp $ */
/*
@@ -44,6 +44,7 @@
#include <ufs/ufs/dir.h>
#include <protocols/dumprestore.h>
+#include <endian.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
@@ -53,8 +54,6 @@
#include <string.h>
#include <unistd.h>
-#include <machine/endian.h>
-
#include "restore.h"
#include "extern.h"
diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c
index 9d33a400432..92a82197f3c 100644
--- a/sbin/restore/tape.c
+++ b/sbin/restore/tape.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tape.c,v 1.41 2013/04/24 13:46:29 deraadt Exp $ */
+/* $OpenBSD: tape.c,v 1.42 2014/07/21 01:51:11 guenther Exp $ */
/* $NetBSD: tape.c,v 1.26 1997/04/15 07:12:25 lukem Exp $ */
/*
@@ -39,7 +39,6 @@
#include <sys/ioctl.h>
#include <sys/mtio.h>
#include <sys/stat.h>
-#include <sys/endian.h>
#include <ufs/ufs/dinode.h>
#include <protocols/dumprestore.h>
diff --git a/usr.sbin/npppd/l2tp/l2tp_ctrl.c b/usr.sbin/npppd/l2tp/l2tp_ctrl.c
index 012e889a938..802da768c1b 100644
--- a/usr.sbin/npppd/l2tp/l2tp_ctrl.c
+++ b/usr.sbin/npppd/l2tp/l2tp_ctrl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: l2tp_ctrl.c,v 1.17 2014/05/07 01:20:53 tedu Exp $ */
+/* $OpenBSD: l2tp_ctrl.c,v 1.18 2014/07/21 01:51:11 guenther Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -26,15 +26,15 @@
* SUCH DAMAGE.
*/
/**@file Control connection processing functions for L2TP LNS */
-/* $Id: l2tp_ctrl.c,v 1.17 2014/05/07 01:20:53 tedu Exp $ */
+/* $Id: l2tp_ctrl.c,v 1.18 2014/07/21 01:51:11 guenther Exp $ */
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/socket.h>
-#include <sys/endian.h>
#include <netinet/in.h>
#include <net/if.h>
#include <arpa/inet.h>
+#include <endian.h>
#include <errno.h>
#include <event.h>
#include <ifaddrs.h>
diff --git a/usr.sbin/npppd/npppd/mppe.c b/usr.sbin/npppd/npppd/mppe.c
index 1e766d14c96..40eff5ef06a 100644
--- a/usr.sbin/npppd/npppd/mppe.c
+++ b/usr.sbin/npppd/npppd/mppe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mppe.c,v 1.10 2013/02/13 22:10:38 yasuoka Exp $ */
+/* $OpenBSD: mppe.c,v 1.11 2014/07/21 01:51:11 guenther Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $Id: mppe.c,v 1.10 2013/02/13 22:10:38 yasuoka Exp $ */
+/* $Id: mppe.c,v 1.11 2014/07/21 01:51:11 guenther Exp $ */
/**@file
*
* The implementation of MPPE(Microsoft Point-To-Point Encryption Protocol)
@@ -37,11 +37,11 @@
#define WORKAROUND_OUT_OF_SEQUENCE_PPP_FRAMING 1
#include <sys/types.h>
-#include <sys/endian.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <net/if_dl.h>
#include <netinet/in.h>
+#include <endian.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
diff --git a/usr.sbin/npppd/pppoe/pppoe.h b/usr.sbin/npppd/pppoe/pppoe.h
index 6c3c04e1f40..da36e480588 100644
--- a/usr.sbin/npppd/pppoe/pppoe.h
+++ b/usr.sbin/npppd/pppoe/pppoe.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pppoe.h,v 1.5 2012/09/18 13:14:08 yasuoka Exp $ */
+/* $OpenBSD: pppoe.h,v 1.6 2014/07/21 01:51:11 guenther Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -62,7 +62,7 @@
/** PPPoE Protocol Header */
struct pppoe_header {
-#if _BYTE_ORDER == _BIG_ENDIAN
+#if BYTE_ORDER == BIG_ENDIAN
uint8_t ver:4, type:4;
#else
uint8_t type:4, ver:4;
diff --git a/usr.sbin/npppd/pppoe/pppoed.c b/usr.sbin/npppd/pppoe/pppoed.c
index d20e99bdbe1..1666b647420 100644
--- a/usr.sbin/npppd/pppoe/pppoed.c
+++ b/usr.sbin/npppd/pppoe/pppoed.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pppoed.c,v 1.14 2014/03/22 04:18:18 yasuoka Exp $ */
+/* $OpenBSD: pppoed.c,v 1.15 2014/07/21 01:51:11 guenther Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -28,11 +28,10 @@
/**@file
* This file provides the PPPoE(RFC2516) server(access concentrator)
* implementaion.
- * $Id: pppoed.c,v 1.14 2014/03/22 04:18:18 yasuoka Exp $
+ * $Id: pppoed.c,v 1.15 2014/07/21 01:51:11 guenther Exp $
*/
#include <sys/types.h>
#include <sys/param.h>
-#include <sys/endian.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/uio.h>
@@ -47,6 +46,7 @@
#include <net/if_dl.h>
#include <net/ethertypes.h>
#include <net/bpf.h>
+#include <endian.h>
#include <string.h>
#include <syslog.h>
#include <stdio.h>
diff --git a/usr.sbin/snmpd/snmp.h b/usr.sbin/snmpd/snmp.h
index 4d03441f5a0..6ce48e75205 100644
--- a/usr.sbin/snmpd/snmp.h
+++ b/usr.sbin/snmpd/snmp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: snmp.h,v 1.11 2014/04/14 12:55:10 blambert Exp $ */
+/* $OpenBSD: snmp.h,v 1.12 2014/07/21 01:51:11 guenther Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
@@ -20,7 +20,7 @@
#define SNMP_HEADER
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
/*
* SNMP IMSG interface