From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 07:17:32 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 280BE1065672; Fri, 6 Nov 2009 07:17:32 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 173508FC0C; Fri, 6 Nov 2009 07:17:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA67HVga006553; Fri, 6 Nov 2009 07:17:31 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA67HVou006550; Fri, 6 Nov 2009 07:17:31 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200911060717.nA67HVou006550@svn.freebsd.org> From: Ed Schouten Date: Fri, 6 Nov 2009 07:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198973 - in head: lib/libc/sys sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2009 07:17:32 -0000 Author: ed Date: Fri Nov 6 07:17:31 2009 New Revision: 198973 URL: http://svn.freebsd.org/changeset/base/198973 Log: Add MAP_ANONYMOUS. Many operating systems also provide MAP_ANONYMOUS. It's not hard to support this ourselves, we'd better add it to make it more likely for applications to work out of the box. Reviewed by: alc (mman.h) Modified: head/lib/libc/sys/mmap.2 head/sys/sys/mman.h Modified: head/lib/libc/sys/mmap.2 ============================================================================== --- head/lib/libc/sys/mmap.2 Fri Nov 6 07:02:16 2009 (r198972) +++ head/lib/libc/sys/mmap.2 Fri Nov 6 07:17:31 2009 (r198973) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd July 26, 2009 +.Dd November 6, 2009 .Dt MMAP 2 .Os .Sh NAME @@ -108,6 +108,10 @@ The argument is ignored. .\".It Dv MAP_FILE .\"Mapped from a regular file or character-special device memory. +.It Dv MAP_ANONYMOUS +This flag is identical to +.Dv MAP_ANON +and is provided for compatibility. .It Dv MAP_FIXED Do not permit the system to select a different address than the one specified. Modified: head/sys/sys/mman.h ============================================================================== --- head/sys/sys/mman.h Fri Nov 6 07:02:16 2009 (r198972) +++ head/sys/sys/mman.h Fri Nov 6 07:17:31 2009 (r198973) @@ -82,6 +82,9 @@ */ #define MAP_FILE 0x0000 /* map from file (default) */ #define MAP_ANON 0x1000 /* allocated from memory, swap space */ +#ifndef _KERNEL +#define MAP_ANONYMOUS MAP_ANON /* For compatibility. */ +#endif /* !_KERNEL */ /* * Extended flags