Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Mar 96 14:41:48 MET
From:      Greg Lehey <lehey.pad@sni.de>
To:        lav@video.yars.free.net (Alexander V. Lukyanov)
Cc:        bugs@freebsd.org, ports@freebsd.org
Subject:   Re: struct flock problem
Message-ID:  <199603201427.PAA02329@nixpbe.pdb.sni.de>
In-Reply-To: <199603191855.VAA06426@video.yars.free.net>; from "Alexander V. Lukyanov" at Mar 19, 96 9:55 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> It seems that FreeBSD have struct flock (fcntl.h) with members in order,
> different from the same structure in SVR4, linux and probably posix.
> (I don't have the standard handy, sorry)

Yes, this is partially correct.  I'm pretty sure that POSIX.1 doesn't
define order in any structures.  More importantly, it's different from
Net/2 based systems as well: although binaries from FreeBSD 1.x or
BSD/386 1.x will generally run on FreeBSD 2.x, they won't if they use
fcntl locking.  The background is that off_t is now 64 bits long, so
it wouldn't work in the same sequence anyway, and this way round you
waste less space in the struct.

> This may cause troubles in porting a program initializing such a structure.

Another good reason not to use aggregate initializers.

Greg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603201427.PAA02329>