endian.h (a5f50ef9e43b28e15a7e2a2aec73754456619f17) endian.h (636f2ebf670b685ad40327f75ceb90b60594d738)
1/*-
2 * Copyright (c) 1987, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 30 unchanged lines hidden (view full) ---

39
40/*
41 * Define the order of 32-bit words in 64-bit words.
42 */
43#define _QUAD_HIGHWORD 0
44#define _QUAD_LOWWORD 1
45
46/*
1/*-
2 * Copyright (c) 1987, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 30 unchanged lines hidden (view full) ---

39
40/*
41 * Define the order of 32-bit words in 64-bit words.
42 */
43#define _QUAD_HIGHWORD 0
44#define _QUAD_LOWWORD 1
45
46/*
47 * GCC defines _BIG_ENDIAN and _LITTLE_ENDIAN equal to __BIG_ENDIAN__
48 * and __LITTLE_ENDIAN__ (resp).
49 */
50#ifdef _BIG_ENDIAN
51#undef _BIG_ENDIAN
52#endif
53#ifdef _LITTLE_ENDIAN
54#undef _LITTLE_ENDIAN
55#endif
56
57/*
47 * Definitions for byte order, according to byte significance from low
48 * address to high.
49 */
58 * Definitions for byte order, according to byte significance from low
59 * address to high.
60 */
50#undef _BIG_ENDIAN /* GCC annoyingly defines this for PowerPC */
51#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
52#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
53#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */
54
61#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
62#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
63#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */
64
65#ifdef __LITTLE_ENDIAN__
66#define _BYTE_ORDER _LITTLE_ENDIAN
67#else
55#define _BYTE_ORDER _BIG_ENDIAN
68#define _BYTE_ORDER _BIG_ENDIAN
69#endif
56
57/*
58 * Deprecated variants that don't have enough underscores to be useful in more
59 * strict namespaces.
60 */
61#if __BSD_VISIBLE
62#define LITTLE_ENDIAN _LITTLE_ENDIAN
63#define BIG_ENDIAN _BIG_ENDIAN

--- 48 unchanged lines hidden ---
70
71/*
72 * Deprecated variants that don't have enough underscores to be useful in more
73 * strict namespaces.
74 */
75#if __BSD_VISIBLE
76#define LITTLE_ENDIAN _LITTLE_ENDIAN
77#define BIG_ENDIAN _BIG_ENDIAN

--- 48 unchanged lines hidden ---