File indexing completed on 2025-01-18 10:14:31
0001 #ifndef _XARCH_H_
0002 # define _XARCH_H_
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 # ifdef X_BYTE_ORDER
0036
0037 # define X_BIG_ENDIAN 4321
0038 # define X_LITTLE_ENDIAN 1234
0039
0040 # else
0041
0042 # if defined(SVR4) || defined(__SVR4)
0043 # include <sys/types.h>
0044 # include <sys/byteorder.h>
0045 # elif defined(CSRG_BASED)
0046 # if defined(__NetBSD__) || defined(__OpenBSD__)
0047 # include <sys/types.h>
0048 # endif
0049 # include <machine/endian.h>
0050 # elif defined(linux)
0051 # if defined __STRICT_ANSI__
0052 # undef __STRICT_ANSI__
0053 # include <endian.h>
0054 # define __STRICT_ANSI__
0055 # else
0056 # include <endian.h>
0057 # endif
0058
0059 # if !defined(LITTLE_ENDIAN) && defined(__LITTLE_ENDIAN)
0060 # define LITTLE_ENDIAN __LITTLE_ENDIAN
0061 # endif
0062 # if !defined(BIG_ENDIAN) && defined(__BIG_ENDIAN)
0063 # define BIG_ENDIAN __BIG_ENDIAN
0064 # endif
0065 # if !defined(PDP_ENDIAN) && defined(__PDP_ENDIAN)
0066 # define PDP_ENDIAN __PDP_ENDIAN
0067 # endif
0068 # if !defined(BYTE_ORDER) && defined(__BYTE_ORDER)
0069 # define BYTE_ORDER __BYTE_ORDER
0070 # endif
0071 # endif
0072
0073 # ifndef BYTE_ORDER
0074 # define LITTLE_ENDIAN 1234
0075 # define BIG_ENDIAN 4321
0076
0077 # if defined(__sun) && defined(__SVR4)
0078 # include <sys/isa_defs.h>
0079 # ifdef _LITTLE_ENDIAN
0080 # define BYTE_ORDER LITTLE_ENDIAN
0081 # endif
0082 # ifdef _BIG_ENDIAN
0083 # define BYTE_ORDER BIG_ENDIAN
0084 # endif
0085 # endif
0086 # endif
0087
0088 # define X_BYTE_ORDER BYTE_ORDER
0089 # define X_BIG_ENDIAN BIG_ENDIAN
0090 # define X_LITTLE_ENDIAN LITTLE_ENDIAN
0091
0092 # endif
0093
0094 #endif