-/* $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
-/* $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)))) =
-/* $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
-/* $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)))) =
-/* $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 };
-/* $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)))) =
-/* $OpenBSD: htonl.c,v 1.1.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 $ */
/*-
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#undef htonl
-/* $OpenBSD: htons.c,v 1.1.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 $ */
/*-
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#undef htons
-/* $OpenBSD: ntohl.c,v 1.1.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 $ */
/*-
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#undef ntohl
-/* $OpenBSD: ntohs.c,v 1.1.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 $ */
/*-
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#undef ntohs
-/* $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 */
/*
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#include <float.h>
#include <math.h>
* 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 { \
-/* $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
-/* $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
-/* $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
-/* $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
-/* $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.
};
#else
-#include <machine/endian.h>
+#include <endian.h>
#define IEEEFP
#endif
-/* $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.
*/
#include <sys/types.h>
-#include <sys/endian.h>
#include <machine/ieee.h>
#include <float.h>
#include <math.h>
-/* $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.
*/
#include <sys/types.h>
-#include <sys/endian.h>
#include <machine/ieee.h>
#include <float.h>
#include <math.h>
-/* $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.
*/
#include <sys/types.h>
-#include <sys/endian.h>
#include <ctype.h>
+#include <endian.h>
#include <float.h>
#include <math.h>
#include <stdint.h>
;
/* 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) {
} 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;
-/* $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>
*/
#include <sys/types.h>
-#include <sys/endian.h>
+#include <endian.h>
/* Constant definitions for math error conditions
*/
*/
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
#include "convert.h"
-/* $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 $ */
/*
#include <ufs/ufs/dir.h>
#include <protocols/dumprestore.h>
+#include <endian.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
-#include <machine/endian.h>
-
#include "restore.h"
#include "extern.h"
-/* $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 $ */
/*
#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>
-/* $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.
* 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>
-/* $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.
* 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)
#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>
-/* $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.
/** 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;
-/* $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.
/**@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>
#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>
-/* $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>
#define SNMP_HEADER
#include <sys/types.h>
-#include <machine/endian.h>
+#include <endian.h>
/*
* SNMP IMSG interface