source: branches/libc-0.6/src/emx/include/endian.h

Last change on this file was 2150, checked in by bird, 20 years ago

o Shopped missing math stuff from GLIBC.

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/* Copyright (C) 1992, 1996, 1997, 2000 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 02111-1307 USA. */
18
19/**
20 * GLIBC 2.3.3
21 */
22
23#ifndef _ENDIAN_H
24#define _ENDIAN_H 1
25
26#include <features.h>
27
28/* Definitions for byte order, according to significance of bytes,
29 from low addresses to high addresses. The value is what you get by
30 putting '4' in the most significant byte, '3' in the second most
31 significant byte, '2' in the second least significant byte, and '1'
32 in the least significant byte, and then writing down one digit for
33 each byte, starting with the byte at the lowest address at the left,
34 and proceeding to the byte with the highest address at the right. */
35
36#if 0 /* bird */
37#define __LITTLE_ENDIAN 1234
38#define __BIG_ENDIAN 4321
39#define __PDP_ENDIAN 3412
40
41/* This file defines `__BYTE_ORDER' for the particular machine. */
42#include <bits/endian.h>
43
44#else /* bird */
45
46#include <sys/endian.h>
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 /* bird */
52
53/* Some machines may need to use a different endianness for floating point
54 values. */
55#ifndef __FLOAT_WORD_ORDER
56# define __FLOAT_WORD_ORDER __BYTE_ORDER
57#endif
58
59#if 0 /* bird */
60#ifdef __USE_BSD
61# define LITTLE_ENDIAN __LITTLE_ENDIAN
62# define BIG_ENDIAN __BIG_ENDIAN
63# define PDP_ENDIAN __PDP_ENDIAN
64# define BYTE_ORDER __BYTE_ORDER
65#endif
66#endif /* bird */
67
68#if __BYTE_ORDER == __LITTLE_ENDIAN
69# define __LONG_LONG_PAIR(HI, LO) LO, HI
70#elif __BYTE_ORDER == __BIG_ENDIAN
71# define __LONG_LONG_PAIR(HI, LO) HI, LO
72#endif
73
74#endif /* endian.h */
Note: See TracBrowser for help on using the repository browser.