diff options
author | 2011-10-09 19:05:20 +0100 | |
---|---|---|
committer | 2011-10-14 23:04:29 +0100 | |
commit | 69295f04a92ba99d4c2b210c77e80ab48e4be621 (patch) | |
tree | 678280f0f15eb3cd856133da19c05a1e28fe4f56 | |
parent | b2fe0588bb37e5777575296a209b1a210968392e (diff) | |
download | paludis-69295f04a92ba99d4c2b210c77e80ab48e4be621.tar.gz paludis-69295f04a92ba99d4c2b210c77e80ab48e4be621.tar.xz |
Define a PALUDIS_ constant for big-endianness
This allows it to be referenced from headers, as we don't install config.h
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | paludis/util/elf.cc | 2 | ||||
-rw-r--r-- | paludis/util/sha1.cc | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index f6edefbb0..3eaaa89f7 100644 --- a/configure.ac +++ b/configure.ac @@ -86,6 +86,10 @@ dnl }}} dnl {{{ check for byte order AC_C_BIGENDIAN +if test "x$ac_cv_c_bigendian" = "xyes"; then + PALUDIS_CXXFLAGS="${PALUDIS_CXXFLAGS} -DPALUDIS_BIG_ENDIAN=1" + PALUDIS_PC_CFLAGS="${PALUDIS_PC_CFLAGS} -DPALUDIS_BIG_ENDIAN=1" +fi dnl }}} need_xml_check= diff --git a/paludis/util/elf.cc b/paludis/util/elf.cc index 9936e257b..760fe4f39 100644 --- a/paludis/util/elf.cc +++ b/paludis/util/elf.cc @@ -59,7 +59,7 @@ namespace paludis enum { native_byte_order = -#if WORDS_BIGENDIAN +#ifdef PALUDIS_BIG_ENDIAN ELFDATA2MSB #else ELFDATA2LSB diff --git a/paludis/util/sha1.cc b/paludis/util/sha1.cc index 70920174f..135f111e4 100644 --- a/paludis/util/sha1.cc +++ b/paludis/util/sha1.cc @@ -35,7 +35,7 @@ using namespace paludis; namespace { -#if WORDS_BIGENDIAN +#ifdef PALUDIS_BIG_ENDIAN inline uint32_t from_bigendian(uint32_t x) { return x; |