From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 357246DE0C78 for ; Fri, 6 Jan 2017 13:29:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.188 X-Spam-Level: X-Spam-Status: No, score=-0.188 tagged_above=-999 required=5 tests=[AWL=-0.168, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wDtAYUdT20_2 for ; Fri, 6 Jan 2017 13:29:34 -0800 (PST) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) by arlo.cworth.org (Postfix) with ESMTPS id 4CCE56DE0C71 for ; Fri, 6 Jan 2017 13:29:34 -0800 (PST) Received: by mail-lf0-f52.google.com with SMTP id v186so7216732lfa.1 for ; Fri, 06 Jan 2017 13:29:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dZ6+bA76Sl79U8YalLcSv9L0MT+ptS8fD1c6tLmlhe4=; b=voq5hSfetIfqLXHuYi0+6DgeagChrTPximvJDMbOgNSDJ3seTTS/GUVF5nlAjSLffH HYV7JtvL2fJnmJtSrOzwvpCFmpE1xz8UAJp3vNSrDgVkBwUlnRQ4W8eIo6dzGMRyY3s7 FigMJg6DgFq2v/QcjXIYY5v27t2KZBsiUX+s7qQaqoCYGp3dnI21el9mwTbl8Te6aO2F OeV4p8XHQvFyUdSVk46hTS1z+PX56RLFwvhG/js6rwufcUtrsBIMIwis/2OhLW5wv3i3 xmrqY++8l91kBV/tZFhlS/2hJujpsgiHuuiXzgunRq6CsptYwIYb5V39Juh7OVz4+d2I erMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dZ6+bA76Sl79U8YalLcSv9L0MT+ptS8fD1c6tLmlhe4=; b=fXSsBDMtDsI7oJ//HHjsCIx2i2iiRQjNH3mNtXDVxy3lW+lG9RaI6Ad+sJGPpq5b7k sL8zueyfbucM8CKKQTm5z8DY1yPeed6ZsY/GK54kfmSZtXDYVmMAnWSnHVBwGQesRpmP TYF2A/cO2pq3rJHUxqpygFCdali5Nru7IztOuv7UkBSyoBVHCd8sctCoPI8CixgmkIUd nxTzWOfbWHHu658HRHmMZ9CVsEKl6T5erTpeO5cSvsRxAmMpgWRvKWeXclWBPoVL4f7b sBTcrfAX4gI8YjqCbBuiyNamXTvtoMdCDBhmWyqHuW8aNQ4peocmRAxcSN+1qsGN+eYu 6Stg== X-Gm-Message-State: AIkVDXJP/YHVuHO4zcknThGW4b6nsTU6aZAD7e+GE/cjik4VWn7d5u72iIosZ3RmFkeOzw== X-Received: by 10.46.72.2 with SMTP id v2mr26979055lja.67.1483738172143; Fri, 06 Jan 2017 13:29:32 -0800 (PST) Received: from localhost (mobile-access-bceec7-199.dhcp.inet.fi. [188.238.199.199]) by smtp.gmail.com with ESMTPSA id f42sm19532796lji.2.2017.01.06.13.29.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Jan 2017 13:29:31 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH 2/2] build & util: drop byte order configure check and endian util header Date: Fri, 6 Jan 2017 23:29:28 +0200 Message-Id: <20170106212928.18334-2-jani@nikula.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170106212928.18334-1-jani@nikula.org> References: <20170106212928.18334-1-jani@nikula.org> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 21:29:35 -0000 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. --- configure | 17 +---------------- util/endian-util.h | 38 -------------------------------------- 2 files changed, 1 insertion(+), 54 deletions(-) delete mode 100644 util/endian-util.h diff --git a/configure b/configure index 72db26dfc52e..416d7746a793 100755 --- a/configure +++ b/configure @@ -680,17 +680,6 @@ else EOF fi -printf "Checking byte order... " -cat> _byteorder.c < -#include -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) diff --git a/util/endian-util.h b/util/endian-util.h deleted file mode 100644 index bc80c40be749..000000000000 --- a/util/endian-util.h +++ /dev/null @@ -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 -#include -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 -- 2.11.0