From nobody Fri May 22 18:32:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMYls5SByz6fQ51 for ; Fri, 22 May 2026 18:32:09 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMYls3C5Bz3HBJ for ; Fri, 22 May 2026 18:32:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779474729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MQAgF2OcTsEikOFhIURCEOh0+GWrABDhhrlm3fkvWg0=; b=DuJPeV7HpsB+2PNQyWRZ4+vtC98wJvB76VWyMDN2DxMc5Buf5TABqs0jiVRmx5FKZ9r+WQ 28B1K3Mw3h6/6jiu24RFjCKKXqIqd2v5k4yfu4glk4hpICxsbQZw+CCvAK5sg9gYLAF4T9 3L3lvzgW6ACHhkOANM85j6XwmCi/mNHiA7GAUCWYD/k/4RyxhtJ6mGYrokAv2fS6N+yibo nkB+uIuz4owvUTMDWytEqIRat4BTL95VngRA+xEgbv12LOSWyiJV4p5NUpwdDOVlLMdD+Z KYKd0NXT4GDq7XugwxFB1dGCKZ/mN2YNxRlvdDPRN+1oZndV47iIcZhdgRIU9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779474729; a=rsa-sha256; cv=none; b=x5LUIJXuppB+qjjz/oayGz9vpy9+ApqGHePj9q56a5rI49n2objaDGooUw6F+A5hzYgA6Z gZ/M4usV+xycIHD5wGelqx1/6HnjV+197r4GssQlVyAgcl8G6IDkfA9F0/rFtZlvhB0Acm R3AM5MWWJjI+kqjJoS30Pzb5TwyN7wCYgZNT834uP4UiNWGX+5/rm3ex4mPgjgiPOD2lVB o01OnFsGAnb79UTl3SgkAs174Cl9lSgRv71Tx+eKohHTvpSB24wKbZ0g1MQfblk5y0x745 IVAGQTFSVu5w7GJBPC3xUAP7CXuupm11PCWsiNRXdig4LoSzpbU0XrQgysh/LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779474729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MQAgF2OcTsEikOFhIURCEOh0+GWrABDhhrlm3fkvWg0=; b=rSm1A4l5GmslVTXaI6uq1r+RKf4Piaxh+0iPcq2bqtEf1cuuP+AgBLVKSzti5cJAIgxyif zj3jXSUv9WsXIrqbs2rDrssdMVY7jTdqGVO0/GuAoCHHUHNDG2X2umnP97Mnxqglh14sfZ vraT+Nm4ff14qEoqlyt1x57JG6+bUUfO1MGa7lbXiFEQYGlizFBikdWlSDqJr5gL5O6ORX 6AM+tQdK1tijcF8oKJFWzAxERjOpHf3oRuJis1U4hvSluRKFPuyKtYFzG2LQj+x90J3GGA ksT3/tGwhJQkStk4lQndodmnX0P0eP9RGWjRH/nTcifqLeCfnQP7/jWnYdRekg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMYls2TzPzZGj for ; Fri, 22 May 2026 18:32:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c43d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 18:32:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 4e2bf6e90a65 - main - mdoc.7: Revert upstream changes to Lb/LIBRARY List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e2bf6e90a65bee317e4dd379e098ba2eb5d8c0d Auto-Submitted: auto-generated Date: Fri, 22 May 2026 18:32:09 +0000 Message-Id: <6a10a129.3c43d.3ecb4774@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=4e2bf6e90a65bee317e4dd379e098ba2eb5d8c0d commit 4e2bf6e90a65bee317e4dd379e098ba2eb5d8c0d Author: Alexander Ziaee AuthorDate: 2026-05-22 18:09:23 +0000 Commit: Alexander Ziaee CommitDate: 2026-05-22 18:31:54 +0000 mdoc.7: Revert upstream changes to Lb/LIBRARY Since this manual describes the mdoc syntax throughout the ecosystem, I had to blend what we had before with what upstream is doing now. Thanks: adrian MFC after: 3 days (we shipped this doc in 15.0/14.4) Reviewed by: ivy, mhorne, des, adrian Discussed with: arch@ Differential Revision: https://reviews.freebsd.org/D56153 --- contrib/mandoc/mdoc.7 | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/contrib/mandoc/mdoc.7 b/contrib/mandoc/mdoc.7 index 90f5600c59a7..7346cf25da65 100644 --- a/contrib/mandoc/mdoc.7 +++ b/contrib/mandoc/mdoc.7 @@ -196,8 +196,14 @@ and .Ic \&Nd . .It Em LIBRARY The name of the library containing the documented functions. -Using this section is no longer recommended. -If any +The syntax for this is as follows: +.Bd -literal -offset indent +\&.Lb libm +.Ed +.Pp +Using this section is no longer recommended outside +.Fx . +If writing for other operating systems, and any .Ic \&Lb macro is needed, put it at the beginning of the .Em SYNOPSIS @@ -223,7 +229,7 @@ Commands should be ordered alphabetically. .Pp For the second, function calls (sections 2, 3, 9): .Bd -literal -offset indent -\&.Lb libname \e" unless the functions are in libc +\&.Lb libname \e" unless on FreeBSD or the functions are in libc \&.In header.h \&.Vt extern const char *global; \&.Ft char * @@ -1880,7 +1886,30 @@ See also .Tg Lb .It Ic \&Lb Cm lib Ns Ar name Op Cm lib Ns Ar name ... Specify one or more libraries to link against. -Putting this macro at the beginning of the +.Pp +If used in the +.Em LIBRARY +section, the +.Ar name +parameter may be a system library, such as +.Cm z +or +.Cm pam , +in which case a small library description is printed next to the linker +invocation; or a custom library, in which case the library name is +printed in quotes. +This is most commonly used in the +.Em LIBRARY +or +.Em SYNOPSIS +sections, as described in +.Sx MANUAL STRUCTURE. +.Pp +Examples: +.Dl \&.Lb libz +.Dl \&.Lb libmandoc +.Pp +In other operating systems, putting this macro at the beginning of the .Em SYNOPSIS section is recommended, in which case it prints this comment: .D1 /* Fl l Ns Ar name Oo Fl l Ns Ar name ... Oc */