mirror of
https://github.com/corda/corda.git
synced 2025-03-13 07:54:32 +00:00
55 lines
2.1 KiB
C
55 lines
2.1 KiB
C
|
/* $OpenBSD: endian.h,v 1.18 2006/03/27 07:09:24 otto Exp $ */
|
||
|
|
||
|
/*-
|
||
|
* Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
|
||
|
*
|
||
|
* Redistribution and use in source and binary forms, with or without
|
||
|
* modification, are permitted provided that the following conditions
|
||
|
* are met:
|
||
|
* 1. Redistributions of source code must retain the above copyright
|
||
|
* notice, this list of conditions and the following disclaimer.
|
||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||
|
* notice, this list of conditions and the following disclaimer in the
|
||
|
* documentation and/or other materials provided with the distribution.
|
||
|
*
|
||
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||
|
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
*/
|
||
|
|
||
|
/*
|
||
|
* Generic definitions for little- and big-endian systems. Other endianesses
|
||
|
* has to be dealt with in the specific machine/endian.h file for that port.
|
||
|
*
|
||
|
* This file is meant to be included from a little- or big-endian port's
|
||
|
* machine/endian.h after setting _BYTE_ORDER to either 1234 for little endian
|
||
|
* or 4321 for big..
|
||
|
*/
|
||
|
|
||
|
#ifndef _SYS_ENDIAN_H_
|
||
|
#define _SYS_ENDIAN_H_
|
||
|
|
||
|
#define _LITTLE_ENDIAN 1234
|
||
|
#define _BIG_ENDIAN 4321
|
||
|
#define _PDP_ENDIAN 3412
|
||
|
#define _BYTE_ORDER _LITTLE_ENDIAN
|
||
|
|
||
|
#define LITTLE_ENDIAN _LITTLE_ENDIAN
|
||
|
#define BIG_ENDIAN _BIG_ENDIAN
|
||
|
#define PDP_ENDIAN _PDP_ENDIAN
|
||
|
#define BYTE_ORDER _BYTE_ORDER
|
||
|
|
||
|
#define __BYTE_ORDER _BYTE_ORDER
|
||
|
#define __BIG_ENDIAN _BIG_ENDIAN
|
||
|
#define __LITTLE_ENDIAN _LITTLE_ENDIAN
|
||
|
|
||
|
#endif /* _SYS_ENDIAN_H_ */
|
||
|
|