mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
build & util: drop byte order configure check and endian util header
With the removal of the embedded libsha1, we lost the first and last user of the platform byte order checks. Remove them from configure, and remove the endian util header.
This commit is contained in:
parent
c906da9f60
commit
5a957c3f33
2 changed files with 1 additions and 54 deletions
17
configure
vendored
17
configure
vendored
|
@ -680,17 +680,6 @@ else
|
|||
EOF
|
||||
fi
|
||||
|
||||
printf "Checking byte order... "
|
||||
cat> _byteorder.c <<EOF
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
uint32_t test = 0x34333231;
|
||||
int main() { printf("%.4s\n", (const char*)&test); return 0; }
|
||||
EOF
|
||||
${CC} ${CFLAGS} _byteorder.c -o _byteorder > /dev/null 2>&1
|
||||
util_byte_order=$(./_byteorder)
|
||||
echo $util_byte_order
|
||||
|
||||
rm -f _byteorder _byteorder.c
|
||||
|
||||
if [ $errors -gt 0 ]; then
|
||||
|
@ -1012,9 +1001,6 @@ prefix = ${PREFIX}
|
|||
# LIBDIR_IN_LDCONFIG value below is still set correctly.
|
||||
libdir = ${LIBDIR:=\$(prefix)/lib}
|
||||
|
||||
# byte order within a 32 bit word. 1234 = little, 4321 = big, 0 = guess
|
||||
UTIL_BYTE_ORDER = ${util_byte_order}
|
||||
|
||||
# Whether libdir is in a path configured into ldconfig
|
||||
LIBDIR_IN_LDCONFIG = ${libdir_in_ldconfig}
|
||||
|
||||
|
@ -1167,8 +1153,7 @@ COMMON_CONFIGURE_CFLAGS = \\
|
|||
-DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT) \\
|
||||
-DSILENCE_XAPIAN_DEPRECATION_WARNINGS \\
|
||||
-DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\
|
||||
-DHAVE_XAPIAN_DB_RETRY_LOCK=\$(HAVE_XAPIAN_DB_RETRY_LOCK) \\
|
||||
-DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER)
|
||||
-DHAVE_XAPIAN_DB_RETRY_LOCK=\$(HAVE_XAPIAN_DB_RETRY_LOCK)
|
||||
|
||||
CONFIGURE_CFLAGS = \$(COMMON_CONFIGURE_CFLAGS)
|
||||
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
/* this file mimics the macros present in recent GCC and CLANG */
|
||||
|
||||
#ifndef _ENDIAN_UTIL_H
|
||||
#define _ENDIAN_UTIL_H
|
||||
|
||||
/* This are prefixed with UTIL to avoid collisions
|
||||
*
|
||||
* You can use something like the following to define UTIL_BYTE_ORDER
|
||||
* in a configure script.
|
||||
*/
|
||||
#if 0
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
uint32_t test = 0x34333231;
|
||||
int main() { printf("%.4s\n", (const char*)&test); return 0; }
|
||||
#endif
|
||||
|
||||
#define UTIL_ORDER_BIG_ENDIAN 4321
|
||||
#define UTIL_ORDER_LITTLE_ENDIAN 1234
|
||||
|
||||
|
||||
#if !defined(UTIL_BYTE_ORDER) || ((UTIL_BYTE_ORDER != UTIL_ORDER_BIG_ENDIAN) && \
|
||||
(UTIL_BYTE_ORDER != UTIL_ORDER_LITTLE_ENDIAN))
|
||||
#undef UTIL_BYTE_ORDER
|
||||
#ifdef __BYTE_ORDER__
|
||||
# if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
# define UTIL_BYTE_ORDER UTIL_ORDER_LITTLE_ENDIAN
|
||||
# elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||
# define UTIL_BYTE_ORDER UTIL_ORDER_BIG_ENDIAN
|
||||
# else
|
||||
# error "Unsupported __BYTE_ORDER__"
|
||||
# endif
|
||||
#else
|
||||
# error "UTIL_BYTE_ORDER not correctly defined and __BYTE_ORDER__ not defined."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue