From owner-svn-src-head@freebsd.org Sat Sep 28 17:15:49 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F0BE12BB3A; Sat, 28 Sep 2019 17:15:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46gb0P3l3lz4PvV; Sat, 28 Sep 2019 17:15:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 452014B98; Sat, 28 Sep 2019 17:15:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8SHFnjA034895; Sat, 28 Sep 2019 17:15:49 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8SHFmZR034892; Sat, 28 Sep 2019 17:15:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909281715.x8SHFmZR034892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 28 Sep 2019 17:15:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352846 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 352846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2019 17:15:49 -0000 Author: imp Date: Sat Sep 28 17:15:48 2019 New Revision: 352846 URL: https://svnweb.freebsd.org/changeset/base/352846 Log: Revert the mode_t -> int changes and add a warning in the BUGS section instead. While FreeBSD's implementation of these expect an int inside of libc, that's an implementation detail that we can hide from the user as it's the natural promotion of the current mode_t type and before it is used in the kernel, it's converted back to the narrower type that's the current definition of mode_t. As such, documenting int is at best confusing and at worst misleading. Instead add a note that these args are variadic and as such calling conventions may differ from non-variadic arguments. Modified: head/lib/libc/sys/mq_open.2 head/lib/libc/sys/open.2 Modified: head/lib/libc/sys/mq_open.2 ============================================================================== --- head/lib/libc/sys/mq_open.2 Sat Sep 28 14:20:28 2019 (r352845) +++ head/lib/libc/sys/mq_open.2 Sat Sep 28 17:15:48 2019 (r352846) @@ -37,7 +37,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 15, 2014 +.Dd September 28, 2019 .Dt MQ_OPEN 2 .Os .Sh NAME @@ -133,7 +133,7 @@ Create a message queue. It requires two additional arguments: .Fa mode , which is of type -.Vt int , +.Vt mode_t , and .Fa attr , which is a pointer to an @@ -317,6 +317,13 @@ This implementation places strict requirements on the it must begin with a slash .Pq Ql / and contain no other slash characters. +.Pp +The +.Fa mode +and +.Fa attr +arguments are variadic and may result in different calling conventions +than might otherwise be expected. .Sh COPYRIGHT Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Sat Sep 28 14:20:28 2019 (r352845) +++ head/lib/libc/sys/open.2 Sat Sep 28 17:15:48 2019 (r352846) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd September 17, 2019 +.Dd September 28, 2019 .Dt OPEN 2 .Os .Sh NAME @@ -61,7 +61,7 @@ In this case and .Fn openat require an additional argument -.Fa "int mode" , +.Fa "mode_t mode" , and the file is created with mode .Fa mode as described in @@ -615,3 +615,8 @@ permits searches. The present implementation of the .Fa openat checks the current permissions of directory instead. +.Pp +The +.Fa mode +argument is variadic and may result in different calling conventions +than might otherwise be expected.