From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Christoph Egger" Subject: Re: [PATCH] libxc portability fixes Date: Wed, 19 Sep 2007 17:04:35 +0200 Message-ID: <200709191704.35189.Christoph.Egger@amd.com> References: <200709191519.37628.Christoph.Egger@amd.com> <200709191632.59288.Christoph.Egger@amd.com> <20070919144949.GA7154@snarc.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20070919144949.GA7154@snarc.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Vincent Hanquez Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Wednesday 19 September 2007 16:49:49 Vincent Hanquez wrote: > On Wed, Sep 19, 2007 at 04:32:59PM +0200, Christoph Egger wrote: > > MAP_ANONYMOUS is the proprietary thing. > > which "proprietary thing" ? > > > The glibc people > > should know that and should deprecate MAP_ANONYMOUS instead. > > solaris has deprecated MAP_ANON as well. Oh, SystemV Unix has MAP_ANONYMOUS? BSD-Unix only has MAP_ANON. > > They should also document that the fd argument must be > > -1 when MAP_ANON is specified to match the Unix behaviour. > > ---------- > MAP_ANONYMOUS > > The mapping is not backed by any file; its contents are initial=E2=80=90 > ized to zero. The fd and offset arguments are ignored; however, > some implementations require fd to be -1 if MAP_ANONYMOUS (or > MAP_ANON) is specified, and portable applications should ensure > this. The use of MAP_ANONYMOUS in conjunction with MAP_SHARED > is only supported on Linux since kernel 2.4. > ---------- > > what are you missing from this ? My linux mmap manpage says: =2D-------------------------- MAP_ANONYMOUS The mapping is not backed by any file; the fd and offset ar= gu- ments are ignored. The use of this flag in conjunction w= ith MAP_SHARED is only supported on Linux since kernel 2.4. MAP_ANON Alias for MAP_ANONYMOUS. Deprecated. =2D-------------------------- My bsd mmap manpage says: =2D------------------------------ MAP_ANON Map anonymous memory not associated with any speci= fic file. The file descriptor is not used for creating MAP_ANON regions, and must be specified as -1. The mapped memory will be zero filled. =2D------------------------------ Christoph =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=C3=A4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=C3=A4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=C3=A4ftsf=C3=BChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy