From nobody Sun Jun 28 00:44:13 2026 X-Original-To: dev-commits-src-branches@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 4gnrJY6v78z6jF84 for ; Sun, 28 Jun 2026 00:44:13 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gnrJY3mktz3lLJ for ; Sun, 28 Jun 2026 00:44:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782607453; 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=lsI/xkKNU81AVctyhRBoWOVPMONrwCfOg+Wydsd+MEc=; b=r7++OaB/5eXjGPZL0Utud/LzhsvoePezcwJHrfunhz/Fx8GyxRC1DHJcXqvQH0vjrf9dzq s/UHNgMIopDykXYVjGMwjRCsTHugH7dpVDx+aSrsd4iXVl0+XmRiaV7IZGKOgjUCsv92st EHeTKtqi72UtXZVRxXjkfgzqRzgpxfXSepgN26BwxNhROTUEm6tGcslZgPkI2bXDcf+9o/ fem62O2P8QL/rGGhEvXHTfr865/PBJNFAcd37uCmObA+rLyfXqMz1JS/WKMyLBkntnOqSI UpjmTR0TQJYsasurnnMxZku8erYsqXsfxWpDh2B10/Xe2+xM1zTIroM6ik7fnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782607453; a=rsa-sha256; cv=none; b=PEsyPsA/9AijfwGBk4/Hg8VahSnabSGXE9ylWEuuODWn0zqNGe3pKA+swu3+sLC4Lh54FW 28seDPSHYBPO9y9iq7D1VQ4LVUJN7SdCLJZcGr0IQHDbbAWEBSzA1wthW4rmzlNSuH0p+Z WcQJEosYpKsAr4aFDFlhf+obNiGBkM6ZB+ukLU3Bq5gh4jpKwOSuU3l4pu7uW4//AC+oCf 35Q7WswdrP6fW9KGqb9heZAIS4AHO4FpSYOqZvzXdpeM5XTVikp4PEw2OI2azQHctBvQxk CjSMONCk2UaiQNeAgO4k42oKPnteYKBZXcy08fQqznNPwqK0m18J8PQww7Mtww== 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=1782607453; 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=lsI/xkKNU81AVctyhRBoWOVPMONrwCfOg+Wydsd+MEc=; b=UBdPJ9NKgD4cgUBocro5a++uQr39pD0zNpzCShgAPFkYe8oS7rkK7g6qA6+n5n/0m8wCwl 9ATsZaOLrcbdn+PZvHbeK/VFkf/+UqxNL2wkHlDfYHwdphaeG6eCVYuIE8Mo5xmNUNzzMl /0GvS/8VV6mHVHI4O3jB9yzSjN+DnHdhwvGrzxaiV+ha/HhsbFALG5bu1izH53t1liEOMe X0OWNbJBdXqv2FVmfVRdRxM5boR0ZaobVICMLrxTM4JLO6vDi0QrJa9IDQrbqeHqfAHaK+ jCxIR2kILAXxUScecpobnXtHE1w5+uKGZTRp16H9Q0iBAaClfr36tjdaIstNPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gnrJY2599zmDv for ; Sun, 28 Jun 2026 00:44:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f1c1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 28 Jun 2026 00:44:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 4016f9d5fedd - stable/15 - mdoc.7: Revert upstream changes to Lb/LIBRARY List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 4016f9d5feddfb13bcb8cbf6a70378e4d0cb6049 Auto-Submitted: auto-generated Date: Sun, 28 Jun 2026 00:44:13 +0000 Message-Id: <6a406e5d.3f1c1.a1ca438@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=4016f9d5feddfb13bcb8cbf6a70378e4d0cb6049 commit 4016f9d5feddfb13bcb8cbf6a70378e4d0cb6049 Author: Alexander Ziaee AuthorDate: 2026-05-22 18:09:23 +0000 Commit: Alexander Ziaee CommitDate: 2026-06-28 00:36:10 +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 (cherry picked from commit 4e2bf6e90a65bee317e4dd379e098ba2eb5d8c0d) --- 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 */