From owner-svn-src-all@FreeBSD.ORG Fri Jun 11 22:29:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D2FB1065676; Fri, 11 Jun 2010 22:29:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C6AC8FC16; Fri, 11 Jun 2010 22:29:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5BMTnl9009097; Fri, 11 Jun 2010 22:29:49 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5BMTnoQ009095; Fri, 11 Jun 2010 22:29:49 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201006112229.o5BMTnoQ009095@svn.freebsd.org> From: Xin LI Date: Fri, 11 Jun 2010 22:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209078 - head/lib/liblzma X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 22:29:50 -0000 Author: delphij Date: Fri Jun 11 22:29:49 2010 New Revision: 209078 URL: http://svn.freebsd.org/changeset/base/209078 Log: Detect bit endianness through machine/endian.h. This fixes xz on big-endian systems. Tested on: sparc64 (kindly provided by linimon), amd64 Modified: head/lib/liblzma/config.h Modified: head/lib/liblzma/config.h ============================================================================== --- head/lib/liblzma/config.h Fri Jun 11 22:25:50 2010 (r209077) +++ head/lib/liblzma/config.h Fri Jun 11 22:29:49 2010 (r209078) @@ -84,6 +84,12 @@ # define __EXTENSIONS__ 1 #endif #define VERSION "4.999.9beta" +#if defined(__FreeBSD__) +#include +#if _BYTE_ORDER == _BIG_ENDIAN +# define WORDS_BIGENDIAN 1 +#endif +#else #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 @@ -93,3 +99,4 @@ /* # undef WORDS_BIGENDIAN */ # endif #endif +#endif