1 /* See the import.pl script for potential modifications */ 2 /* Copyright (C) 1992, 1996, 1997, 2000 Free Software Foundation, Inc. 3 This file is part of the GNU C Library. 4 5 The GNU C Library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 The GNU C Library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with the GNU C Library; if not, write to the Free 17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 18 02111-1307 USA. */ 19 20 #ifndef _ENDIAN_H 21 #define _ENDIAN_H 1 22 23 #include "features.h" 24 25 /* Definitions for byte order, according to significance of bytes, 26 from low addresses to high addresses. The value is what you get by 27 putting '4' in the most significant byte, '3' in the second most 28 significant byte, '2' in the second least significant byte, and '1' 29 in the least significant byte, and then writing down one digit for 30 each byte, starting with the byte at the lowest address at the left, 31 and proceeding to the byte with the highest address at the right. */ 32 33 #define __LITTLE_ENDIAN 1234 34 #define __BIG_ENDIAN 4321 35 #define __PDP_ENDIAN 3412 36 37 /* This file defines `__BYTE_ORDER' for the particular machine. */ 38 #include "../streflop_libm_bridge.h" 39 40 /* Some machines may need to use a different endianness for floating point 41 values. */ 42 #ifndef __FLOAT_WORD_ORDER 43 # define __FLOAT_WORD_ORDER __BYTE_ORDER 44 #endif 45 46 #ifdef __USE_BSD 47 # define LITTLE_ENDIAN __LITTLE_ENDIAN 48 # define BIG_ENDIAN __BIG_ENDIAN 49 # define PDP_ENDIAN __PDP_ENDIAN 50 # define BYTE_ORDER __BYTE_ORDER 51 #endif 52 53 #if __BYTE_ORDER == __LITTLE_ENDIAN 54 # define __LONG_LONG_PAIR(HI, LO) LO, HI 55 #elif __BYTE_ORDER == __BIG_ENDIAN 56 # define __LONG_LONG_PAIR(HI, LO) HI, LO 57 #endif 58 59 #endif /* endian.h */ 60 //#include <string/endian.h> 61 62 #if 1 63 //#if defined _LIBC && !defined _ISOMAC 64 # if __FLOAT_WORD_ORDER == __BIG_ENDIAN 65 # define BIG_ENDI 1 66 # undef LITTLE_ENDI 67 # define HIGH_HALF 0 68 # define LOW_HALF 1 69 # else 70 # if __FLOAT_WORD_ORDER == __LITTLE_ENDIAN 71 # undef BIG_ENDI 72 # define LITTLE_ENDI 1 73 # define HIGH_HALF 1 74 # define LOW_HALF 0 75 # endif 76 # endif 77 #endif 78