]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
2 years agoputenv.3: tfix
наб [Tue, 23 May 2023 20:58:52 +0000 (22:58 +0200)] 
putenv.3: tfix

Fixes: commit b324e17d3208c940622ab192609b836928d5aa8d ("Many pages: wfix")
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoputenv.3: Originated in SysVr2; in 4.3BSD-Reno; fixed on modern systems
наб [Tue, 23 May 2023 20:17:31 +0000 (22:17 +0200)] 
putenv.3: Originated in SysVr2; in 4.3BSD-Reno; fixed on modern systems

Fixed in:
  NetBSD 6     src lib/libc/stdlib/putenv.c 1.13
  FreeBSD 7    putenv(3) says so
  OpenBSD 4.6  src lib/libc/stdlib/setenv.c 1.10
and is correct under current(?) MacOS as well

The current wording implies that all of 4.4BSD's descenants also carry
this bug (at least it did to me): they did until like 2009 but they're
fine now

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agobash_aliases: Increase robustness of sed_rm_ccomments()
Alejandro Colomar [Tue, 23 May 2023 14:29:34 +0000 (16:29 +0200)] 
bash_aliases: Increase robustness of sed_rm_ccomments()

Thanks to perl(1), we can use a non-greedy match to remove several
C89-style comments in the same line.  And by splitting (and slightly
modifying) the other sed(1) call, we can handle multi-line comments that
start in the same line that the previous one ends.

Now the only remaining issue is nested comments, but that's rare, so
let's ignore it for now.

$ cat com.c
/* let's see */ int foo/*how about here?*/; // meh
int bar; /* Let's see
how this
behaves */ int baz; /* like this?
like that! */ int qwe; // asdasd

$ sed_rm_ccomments <com.c
 int foo;
int bar;
 int baz;
 int qwe;

Here's what can and will be problematic:

// /*
int foo;
/* */

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago.mailmap: Add Serge Hallyn
Alejandro Colomar [Sat, 20 May 2023 12:43:51 +0000 (14:43 +0200)] 
.mailmap: Add Serge Hallyn

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago.mailmap: Add Andrew Clayton
Alejandro Colomar [Sat, 20 May 2023 12:38:18 +0000 (14:38 +0200)] 
.mailmap: Add Andrew Clayton

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago.mailmap: Add Ingo Schwarze
Alejandro Colomar [Sat, 20 May 2023 12:35:45 +0000 (14:35 +0200)] 
.mailmap: Add Ingo Schwarze

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoopen.2, prctl.2: SYNOPSIS: Document these as variadic functions
Alejandro Colomar [Fri, 19 May 2023 13:02:16 +0000 (15:02 +0200)] 
open.2, prctl.2: SYNOPSIS: Document these as variadic functions

