From owner-freebsd-hackers Mon Jan 30 06:35:21 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id GAA02469 for hackers-outgoing; Mon, 30 Jan 1995 06:35:21 -0800 Received: from irbs.com ([199.182.75.129]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id GAA02461 for ; Mon, 30 Jan 1995 06:35:19 -0800 Received: (from jc@localhost) by irbs.com (8.6.9/8.6.6) id JAA26994; Mon, 30 Jan 1995 09:34:59 -0500 From: John Capo Message-Id: <199501301434.JAA26994@irbs.com> Subject: Re: disable structure packing with gcc? To: mtaylor@gateway.cybernet.com (Mark J. Taylor) Date: Mon, 30 Jan 1995 09:34:59 -0500 (EST) Cc: freebsd-hackers@freefall.cdrom.com (freebsd-hackers) In-Reply-To: from "Mark J. Taylor" at Jan 29, 95 11:24:41 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 465 Sender: hackers-owner@FreeBSD.org Precedence: bulk Mark J. Taylor writes: > > > I'm writing a byte-swapping routine for structures in gcc 2.4.5 (FreeBSD > 1.1.5.1). gcc insists on packing structures, and I do not fully understand > the packing method it uses. > > How can I turn off structure packing (to get to single byte alignment)? > gcc 2.X supports #pragma pack() directives if it is compiled with -DHANDLE_SYSV_PRAGMA. I have several cross-compilers with this option enabled and they DTRT. John Capo