]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Attempt to improve application portability by marking `struct ar_hdr'
authorjkoshy <jkoshy@FreeBSD.org>
Mon, 13 Nov 2006 04:28:29 +0000 (04:28 +0000)
committerjkoshy <jkoshy@FreeBSD.org>
Mon, 13 Nov 2006 04:28:29 +0000 (04:28 +0000)
commit2ad65fcc6a10dc246018bd341e52bb9739413ee0
treec6d1a369a4c09f4db4e1f967829ce9508a5a2273
parentea23609d3a15e57f702160c2e8df82292adf907d
Attempt to improve application portability by marking `struct ar_hdr'
as `packed'.

The C standard leaves the alignment of individual members of a C
struct upto the implementation, so pedantically speaking portable
code cannot assume that the layout of a `struct ar_hdr' in memory
will match its layout in a file.  Using a __packed attribute
declaration forces file and memory layouts for this structure to
match.

Submitted by: ru
include/ar.h