I remember I discussed this with Michael Kerrisk a long ago and we
agreed to apply this fix, as I felt that using overload syntax was
confusing (especially since C doesn't allow overloads), but then I
didn't feel urged to write a patch.  Florian confirmed recently that
this is confusing to more programmers, so let's do it.

Link: <https://bugzilla.kernel.org/show_bug.cgi?id=216876#c1>
Reported-by: Florian Weimer <fweimer@redhat.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoposix_memalign.3: Update aligned_alloc(3) to match C17
DJ Delorie [Tue, 9 May 2023 00:43:35 +0000 (20:43 -0400)] 
posix_memalign.3: Update aligned_alloc(3) to match C17

Link: <https://sourceware.org/pipermail/libc-alpha/2023-May/147810.html>
Link: <https://patchwork.sourceware.org/project/glibc/patch/33ec9e0c1e587813b90e8aa771c2c8e6e379dd48.camel@posteo.net/>
Link: <https://lore.kernel.org/linux-man/d79b505c-5b19-331c-5b25-d40adc9cc843@wanadoo.fr/>
Cc: John Scott <jscott@posteo.net>
Cc: Paul Floyd <pjfloyd@wanadoo.fr>
Signed-off-by: DJ Delorie <dj@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agosystem_data_types.7: tfix
Eric Wong [Fri, 19 May 2023 10:26:43 +0000 (10:26 +0000)] 
system_data_types.7: tfix

The actual field names omit the 'g', matching sigevent.7.

Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago.mailmap: Add Bruno Haible
Alejandro Colomar [Fri, 19 May 2023 12:06:40 +0000 (14:06 +0200)] 
.mailmap: Add Bruno Haible

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoREADME: tfix
Alejandro Colomar [Fri, 19 May 2023 08:42:10 +0000 (10:42 +0200)] 
README: tfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agofflush.3, unlocked_stdio.3: SYNOPSIS: The streams can be null
Alejandro Colomar [Thu, 18 May 2023 18:53:14 +0000 (20:53 +0200)] 
fflush.3, unlocked_stdio.3: SYNOPSIS: The streams can be null

Cc: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Use -wbreak in TROFFFLAGS, and -ww in NROFFFLAGS
Alejandro Colomar [Tue, 9 May 2023 11:25:01 +0000 (13:25 +0200)] 
*.mk: Use -wbreak in TROFFFLAGS, and -ww in NROFFFLAGS

We don't need to see all warnings everywhere we call troff(1).  Instead,
put all warnings in nroff mode, which we only run for the warnings, and
then only ask for warnings that depend on the output in other
invocations of troff(1).

-wbreak happens to enable only and all so-called "output warnings".  It
is an implementation detail of groff(1), but that's the best we can do
now.  If groff(1) changes their warnings organization, we'll need to
adapt to it.

Link: <https://lists.gnu.org/archive/html/groff/2023-05/msg00046.html>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agombind.2: Clarify MPOL_MF_MOVE with MPOL_INTERLEAVE policy
Mike Kravetz [Fri, 5 May 2023 19:48:58 +0000 (12:48 -0700)] 
mbind.2: Clarify MPOL_MF_MOVE with MPOL_INTERLEAVE policy

There was user confusion about specifying MPOL_MF_MOVE* with
MPOL_INTERLEAVE policy [1].  Add clarification.

[1] https://lore.kernel.org/linux-mm/20230501185836.GA85110@monkey/

Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoresolv.conf.5: tfix
Jakub Wilk [Wed, 3 May 2023 15:57:38 +0000 (17:57 +0200)] 
resolv.conf.5: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agosched_yield.2: Rename NOTES to CAVEATS, and reorder contents
Alejandro Colomar [Wed, 3 May 2023 16:47:27 +0000 (18:47 +0200)] 
sched_yield.2: Rename NOTES to CAVEATS, and reorder contents

Put the last paragraph at the top of the CAVEATS section, since it's
probably the most important for readers.  This system call is likely not
the right one for most programs; let's discourage its use.

Link: <https://www.realworldtech.com/forum/?threadid=189711&curpostid=189752>
Cc: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
2 years agosched_yield.2: NOTES: Remove misleading sentence
Alejandro Colomar [Wed, 3 May 2023 16:26:12 +0000 (18:26 +0200)] 
sched_yield.2: NOTES: Remove misleading sentence

sched_yield(2) is not the right thing for heavily contended resources.
The right thing to do is to call functions that wake the waiting threads.

Link: <https://www.realworldtech.com/forum/?threadid=189711&curpostid=189752>
Cc: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
2 years agosched_yield.2: HISTORY: POSIX.1-2008 makes this non-optional
Alejandro Colomar [Wed, 3 May 2023 16:19:00 +0000 (18:19 +0200)] 
sched_yield.2: HISTORY: POSIX.1-2008 makes this non-optional

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agomalloc.3: SYNOPSIS: Add the _Nullable qualifier
Alejandro Colomar [Wed, 3 May 2023 00:04:11 +0000 (02:04 +0200)] 
malloc.3: SYNOPSIS: Add the _Nullable qualifier

These functions accept NULL.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agomalloc.3: ffix
Alejandro Colomar [Wed, 3 May 2023 00:03:04 +0000 (02:03 +0200)] 
malloc.3: ffix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoman*/, man.ignore.grep: srcfix; warn about blank lines
Alejandro Colomar [Tue, 2 May 2023 22:48:14 +0000 (00:48 +0200)] 
man*/, man.ignore.grep: srcfix; warn about blank lines

-  Use the dummy character to avoid warnings in examples.
-  Re-enable the warning.

Suggested-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk, *.grep: Move grep patterns to .grep files
Alejandro Colomar [Mon, 1 May 2023 23:56:52 +0000 (01:56 +0200)] 
*.mk, *.grep: Move grep patterns to .grep files

This simplifies the makefiles, and has the benefit that we can edit them
without editing the makefile (thus without causing unnecessary rebuilds).

Suggested-by: Bjarni Ingi Gislason <bjarniig@simnet.is>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoascii.7: ffix
Alejandro Colomar [Mon, 1 May 2023 23:03:01 +0000 (01:03 +0200)] 
ascii.7: ffix

Simplify formatting of ASCII tables.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agouri.7: ffix
Alejandro Colomar [Sat, 29 Apr 2023 19:46:13 +0000 (21:46 +0200)] 
uri.7: ffix

Reported-by: groff(1) (`make build-catman-troff`)
Cowritten-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoman*/: srcfix
Alejandro Colomar [Sat, 29 Apr 2023 18:25:44 +0000 (20:25 +0200)] 
man*/: srcfix

Reported-by: groff(1) (`make build-catman-troff`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoman*/: ffix
Alejandro Colomar [Sat, 29 Apr 2023 18:19:20 +0000 (20:19 +0200)] 
man*/: ffix

Reported-by: groff(1) (`make built-catman-troff`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: build-catman-troff: Silence warnings about using UC
Alejandro Colomar [Sat, 29 Apr 2023 18:24:01 +0000 (20:24 +0200)] 
*.mk: build-catman-troff: Silence warnings about using UC

We have some pages that come from UCB, and therefore need that macro.
It's not like we're going to accidentally use that macro, so let's
ignore the warning.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: build-catman-troff: Silence warnings about using PD
Alejandro Colomar [Sat, 29 Apr 2023 18:12:37 +0000 (20:12 +0200)] 
*.mk: build-catman-troff: Silence warnings about using PD

It's the best tool for certain purposes (at least, so far).

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: build-catman-troff: Silence warnings about blank lines in input
Alejandro Colomar [Sat, 29 Apr 2023 18:09:27 +0000 (20:09 +0200)] 
*.mk: build-catman-troff: Silence warnings about blank lines in input

Ideally, we want this warning, but it has false positives in the example
programs, so let's disable it for now.  Hopefully, groff will split
those two, and then we'll be able to re-enable the one we want.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: install-man: Ignore pages in non-standard source MANDIRS
Alejandro Colomar [Sat, 29 Apr 2023 18:05:40 +0000 (20:05 +0200)] 
*.mk: install-man: Ignore pages in non-standard source MANDIRS

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: build-catman-troff: Silence warnings about missing fifth argument
Alejandro Colomar [Sat, 29 Apr 2023 17:54:49 +0000 (19:54 +0200)] 
*.mk: build-catman-troff: Silence warnings about missing fifth argument

This happens when the second argument is a subsection, and the warning
is right because the page ends up with no section title, but let's
forget about it for now.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Allow non-standard source MANDIRS
Alejandro Colomar [Sat, 29 Apr 2023 17:29:50 +0000 (19:29 +0200)] 
*.mk: Allow non-standard source MANDIRS

Some projects don't store their source manual pages in a directory
structure resembling $MANPATH.  Allow such a directory structure so that
we can for example lint groff's source manual pages:

$ make check lint MANDIR=~/src/gnu/groff;

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Don't rmdir
Alejandro Colomar [Sat, 29 Apr 2023 17:09:16 +0000 (19:09 +0200)] 
*.mk: Don't rmdir

There's no need; we can leave empty dirs on 'make uninstall', and it
allows some simplifications.  We don't need the FORCE target anymore,
and don't need some directory variables either.  While at it, I found
some unused variable that should have been removed a long time ago:
$installdirs_manX

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: MANEXT: Support man pages with .man and/or .in suffixes
Alejandro Colomar [Sat, 29 Apr 2023 16:46:00 +0000 (18:46 +0200)] 
*.mk: MANEXT: Support man pages with .man and/or .in suffixes

Those are common in some projects in their source pages; especially
'.in' when it's a template that will be completed by the build system.

This allows linting other projects' pages by running a command like:

$ make lint MANDIR=/home/alx/src/nginx/unit/master/docs/man

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: lint-mdoc-mandoc: Silence warning about referenced manuals not found
Alejandro Colomar [Fri, 28 Apr 2023 15:04:35 +0000 (17:04 +0200)] 
*.mk: lint-mdoc-mandoc: Silence warning about referenced manuals not found

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: lint-mdoc-mandoc: Silence warnings about ISO 8601 format in the date
Alejandro Colomar [Fri, 28 Apr 2023 14:52:00 +0000 (16:52 +0200)] 
*.mk: lint-mdoc-mandoc: Silence warnings about ISO 8601 format in the date

ISO 8601 is the standard way to express a date.  Don't warn about it.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: lint-mdoc-mandoc: Silence warnings about lowercase in Dt
Alejandro Colomar [Fri, 28 Apr 2023 14:50:01 +0000 (16:50 +0200)] 
*.mk: lint-mdoc-mandoc: Silence warnings about lowercase in Dt

See commit
4896a4f8c4b8 ("lint-man.mk: lint-man-mandoc: Silence warnings about lowercase in TH")
Cc: Ingo Schwarze <schwarze@openbsd.org>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Fix error detection
Alejandro Colomar [Fri, 28 Apr 2023 14:02:26 +0000 (16:02 +0200)] 
*.mk: Fix error detection

See also this commit:
0440d04f8317 ("lint-man.mk: lint-man-groff-eqn: Fix error detection")

Reported-by: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Rewrite pipelines to make it easier to ignore some warnings
Alejandro Colomar [Fri, 28 Apr 2023 14:00:31 +0000 (16:00 +0200)] 
*.mk: Rewrite pipelines to make it easier to ignore some warnings

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Move -T$NROFF_OUT_DEVICE into NROFFFLAGS
Alejandro Colomar [Fri, 28 Apr 2023 13:32:07 +0000 (15:32 +0200)] 
*.mk: Move -T$NROFF_OUT_DEVICE into NROFFFLAGS

This avoids breaking some long lines.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Move -rCHECKSTYLE to NROFFFLAGS
Alejandro Colomar [Fri, 28 Apr 2023 13:00:33 +0000 (15:00 +0200)] 
*.mk: Move -rCHECKSTYLE to NROFFFLAGS

Having that in TROFFFLAGS caused repeated warnings for every different
format we produce.  Let's have these warnings only in nroff mode.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Keep error messages in stderr
Alejandro Colomar [Fri, 28 Apr 2023 12:53:47 +0000 (14:53 +0200)] 
*.mk: Keep error messages in stderr

We redirected them to stdout for some filtering, but forgot to put it
back where it belongs.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Handle pathnames with ':'
Alejandro Colomar [Tue, 25 Apr 2023 23:39:22 +0000 (01:39 +0200)] 
*.mk: Handle pathnames with ':'

Since make(1) uses ':' as a special character in rules, it needs to be
handled carefully.  A way to make it work is to escape it with '\:'.  We
can use sed(1) to do that right when we get the pathnames.  The only
problem with ':' is in rules' targets and prerequisites: everywhere else
it's fine; so let's discuss what needs to be done in those places:

-  In the targets, it's as easy as escaping.

-  In prerequisites, we can't second-expand variables containing such
   pathnames, as the '\' would not be used by make(1) to escape the ':',
   but it would be interpreted as part of the pathname.  This means we
   need to expand rules written using second expansion into several
   rules that only expand their variables once.

-  $(wildcard ...) also performs the escape, so after using it the
   pathnames are not escaped.  If we used those variables in targets, we
   would need to escape the ':'s again, but since we don't we can skip
   that.  The trick to make this work is to second-expand these
   variables.

Link: <https://stackoverflow.com/a/76096683/6872717>
Cc: GNU Make <bug-make@gnu.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Use empty recipes for .PHONY targets
Alejandro Colomar [Tue, 25 Apr 2023 18:52:12 +0000 (20:52 +0200)] 
*.mk: Use empty recipes for .PHONY targets

The @: dummy recipe was there to avoid having rules without recipes.
Rules without recipes can be confusing, as the reader can't know if a
recipe is being defined somewhere else.  Also, implicit rules might
apply (in general, but we disable all implicit stuff).

However, @: is also problematic, since make really needs to run that
command, which is unnecessary overhead.  But okay, :(1) (really called
true(1), but wouldn't it be a nice man page name?) that's not meaningful
overhead.

And the bigger problem: having a recipe hides the usual:

make: Nothing to be done for 'all'.

We already disable it by using .SILENCE:, but the message can be seen
when using V=1 (after this patch; prior to this patch, it was impossible
to find that message).  It is good to be able to know that make(1)
says there's nothing to be done, as a confirmation.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoman*/: wfix
Günther Noack [Sat, 22 Apr 2023 15:06:46 +0000 (17:06 +0200)] 
man*/: wfix

Fix spelling of "run time", as documented in man-pages(7):

-  "run time" in two words when used as a noun
-  "run-time" with hyphen when used as an adjective

There is another occurrence in bpf-helpers.7,
but that content gets generated from the kernel source
and should be fixed there.

Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agogroff.mk, checkstyle.tmac: Remove unnecessary tmac file
Alejandro Colomar [Sun, 23 Apr 2023 14:34:41 +0000 (16:34 +0200)] 
groff.mk, checkstyle.tmac: Remove unnecessary tmac file

We used it for transforming groff_man(7)'s CHECKSTYLE into errors, but
we already do that with grep(1).  Moreover, the tmac was hiding
troff(1)'s warnings.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoMakefile: Remove unused flag
Alejandro Colomar [Sun, 23 Apr 2023 01:34:56 +0000 (03:34 +0200)] 
Makefile: Remove unused flag

We don't have a recursive make, so this flag is not used.  Moreover, if
ever, for some rare reason, make traverses directories, it would be good
to know.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: build-pdf: Build PDF manual pages
Alejandro Colomar [Sun, 23 Apr 2023 01:05:29 +0000 (03:05 +0200)] 
*.mk: build-pdf: Build PDF manual pages

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: build-ps*: Build PostScript manual pages
Alejandro Colomar [Sun, 23 Apr 2023 00:31:32 +0000 (02:31 +0200)] 
*.mk: build-ps*: Build PostScript manual pages

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: TROFFFLAGS{_MAN,_MDOC}: Include -man/-mdoc in the flags variables
Alejandro Colomar [Sun, 23 Apr 2023 00:24:03 +0000 (02:24 +0200)] 
*.mk: TROFFFLAGS{_MAN,_MDOC}: Include -man/-mdoc in the flags variables

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agogroff.mk: TROFFFLAGS_MAN: tfix
Alejandro Colomar [Sun, 23 Apr 2023 00:22:13 +0000 (02:22 +0200)] 
groff.mk: TROFFFLAGS_MAN: tfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: ffix
Alejandro Colomar [Sun, 23 Apr 2023 00:19:47 +0000 (02:19 +0200)] 
*.mk: ffix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agogroff.mk: TROFFFLAGS: Remove -t
Alejandro Colomar [Sun, 23 Apr 2023 00:02:43 +0000 (02:02 +0200)] 
groff.mk: TROFFFLAGS: Remove -t

That was probably a typo; it doesn't make sense to ask troff(1) to pass
the tbl(1) preprocessor, since we already did.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoMakefile: help-variables: Document MANWIDTH and NROFF_OUT_DEVICE
Alejandro Colomar [Sun, 23 Apr 2023 00:01:46 +0000 (02:01 +0200)] 
Makefile: help-variables: Document MANWIDTH and NROFF_OUT_DEVICE

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Factor out device-independent groff(1) flags
Alejandro Colomar [Sat, 22 Apr 2023 23:59:24 +0000 (01:59 +0200)] 
*.mk: Factor out device-independent groff(1) flags

Add {EXTRA_,}NROFFFLAGS (used exclusively in 'build-catman').
This refactor will allow building other formats.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoMakefile: help-variables: Document some troff(1) flags variables
Alejandro Colomar [Sat, 22 Apr 2023 23:25:03 +0000 (01:25 +0200)] 
Makefile: help-variables: Document some troff(1) flags variables

Fixes: 3c8198d17 ("*.mk: build-catman-troff, build-catman-troff-man, build-catman-troff-mdoc: Support mdoc(7) pages")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: build-pre*: Split device-independent preprocessing from the catman targets
Alejandro Colomar [Sat, 22 Apr 2023 23:22:51 +0000 (01:22 +0200)] 
*.mk: build-pre*: Split device-independent preprocessing from the catman targets

To build other output formats from the same sources, let's split the
generic part of the pipelines.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoinstall/_.mk: Make pattern rule more explicit
Alejandro Colomar [Sat, 22 Apr 2023 23:05:07 +0000 (01:05 +0200)] 
install/_.mk: Make pattern rule more explicit

Specify $DESTDIR, so that it's more clear what this rule is about.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agodist.mk: Create directories with $INSTALL
Alejandro Colomar [Sat, 22 Apr 2023 23:02:43 +0000 (01:02 +0200)] 
dist.mk: Create directories with $INSTALL

Other directories in $builddir are created with $MKDIR, but since these
should be as if installed, it makes sense to use the same command as
when installing.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*/mk: mkdir -p (and install -d) are safe to use
Alejandro Colomar [Sat, 22 Apr 2023 22:35:12 +0000 (00:35 +0200)] 
*/mk: mkdir -p (and install -d) are safe to use

There are no race conditions, contrary to what some sources say.
Previously, we had each directory depend on its parent directory, so
that only a few parent-most directories would be created with parents,
and all others would be created when their parents exist.  That was due
to FUD about TOCTOU race conditions with mkdir -p and parallel make, but
it was just FUD.

This patch makes it so that each directory is directly created with
parents without specifying any dependency.  This simplifies the makefile
at some cost: calling mkdir -p so many times is a bit slower.  However,
it's only about 5%, so we can live with it, since we're talking about
hundreds of a second for creating all the directories that this build
system knows about.

Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Make comment more generic
Alejandro Colomar [Sat, 22 Apr 2023 19:25:39 +0000 (21:25 +0200)] 
*.mk: Make comment more generic

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: License consistently with GPL-3.0-or-later
Alejandro Colomar [Sat, 22 Apr 2023 19:13:09 +0000 (21:13 +0200)] 
*.mk: License consistently with GPL-3.0-or-later

Also, use consistent formatting for the license and copyright.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: check-catman: Support mdoc(7) pages
Alejandro Colomar [Sat, 22 Apr 2023 18:55:21 +0000 (20:55 +0200)] 
*.mk: check-catman: Support mdoc(7) pages

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: build-catman-troff, build-catman-troff-man, build-catman-troff-mdoc: Support...
Alejandro Colomar [Sat, 22 Apr 2023 18:35:46 +0000 (20:35 +0200)] 
*.mk: build-catman-troff, build-catman-troff-man, build-catman-troff-mdoc: Support mdoc(7) pages

Split the old build-catman-troff target into two subtargets; the ...-man
one supports man(7) pages, while the ...-mdoc one supports mdoc(7) pages.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agocatman.mk: build-catman-troff: Fail if troff(1) writes to stderr
Alejandro Colomar [Sat, 22 Apr 2023 18:38:19 +0000 (20:38 +0200)] 
catman.mk: build-catman-troff: Fail if troff(1) writes to stderr

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: lint, lint-mdoc, lint-mdoc-mandoc: Support mdoc(7) pages
Alejandro Colomar [Sat, 22 Apr 2023 14:47:51 +0000 (16:47 +0200)] 
*.mk: lint, lint-mdoc, lint-mdoc-mandoc: Support mdoc(7) pages

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoMakefile: Update and remove comments
Alejandro Colomar [Sat, 22 Apr 2023 12:12:59 +0000 (14:12 +0200)] 
Makefile: Update and remove comments

-  We don't use %/. for directories anymore.

-  %/ targets are obviously directories; no need to say.

-  Don't need to document how we create directories.  That should be
   obvious from the code.

Fixes: ac288b42c ("*.mk: Remove unnecessary '.' after directory names (but keep the '/')")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: srcfix
Alejandro Colomar [Fri, 21 Apr 2023 22:09:37 +0000 (00:09 +0200)] 
regex.3: srcfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: We rewrote most of the page
Alejandro Colomar [Fri, 21 Apr 2023 22:08:47 +0000 (00:08 +0200)] 
regex.3: We rewrote most of the page

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agosockaddr.3type: POSIX Issue 8 will solve strict-aliasing issues with these types
Alejandro Colomar [Tue, 11 Apr 2023 20:13:00 +0000 (22:13 +0200)] 
sockaddr.3type: POSIX Issue 8 will solve strict-aliasing issues with these types

Link: <https://austingroupbugs.net/view.php?id=1641>
Reported-by: Bastien Roucariès <rouca@debian.org>
Reported-by: Alejandro Colomar <alx@kernel.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Cc: glibc <libc-alpha@sourceware.org>
Cc: GCC <gcc@gcc.gnu.org>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Cc: Igor Sysoev <igor@sysoev.ru>
Cc: Rich Felker <dalias@libc.org>
Cc: Andrew Clayton <andrew@digital-domain.net>
Cc: Richard Biener <richard.guenther@gmail.com>
Cc: Zack Weinberg <zack@owlfolio.org>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Joseph Myers <joseph@codesourcery.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Cc: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agobuild-catman.mk: Use .set suffix for troff(1) output
Alejandro Colomar [Tue, 11 Apr 2023 20:13:00 +0000 (22:13 +0200)] 
build-catman.mk: Use .set suffix for troff(1) output

Suggested-by: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Destandardeseify Match offsets
наб [Fri, 21 Apr 2023 13:29:43 +0000 (15:29 +0200)] 
regex.3: Destandardeseify Match offsets

This section reads like it were (and pretty much is) lifted from POSIX.
That's hard to read, because POSIX is horrendously verbose, as usual.

Instead, synopsise it into something less formal but more reasonable,
and describe the resulting range with a range instead of a paragraph.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Desoupify regerror() description
наб [Fri, 21 Apr 2023 12:03:47 +0000 (14:03 +0200)] 
regex.3: Desoupify regerror() description

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: SYNOPSIS: Remove superfluous comments
Alejandro Colomar [Fri, 21 Apr 2023 12:09:35 +0000 (14:09 +0200)] 
regex.3: SYNOPSIS: Remove superfluous comments

This has the benefit that we can use proportional-width fonts in the
SYNOPSIS without misalignment in the structures.

Cc: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Cc: Ralph Corderoy <ralph@inputplus.co.uk>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Further clarify the sole purpose of REG_NOSUB
наб [Fri, 21 Apr 2023 02:49:11 +0000 (04:49 +0200)] 
regex.3: Further clarify the sole purpose of REG_NOSUB

Link: <https://lore.kernel.org/linux-man/3459b2a0-6a07-40fc-1e66-db906c3f62ac@gmail.com/T/#mb50a957359e029c611d6e0b8f1b1a20101aae670>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Finalise move of reg*.3type
наб [Fri, 21 Apr 2023 02:48:59 +0000 (04:48 +0200)] 
regex.3: Finalise move of reg*.3type

They're inextricably linked, not cross-referenced at all,
and not used anywhere else.

Now that they (realistically) exist to the reader, add a note
on how big nmatch can be; POSIX even says "The application developer
should note that there is probably no reason for using a value of
nmatch that is larger than preg−>re_nsub+1.".

Also remove the now-duplicate regmatch_t declaration.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3, regex_t.3type, regmatch_t.3type, regoff_t.3type: Move & link regex_t.3type...
наб [Fri, 21 Apr 2023 02:48:54 +0000 (04:48 +0200)] 
regex.3, regex_t.3type, regmatch_t.3type, regoff_t.3type: Move & link regex_t.3type into regex.3

Move-only commit.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agodl_iterate_phdr.3: EXAMPLES: Alignment should match open parenthesis
Alejandro Colomar [Fri, 21 Apr 2023 09:37:42 +0000 (11:37 +0200)] 
dl_iterate_phdr.3: EXAMPLES: Alignment should match open parenthesis

Reported-by: checkpatch(1) (`make lint-c-checkpatch`)
Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoEXIT_SUCCESS.3const: EXAMPLES: Do not use assignment in if condition
Alejandro Colomar [Fri, 21 Apr 2023 09:29:12 +0000 (11:29 +0200)] 
EXIT_SUCCESS.3const: EXAMPLES: Do not use assignment in if condition

Reported-by: checkpatch(1) (`make lint-c-checkpatch`)
Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Desoupify regfree() description
наб [Fri, 21 Apr 2023 01:24:20 +0000 (03:24 +0200)] 
regex.3: Desoupify regfree() description

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Improve REG_STARTEND
наб [Fri, 21 Apr 2023 00:39:47 +0000 (02:39 +0200)] 
regex.3: Improve REG_STARTEND

Explicitly spell out the ranges involved. The original wording always
confused me, but it's actually very sane.

Remove "this doesn't change R_NOTBOL & R_NEWLINE" ‒ so does it change
R_NOTEOL? No. That's weird and confusing.

String largeness doesn't matter, known-lengthness does.

Explicitly spell out the influence on returned matches
(relative to string, not start of range).

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Desoupify regexec() description
наб [Thu, 20 Apr 2023 19:36:53 +0000 (21:36 +0200)] 
regex.3: Desoupify regexec() description

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agosyscall.2: Document ENOSYS error
Günther Noack [Thu, 20 Apr 2023 20:08:41 +0000 (22:08 +0200)] 
syscall.2: Document ENOSYS error

Link: <https://lore.kernel.org/linux-man/31ecebc5-1b97-b610-a097-f260ec4d4c8d@gmail.com/>
Suggested-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: SYNOPSIS: Add _Nullable qualifier to regerror()'s errbuf
Alejandro Colomar [Thu, 20 Apr 2023 16:54:13 +0000 (18:54 +0200)] 
regex.3: SYNOPSIS: Add _Nullable qualifier to regerror()'s errbuf

Passing NULL there means that the function returns the size needed for a
copy without actually copying (possibly useful before allocating a
buffer large enough).

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Desoupify regcomp() description
наб [Thu, 20 Apr 2023 15:35:45 +0000 (17:35 +0200)] 
regex.3: Desoupify regcomp() description

Behold:
  regerror() is passed the error code, errcode, the pattern buffer,
  preg, a pointer to a character string buffer, errbuf, and the size
  of the string buffer, errbuf_size.

Absolute soup.  This reads to me like an ill-conceived copy from a very
early standard version.  It looks fine in source form but is horrific to
read as running text.

Instead, replace all of these with just the descriptions of what they do
with their arguments.  What the arguments are is very clearly noted in
big bold in the prototypes.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Fix subsection headings
наб [Thu, 20 Apr 2023 13:02:07 +0000 (15:02 +0200)] 
regex.3: Fix subsection headings

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: SYNOPSIS: Add _Nullable qualifier
Alejandro Colomar [Thu, 20 Apr 2023 13:31:22 +0000 (15:31 +0200)] 
regex.3: SYNOPSIS: Add _Nullable qualifier

Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoman*/: ffix, wfix
наб [Thu, 20 Apr 2023 12:12:11 +0000 (14:12 +0200)] 
man*/: ffix, wfix

Use "bitwise OR" instead of "bitwise-or" (with fonts).
No other pages spell it like this.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: wfix
наб [Wed, 19 Apr 2023 23:23:32 +0000 (01:23 +0200)] 
regex.3: wfix

"Not in POSIX.2", so is it in POSIX.1-2008?  POSIX.1-2001?
(or any other combination of standards from this millenion
not mentioned on this page?)  It's not: just say POSIX.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: ffix
наб [Wed, 19 Apr 2023 23:23:22 +0000 (01:23 +0200)] 
regex.3: ffix

We never bold POSIX, not even anywhere else on this page.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Note that pmatch is still used if REG_NOSUB if REG_STARTEND
наб [Wed, 19 Apr 2023 23:23:04 +0000 (01:23 +0200)] 
regex.3: Note that pmatch is still used if REG_NOSUB if REG_STARTEND

In the regexec() signature
  regmatch_t pmatch[restrict .nmatch],
is a simplification. It's actually
  regmatch_t pmatch[restrict
    ((.preg->flags & REG_NOSUB) ? 0 : .nmatch) ?:
     !!(.eflags & REG_STARTEND)],

But speccing that would be insane.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agolandlock.7: Return instead of exit() if Landlock is unusable
Günther Noack [Wed, 19 Apr 2023 18:54:43 +0000 (20:54 +0200)] 
landlock.7: Return instead of exit() if Landlock is unusable

When following a best effort approach,
we should not fail when Landlock is unusable,
but we should fall back to doing nothing.

Link: <https://lore.kernel.org/linux-man/5d90e3b0-1577-7efd-03b8-f94b6e50fbc1@digikod.net/>
Suggested-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agolandlock.7: wfix: Error message wording in code example
Günther Noack [Wed, 19 Apr 2023 18:54:42 +0000 (20:54 +0200)] 
landlock.7: wfix: Error message wording in code example

Link: <https://lore.kernel.org/linux-man/5d90e3b0-1577-7efd-03b8-f94b6e50fbc1@digikod.net/>
Suggested-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agolandlock.7: Use LANDLOCK_* constants for compatibility table
Günther Noack [Wed, 19 Apr 2023 18:54:41 +0000 (20:54 +0200)] 
landlock.7: Use LANDLOCK_* constants for compatibility table

Link: <https://lore.kernel.org/linux-man/5d90e3b0-1577-7efd-03b8-f94b6e50fbc1@digikod.net/>
Cc: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agolandlock.7: Check syscall result with == -1 instead of <= 0
Günther Noack [Wed, 19 Apr 2023 18:54:40 +0000 (20:54 +0200)] 
landlock.7: Check syscall result with == -1 instead of <= 0

Link: <https://lore.kernel.org/linux-man/5d90e3b0-1577-7efd-03b8-f94b6e50fbc1@digikod.net/>
Reported-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoman*/: ffix
Guillem Jover [Sun, 16 Apr 2023 23:19:16 +0000 (01:19 +0200)] 
man*/: ffix

Escape dashes on UUIDs, URLs, and file and package names.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agolandlock.7: Explain the best-effort fallback mechanism in the example
Günther Noack [Mon, 17 Apr 2023 17:25:13 +0000 (19:25 +0200)] 
landlock.7: Explain the best-effort fallback mechanism in the example

Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoINSTALL: Fix references to lib/ -> share/mk/
Alejandro Colomar [Mon, 17 Apr 2023 18:33:59 +0000 (20:33 +0200)] 
INSTALL: Fix references to lib/ -> share/mk/

Fixes: edaa12e6b ("*.mk: Move makefiles from lib/ to share/mk/")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoproc.5: tfix
Guillem Jover [Sun, 16 Apr 2023 23:35:52 +0000 (01:35 +0200)] 
proc.5: tfix

Use Ctrl-Alt-Del instead of ctrl-alt-del, as used in all other
instances.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoproc.5: Document that /proc/PID/oom_adj is no longer present
Guillem Jover [Sun, 16 Apr 2023 23:35:51 +0000 (01:35 +0200)] 
proc.5: Document that /proc/PID/oom_adj is no longer present

See kernel commit 01dc52ebdf472f77cca623ca693ca24cfc0f1bbe.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>