1fd8e4ebcSMike Barcroft /*- 251369649SPedro F. Giffuni * SPDX-License-Identifier: BSD-3-Clause 351369649SPedro F. Giffuni * 4fa561e1eSDavid E. O'Brien * Copyright (c) 1987, 1991, 1993 5fa561e1eSDavid E. O'Brien * The Regents of the University of California. All rights reserved. 6fa561e1eSDavid E. O'Brien * 7fa561e1eSDavid E. O'Brien * Redistribution and use in source and binary forms, with or without 8fa561e1eSDavid E. O'Brien * modification, are permitted provided that the following conditions 9fa561e1eSDavid E. O'Brien * are met: 10fa561e1eSDavid E. O'Brien * 1. Redistributions of source code must retain the above copyright 11fa561e1eSDavid E. O'Brien * notice, this list of conditions and the following disclaimer. 12fa561e1eSDavid E. O'Brien * 2. Redistributions in binary form must reproduce the above copyright 13fa561e1eSDavid E. O'Brien * notice, this list of conditions and the following disclaimer in the 14fa561e1eSDavid E. O'Brien * documentation and/or other materials provided with the distribution. 15fbbd9655SWarner Losh * 3. Neither the name of the University nor the names of its contributors 16fa561e1eSDavid E. O'Brien * may be used to endorse or promote products derived from this software 17fa561e1eSDavid E. O'Brien * without specific prior written permission. 18fa561e1eSDavid E. O'Brien * 19fa561e1eSDavid E. O'Brien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20fa561e1eSDavid E. O'Brien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21fa561e1eSDavid E. O'Brien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22fa561e1eSDavid E. O'Brien * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23fa561e1eSDavid E. O'Brien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24fa561e1eSDavid E. O'Brien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25fa561e1eSDavid E. O'Brien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26fa561e1eSDavid E. O'Brien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27fa561e1eSDavid E. O'Brien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28fa561e1eSDavid E. O'Brien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29fa561e1eSDavid E. O'Brien * SUCH DAMAGE. 30fa561e1eSDavid E. O'Brien * 31fa561e1eSDavid E. O'Brien * @(#)endian.h 8.1 (Berkeley) 6/10/93 32fa561e1eSDavid E. O'Brien * $FreeBSD$ 33fa561e1eSDavid E. O'Brien */ 34fa561e1eSDavid E. O'Brien 35fd8e4ebcSMike Barcroft #ifndef _MACHINE_ENDIAN_H_ 36fd8e4ebcSMike Barcroft #define _MACHINE_ENDIAN_H_ 37fd8e4ebcSMike Barcroft 38abbd8902SMike Barcroft #include <sys/_types.h> 39fa561e1eSDavid E. O'Brien 40fa561e1eSDavid E. O'Brien /* 41636f2ebfSMarcel Moolenaar * GCC defines _BIG_ENDIAN and _LITTLE_ENDIAN equal to __BIG_ENDIAN__ 42636f2ebfSMarcel Moolenaar * and __LITTLE_ENDIAN__ (resp). 43636f2ebfSMarcel Moolenaar */ 44636f2ebfSMarcel Moolenaar #ifdef _BIG_ENDIAN 45636f2ebfSMarcel Moolenaar #undef _BIG_ENDIAN 46636f2ebfSMarcel Moolenaar #endif 47636f2ebfSMarcel Moolenaar #ifdef _LITTLE_ENDIAN 48636f2ebfSMarcel Moolenaar #undef _LITTLE_ENDIAN 49636f2ebfSMarcel Moolenaar #endif 50636f2ebfSMarcel Moolenaar 51*720dc6bcSMitchell Horne #include <sys/_endian.h> 52fa561e1eSDavid E. O'Brien 53fd8e4ebcSMike Barcroft #endif /* !_MACHINE_ENDIAN_H_ */ 54