From owner-svn-src-all@freebsd.org Fri Aug 5 05:50:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCDCFBAD7F8; Fri, 5 Aug 2016 05:50:28 +0000 (UTC) (envelope-from ed@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 mx1.freebsd.org (Postfix) with ESMTPS id 92BE81720; Fri, 5 Aug 2016 05:50:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u755oR6n004689; Fri, 5 Aug 2016 05:50:27 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u755oRX1004687; Fri, 5 Aug 2016 05:50:27 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201608050550.u755oRX1004687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Fri, 5 Aug 2016 05:50:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303762 - stable/11/lib/libc/gen X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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, 05 Aug 2016 05:50:29 -0000 Author: ed Date: Fri Aug 5 05:50:27 2016 New Revision: 303762 URL: https://svnweb.freebsd.org/changeset/base/303762 Log: MFC r303486: Mention that basename(3) and dirname(3) will change in the future. Update the existing manual pages for basename(3) and dirname(3) to mention that in future versions of FreeBSD, these functions will no longer use internal buffers for storing the results. Approved by: re@ Modified: stable/11/lib/libc/gen/basename.3 stable/11/lib/libc/gen/dirname.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/basename.3 ============================================================================== --- stable/11/lib/libc/gen/basename.3 Fri Aug 5 02:56:31 2016 (r303761) +++ stable/11/lib/libc/gen/basename.3 Fri Aug 5 05:50:27 2016 (r303762) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 31, 2010 +.Dd July 29, 2016 .Dt BASENAME 3 .Os .Sh NAME @@ -61,8 +61,16 @@ function returns a pointer to internal storage space allocated on the first call that will be overwritten by subsequent calls. +.Pp +Other vendor implementations of +.Fn basename +may store their result in the input buffer, +making it safe to use in multithreaded applications. +Future versions of +.Fx +will follow this approach as well. .Fn basename_r -is therefore preferred for threaded applications. +will then become obsolete. .Sh RETURN VALUES On successful completion, .Fn basename Modified: stable/11/lib/libc/gen/dirname.3 ============================================================================== --- stable/11/lib/libc/gen/dirname.3 Fri Aug 5 02:56:31 2016 (r303761) +++ stable/11/lib/libc/gen/dirname.3 Fri Aug 5 05:50:27 2016 (r303762) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2006 +.Dd July 29, 2016 .Dt DIRNAME 3 .Os .Sh NAME @@ -56,10 +56,11 @@ by subsequent calls. .Pp Other vendor implementations of .Fn dirname -may modify the contents of the string passed to -.Fn dirname ; -this should be taken into account when writing code which calls this function -if portability is desired. +may store their result in the input buffer, +making it safe to use in multithreaded applications. +Future versions of +.Fx +will follow this approach as well. .Sh RETURN VALUES On successful completion, .Fn dirname