From owner-svn-src-stable-10@FreeBSD.ORG Fri Dec 5 18:55:32 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD1C1B29; Fri, 5 Dec 2014 18:55:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE83B783; Fri, 5 Dec 2014 18:55:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB5ItWdE078953; Fri, 5 Dec 2014 18:55:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB5ItWlL078945; Fri, 5 Dec 2014 18:55:32 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201412051855.sB5ItWlL078945@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 5 Dec 2014 18:55:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275516 - in stable/10/cddl/contrib/opensolaris/lib: libctf/common libdtrace/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 18:55:33 -0000 Author: markj Date: Fri Dec 5 18:55:31 2014 New Revision: 275516 URL: https://svnweb.freebsd.org/changeset/base/275516 Log: MFC r271695: Fix some incorrect endianness checks. Modified: stable/10/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Fri Dec 5 18:29:01 2014 (r275515) +++ stable/10/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Fri Dec 5 18:55:31 2014 (r275516) @@ -274,7 +274,7 @@ ctf_fdopen(int fd, int *errp) */ if (nbytes >= (ssize_t) sizeof (Elf32_Ehdr) && bcmp(&hdr.e32.e_ident[EI_MAG0], ELFMAG, SELFMAG) == 0) { -#ifdef _BIG_ENDIAN +#if BYTE_ORDER == _BIG_ENDIAN uchar_t order = ELFDATA2MSB; #else uchar_t order = ELFDATA2LSB; Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c Fri Dec 5 18:29:01 2014 (r275515) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c Fri Dec 5 18:55:31 2014 (r275516) @@ -167,7 +167,7 @@ print_bitfield(dt_printarg_t *pap, ulong * to the lowest 'size' bytes in 'value', and we need to shift based on * the offset from the end of the data, not the offset of the start. */ -#ifdef _BIG_ENDIAN +#if BYTE_ORDER == _BIG_ENDIAN buf += sizeof (value) - size; off += ep->cte_bits; #endif @@ -178,7 +178,7 @@ print_bitfield(dt_printarg_t *pap, ulong * Offsets are counted from opposite ends on little- and * big-endian machines. */ -#ifdef _BIG_ENDIAN +#if BYTE_ORDER == _BIG_ENDIAN shift = NBBY - shift; #endif