From owner-cvs-all@FreeBSD.ORG Sun Nov 26 05:39:28 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C673B16A403; Sun, 26 Nov 2006 05:39:28 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C51C43D53; Sun, 26 Nov 2006 05:38:36 +0000 (GMT) (envelope-from kientzle@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAQ5dS4I022612; Sun, 26 Nov 2006 05:39:28 GMT (envelope-from kientzle@repoman.freebsd.org) Received: (from kientzle@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAQ5dSVO022611; Sun, 26 Nov 2006 05:39:28 GMT (envelope-from kientzle) Message-Id: <200611260539.kAQ5dSVO022611@repoman.freebsd.org> From: Tim Kientzle Date: Sun, 26 Nov 2006 05:39:28 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libarchive Makefile archive_read_support_format_iso9660.c archive_write_set_format_ustar.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Nov 2006 05:39:28 -0000 kientzle 2006-11-26 05:39:28 UTC FreeBSD src repository Modified files: lib/libarchive Makefile archive_read_support_format_iso9660.c archive_write_set_format_ustar.c Log: Unbreak libarchive on arm. Two parts of libarchive relied on a traditional shortcut of defining on-disk layouts using structures of character arrays. Unfortunately, as recently discussed on cvs-all@, this usage is not actually sanctioned by the standards and specifically fails on GCC/arm (unless your data structures happen to be "naturally aligned"). The new code defines offsets/sizes for data fields and accesses them using explicit pointer arithmetic, instead of casting to a structure and accessing structure fields. In particular, the new code is now clean with WARNS=6 on arm. MFC after: 14 days Revision Changes Path 1.55 +0 -5 src/lib/libarchive/Makefile 1.15 +156 -105 src/lib/libarchive/archive_read_support_format_iso9660.c 1.18 +128 -87 src/lib/libarchive/archive_write_set_format_ustar.c