From owner-freebsd-bugs Wed Mar 20 06:29:07 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA04931 for bugs-outgoing; Wed, 20 Mar 1996 06:29:07 -0800 (PST) Received: from nixpbe.pdb.sni.de (mail.sni.de [192.109.2.33]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id GAA04920 for ; Wed, 20 Mar 1996 06:28:31 -0800 (PST) Received: (from nerv@localhost) by nixpbe.pdb.sni.de (8.6.12/8.6.12) id PAA02329 for bugs@freebsd.org; Wed, 20 Mar 1996 15:27:40 +0100 Message-Id: <199603201427.PAA02329@nixpbe.pdb.sni.de> Subject: Re: struct flock problem To: lav@video.yars.free.net (Alexander V. Lukyanov) Date: Wed, 20 Mar 96 14:41:48 MET From: Greg Lehey Cc: bugs@freebsd.org, ports@freebsd.org In-Reply-To: <199603191855.VAA06426@video.yars.free.net>; from "Alexander V. Lukyanov" at Mar 19, 96 9:55 pm X-Mailer: xmail 2.4 (based on ELM 2.2 PL16) Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > 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