Subject: Re: CVS commit: basesrc/usr.bin/file
To: Jun-ichiro itojun Hagino <itojun@netbsd.org>
From: Frank van der Linden <fvdl@wasabisystems.com>
List: tech-userlevel
Date: 06/05/2002 14:55:51
On Wed, Jun 05, 2002 at 03:52:59PM +0300, Jun-ichiro itojun Hagino wrote:
> Modified Files:
> 	basesrc/usr.bin/file: apprentice.c file.h readelf.c softmagic.c
> 
> Log Message:
> use types defined in inttypes.h.
> have attribute(packed) to struct magic to make it packed in the same way
> across different archs.

This works fine with gcc, but the problem is that this code is
compiled with HOST_CC (to cross-build the magic file using
mkmagic). HOST_CC may not be gcc, and thus not know the packed
attribute.

So, it most be solved in another way, probably by padding
struct file in such a way that it's the same on all archs.

- Frank

-- 
Frank van der Linden                           fvdl@wasabisystems.com
======================================================================
Quality NetBSD CDs, Support & Service.   http://www.wasabisystems.com/