diff options
author | Fabian Groffen | 2011-01-08 19:49:38 +0100 |
---|---|---|
committer | Karel Zak | 2011-01-17 15:34:45 +0100 |
commit | aabe2441765c632bba697945491e3e0ac29ac886 (patch) | |
tree | bf7e34cc148a94f8d4a5d3fc5e090d9710a5043a /sys-utils/lscpu.c | |
parent | wall: add usage function (diff) | |
download | kernel-qcow2-util-linux-aabe2441765c632bba697945491e3e0ac29ac886.tar.gz kernel-qcow2-util-linux-aabe2441765c632bba697945491e3e0ac29ac886.tar.xz kernel-qcow2-util-linux-aabe2441765c632bba697945491e3e0ac29ac886.zip |
build-sys: use WORDS_BIGENDIAN to determine platform byte-order
Autoconf contains the right magic to determine the endianness on many
platforms next to Linux. This reverses previous commits to move away
from WORDS_BIGENDIAN:
"use __BYTE_ORDER rather than AC specific WORDS_BIGENDIAN"
This is necessary to compile on non Linux platforms like Darwin and
Solaris.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'sys-utils/lscpu.c')
-rw-r--r-- | sys-utils/lscpu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index 224d5f99b..16e6b9a1e 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -818,13 +818,11 @@ print_readable(struct lscpu_desc *desc, int hex) *(p - 2) = '\0'; print_s(_("CPU op-mode(s):"), buf); } -#ifdef __BYTE_ORDER -#if (__BYTE_ORDER == __LITTLE_ENDIAN) +#if !defined(WORDS_BIGENDIAN) print_s(_("Byte Order:"), "Little Endian"); #else print_s(_("Byte Order:"), "Big Endian"); #endif -#endif print_n(_("CPU(s):"), desc->ncpus); if (desc->online) |