]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
3 years agoVarious pages: EXAMPLES: Remove unused variables
Alex Colomar [Mon, 12 Sep 2022 16:54:07 +0000 (18:54 +0200)] 
Various pages: EXAMPLES: Remove unused variables

Reported-by: clang-tidy(1)
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agomatherr.3: EXAMPLES: Can't build program
Alex Colomar [Mon, 12 Sep 2022 16:53:30 +0000 (18:53 +0200)] 
matherr.3: EXAMPLES: Can't build program

The documented functions don't exist anymore.

Reported-by: clang(1)
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agogetsubopt.3: EXAMPLES: Fix indentation
Alex Colomar [Mon, 12 Sep 2022 16:16:54 +0000 (18:16 +0200)] 
getsubopt.3: EXAMPLES: Fix indentation

Fixes: 645259f4357baa3b3931ae24c79648baa155ebdf
Fixes: 35facf001e3682c0bafbdd139d8cfc6a8cb2a301
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agogetpwent_r.3: EXAMPLES: Add missing include
Alex Colomar [Mon, 12 Sep 2022 16:07:40 +0000 (18:07 +0200)] 
getpwent_r.3: EXAMPLES: Add missing include

Reported-by: clang(1)
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agofopencookie.3: EXAMPLES: Remove 'else' after 'return'
Alex Colomar [Mon, 12 Sep 2022 15:06:31 +0000 (17:06 +0200)] 
fopencookie.3: EXAMPLES: Remove 'else' after 'return'

Reported-by: clang-tidy(1)
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agoencrypt.3: SYNOPSIS: Mark functions as [[deprecated]]
Alex Colomar [Mon, 12 Sep 2022 15:05:23 +0000 (17:05 +0200)] 
encrypt.3: SYNOPSIS: Mark functions as [[deprecated]]

These functions don't exist anymore.

Reported-by: clang(1)
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agoVarious pages: EXAMPLES: Sort includes
Alex Colomar [Mon, 12 Sep 2022 15:03:08 +0000 (17:03 +0200)] 
Various pages: EXAMPLES: Sort includes

Reported-by: clang-tidy(1)
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agoconfig.yaml: Ignore some clang-tidy warnings
Alex Colomar [Sat, 10 Sep 2022 23:10:12 +0000 (01:10 +0200)] 
config.yaml: Ignore some clang-tidy warnings

Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agopthread_setschedparam.3: EXAMPLES: Remove trailing semicolon in macro definition
Alex Colomar [Sat, 10 Sep 2022 23:00:14 +0000 (01:00 +0200)] 
pthread_setschedparam.3: EXAMPLES: Remove trailing semicolon in macro definition

Reported-by: checkpatch(1)
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agomq_getattr.3: EXAMPLES: Octal permissions are more readable
Alex Colomar [Sat, 10 Sep 2022 22:59:28 +0000 (00:59 +0200)] 
mq_getattr.3: EXAMPLES: Octal permissions are more readable

Reported-by: checkpatch(1)
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agoVarious pages: EXAMPLES: Use %s __func__
Alex Colomar [Sat, 10 Sep 2022 22:59:05 +0000 (00:59 +0200)] 
Various pages: EXAMPLES: Use %s __func__

Instead of hardcoding the function name.

Reported-by: checkpatch(1)
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agoVarious pages: EXAMPLES: Fix alignment
Alex Colomar [Sat, 10 Sep 2022 22:57:38 +0000 (00:57 +0200)] 
Various pages: EXAMPLES: Fix alignment

In some cases, add braces, for readability.

Link: <https://nginx.org/en/docs/dev/development_guide.html#code_style>
Reported-by: checkpatch(1)
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agoVarious pages: EXAMPLES: Separate variable declarations from the function body
Alex Colomar [Sat, 10 Sep 2022 22:54:53 +0000 (00:54 +0200)] 
Various pages: EXAMPLES: Separate variable declarations from the function body

Reported-by: checkpatch(1)
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agortime.3: EXAMPLES: Optimize
Alex Colomar [Sat, 10 Sep 2022 22:40:53 +0000 (00:40 +0200)] 
rtime.3: EXAMPLES: Optimize

Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agobsearch.3: EXAMPLES: Use ARRAY_SIZE()
Alex Colomar [Sat, 10 Sep 2022 21:45:37 +0000 (23:45 +0200)] 
bsearch.3: EXAMPLES: Use ARRAY_SIZE()

This is more generic code, and hopefully, it will inspire other to
use such a pattern.

Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agobsearch.3: EXAMPLES: Separate struct and variable definitions
Alex Colomar [Sat, 10 Sep 2022 21:42:09 +0000 (23:42 +0200)] 
bsearch.3: EXAMPLES: Separate struct and variable definitions

Separate struct definition from variable definition.
Also use 'static' and 'const' when possible.

Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years ago_Generic.3: EXAMPLES: Allow taking a pointer to &my_imaxabs
Alex Colomar [Sat, 10 Sep 2022 21:28:15 +0000 (23:28 +0200)] 
_Generic.3: EXAMPLES: Allow taking a pointer to &my_imaxabs

And show the pointer value in the example, and show also those
of &labs and &llabs to compare.

Cc: JeanHeyd Meneide <wg14@soasis.org>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Ingo Schwarze <schwarze@openbsd.org>
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agoMany pages: EXAMPLES: Add wrapper comments SRC BEGIN and SRC END
Alejandro Colomar [Sat, 10 Sep 2022 21:21:45 +0000 (23:21 +0200)] 
Many pages: EXAMPLES: Add wrapper comments SRC BEGIN and SRC END

This is used by the Makefile to extract the example program.

Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agoRevert "src.mk, All pages: Move man* to man/"
Alejandro Colomar [Fri, 9 Sep 2022 12:15:08 +0000 (14:15 +0200)] 
Revert "src.mk, All pages: Move man* to man/"

This reverts commit 70ac1c4785fc1e158ab2349a962dba2526bf4fbc.

Link: <https://lore.kernel.org/linux-man/YxcV4h+Xn7cd6+q2@pevik/T/>
Reported-by: Petr Vorel <pvorel@suse.cz>
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
3 years agounshare.2: add note about potential capabilities confusion
Patrick Reader [Tue, 6 Sep 2022 08:49:16 +0000 (09:49 +0100)] 
unshare.2: add note about potential capabilities confusion

Link: <https://bugzilla.kernel.org/show_bug.cgi?id=216215>
Signed-off-by: Patrick Reader <_@pxeger.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agofanotify_mark.2: Document FAN_MARK_EVICTABLE
Amir Goldstein [Tue, 6 Sep 2022 10:18:27 +0000 (13:18 +0300)] 
fanotify_mark.2: Document FAN_MARK_EVICTABLE

Add section about evictable inode marks and example use case.
Add possible error case EEXIST related to evictable marks.

Reviewed-by: Matthew Bobrowski <repnop@google.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosrc.mk, All pages: Move man* to man/
Alejandro Colomar [Mon, 5 Sep 2022 21:03:38 +0000 (23:03 +0200)] 
src.mk, All pages: Move man* to man/

The root of the repository is becoming a bit overpopulated and
unorganized, due to the recent addition of more mandirs, and more
informative and configuration files too.  Let's create a specific
mandir <man/> that contains the mandirs <man[1-8]*>.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agolint-man.mk: Don't discard unrecognized control sequences
Alejandro Colomar [Mon, 5 Sep 2022 11:43:36 +0000 (13:43 +0200)] 
lint-man.mk: Don't discard unrecognized control sequences

This shouldn't change anything if everything is correct, but it
may help detect some weird bugs in corner cases.

Reported-by: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoRevert "lint-man.mk: Use ascii instead of utf8"
Alejandro Colomar [Mon, 5 Sep 2022 11:38:33 +0000 (13:38 +0200)] 
Revert "lint-man.mk: Use ascii instead of utf8"

This reverts commit f1a71d4a836d48f81832415626d27521854f85c6.

The issues motivating that patch were not real, and I guess I had
another problem, probably caused by me (EBCAK).  Since I can't
reproduce the issues that lead to the change, and it's preferrable
to test exactly what users will be reading on their terminals,
let's use UTF-8 again for the tests, which is what most users will
be reading.

Reported-by: Ralph Corderoy <ralph@inputplus.co.uk>
3 years agoNULL.3const: Fix TH line
Alejandro Colomar [Mon, 5 Sep 2022 02:24:14 +0000 (04:24 +0200)] 
NULL.3const: Fix TH line

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agogetpw.3: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Sat, 30 Oct 2021 13:29:07 +0000 (15:29 +0200)] 
getpw.3: SYNOPSIS: Mark as [[deprecated]]

This function is insecure.  Use getpwuid(3).

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agomatherr.3: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Sat, 30 Oct 2021 13:09:16 +0000 (15:09 +0200)] 
matherr.3: SYNOPSIS: Mark as [[deprecated]]

This is no longer supported by glibc.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years ago__setfpucw.3: SYNOPSIS: Mark __setfpucw() as [[deprecated]]
Alejandro Colomar [Sat, 30 Oct 2021 12:56:08 +0000 (14:56 +0200)] 
__setfpucw.3: SYNOPSIS: Mark __setfpucw() as [[deprecated]]

The function doesn't exist anymore.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoftw.3: SYNOPSIS: Mark ftw() as [[deprecated]]
Alejandro Colomar [Sat, 30 Oct 2021 12:54:03 +0000 (14:54 +0200)] 
ftw.3: SYNOPSIS: Mark ftw() as [[deprecated]]

Use nftw(3) instead.  ftw(3) has issues with [sig]longjmp(3).

Link: <https://stackoverflow.com/q/19617783/6872717>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoulimit.3: SYNOPSIS: Mark ulimit() as [[deprecated]]
Alejandro Colomar [Sat, 30 Oct 2021 12:49:23 +0000 (14:49 +0200)] 
ulimit.3: SYNOPSIS: Mark ulimit() as [[deprecated]]

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoecvt.3: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 5 Sep 2022 02:02:07 +0000 (04:02 +0200)] 
ecvt.3: SYNOPSIS: Mark as [[deprecated]]

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoecvt_r.3: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Sat, 30 Oct 2021 13:14:25 +0000 (15:14 +0200)] 
ecvt_r.3: SYNOPSIS: Mark as [[deprecated]]

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoqecvt.3: SYNOPSIS: Mark q*cvt() as [[deprecated]]
Alejandro Colomar [Sat, 30 Oct 2021 12:47:27 +0000 (14:47 +0200)] 
qecvt.3: SYNOPSIS: Mark q*cvt() as [[deprecated]]

Use snprintf(3) instead.  Most Unix systems lack these functions.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoctime.3: SYNOPSIS: Use VLA notation for [as]ctime_r() buffer
Alejandro Colomar [Wed, 20 Oct 2021 15:46:20 +0000 (17:46 +0200)] 
ctime.3: SYNOPSIS: Use VLA notation for [as]ctime_r() buffer

As N2417 (a proposal for C2x that was not accepted) suggests.
This syntax is very informative, and also, if used by library
implementers, can improve static analysis.

Since it is backwards compatible with pointer syntax, we can do
this.  Also, the reason for not being accepted, as Jens noted,
was incompatibility with C++.  But IMO, that's not something that
we should care too much.  Users of other languages should know
what to expect when reading C code, and are expected to know C/C++
incompatibilities.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Jens Gustedt <jens.gustedt@loria.fr>
Cc: Glibc <libc-alpha@sourceware.org>
3 years agogetpass.3: SYNOPSIS: Mark getpass() as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 15:07:37 +0000 (17:07 +0200)] 
getpass.3: SYNOPSIS: Mark getpass() as [[deprecated]]

Suggest readpassphrase(3bsd) as an alternative.

Some implementations of getpass(3) may suffer from the same issues
that gets(3) suffers and some more.  See the long discussion in
the mailing list for more details (link at the bottom of this
commit message).  I'll quote some relevant parts here:

Eugene Syromyatnikov <evgsyr@gmail.com>:
{
And the only mention of getpass() in POSIX (at least,
since the 2001's edition) indeed seems to be [1], in the
list of functions that have not been carried forward from
XSH5, the 1997 revision of “System Interfaces and Headers”
(that is, SUSv2)[2], where it is inherited from SUSv1[4]
from XPG[5] and, as Alejandro already mentioned, marked as
obsolete, per XPG3 to XPG4 migration guide[6]; the
previous, 1988, version of POSIX[3] does not mention
getpass() at all.

[1] https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap01.html
[2] https://pubs.opengroup.org/onlinepubs/7908799/xsh/getpass.html
[3] https://mirror.math.princeton.edu/pub/oldlinux/download/c953.pdf
[4] https://pubs.opengroup.org/onlinepubs/9695969499/toc.pdf
[5] https://bitsavers.computerhistory.org/pdf/xOpen/X_Open_Portability_Guide_1985/xpg_2_xopen_system_v_specification_2.pdf
[6] http://archive.opengroup.org/publications/archive/CDROM/g501.pdf
}

Theo de Raadt <deraadt@openbsd.org>:
{
The community finally had the balls to get rid of gets(3).

getpass(3) shares the same flaw, that the buffer size
isn't passed.  This has been an issue in the past, and
incorrectly led to readpassphrase(3).

readpassphrase(3) has a few too many features/extensions
for my taste, but at least it is harder to abuse.
}

Alejandro Colomar <alx.manpages@gmail.com>:
{
I found readpassphrase(3) in FreeBSD and OpenBSD.  It is
also present in libbsd(7), which is available in most
Linux distributions.  I also found it on a Mac that I have
access.

NetBSD has getpass_r(3) instead.  It is not in any other
system I have access.
}

Zack Weinberg <zack@owlfolio.org>:
{
I was about to post exactly the same thing.  getpass(3)
is not deprecated because there's a better replacement,
it's deprecated because it's _unsafe_.  The glibc
implementation wraps getline(3) and therefore  doesn't
truncate the passphrase or overflow a fixed-size buffer,
no matter how long the input is, but portable code cannot
rely on that.  And come to think of it, using getline(3)
means that prefixes of the passphrase may be left lying
around in malloc's free lists.

(getpass also cannot be made thread safe, due to recycling
of a static buffer, but a program in which multiple
threads are racing to prompt the user for passwords would
be a UX disaster anyway, so I don't think that's a
critical flaw the way it is for e.g. strtok(3).)

The Linux manpage project's documentation is, as I
understand it, for Linux with glibc _first_, but not
_only_; it should not describe this function as
not-deprecated just because glibc has patched its worst
problems and doesn't offer any better API.
}

List: <https://lore.kernel.org/linux-man/6d8642e9-71f7-4a83-9791-880d04f67d17@www.fastmail.com/T/#t>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Git <git@vger.kernel.org>
Cc: Glibc <libc-alpha@sourceware.org>
Cc: OpenBSD <tech@openbsd.org>
Cc: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Cc: Benoit Lecocq <benoit@openbsd.org>
Cc: Klemens Nanni <kn@openbsd.org>
Cc: Randall <rsbecker@nexbridge.com>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Cc: Theo de Raadt <deraadt@openbsd.org>
Cc: Zack Weinberg <zack@owlfolio.org>
Cc: Florian Weimer <libc-alpha@sourceware.org>
3 years agogsignal.3: SYNOPSIS: Mark [gs]signal() as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 11:21:23 +0000 (13:21 +0200)] 
gsignal.3: SYNOPSIS: Mark [gs]signal() as [[deprecated]]

They are obsolete in other systems, and broken in glibc.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agore_comp.3: SYNOPSIS: Mark these functions as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 10:44:40 +0000 (12:44 +0200)] 
re_comp.3: SYNOPSIS: Mark these functions as [[deprecated]]

They are MT unsafe, and replaced by the MT-safe POSIX regex(3)
functions.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agorexec.3: SYNOPSIS: Mark rexec*() as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 10:42:47 +0000 (12:42 +0200)] 
rexec.3: SYNOPSIS: Mark rexec*() as [[deprecated]]

They are insecure, and replaced by rcmd(3).

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agotoascii.3: SYNOPSIS: Mark toascii() as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 10:20:28 +0000 (12:20 +0200)] 
toascii.3: SYNOPSIS: Mark toascii() as [[deprecated]]

It cannot be used portably in a localized application.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoscalb.3: SYNOPSIS: Mark these functions as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 10:17:56 +0000 (12:17 +0200)] 
scalb.3: SYNOPSIS: Mark these functions as [[deprecated]]

Use scalbn(3) instead.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agogetcwd.3: SYNOPSIS: Use VLA notation for getwd()'s argument
Alejandro Colomar [Thu, 28 Oct 2021 23:54:25 +0000 (01:54 +0200)] 
getcwd.3: SYNOPSIS: Use VLA notation for getwd()'s argument

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agogethostbyname.3: Move non-deprecated functions to the top
Alejandro Colomar [Mon, 5 Sep 2022 01:24:11 +0000 (03:24 +0200)] 
gethostbyname.3: Move non-deprecated functions to the top

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agogethostbyname.3: SYNOPSIS: Mark several symbols as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 00:22:40 +0000 (02:22 +0200)] 
gethostbyname.3: SYNOPSIS: Mark several symbols as [[deprecated]]

*hostent*() are the only ones that are not deprecated, AFAICS.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agobcmp.3: SYNOPSIS: Mark bcmp() as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 00:10:12 +0000 (02:10 +0200)] 
bcmp.3: SYNOPSIS: Mark bcmp() as [[deprecated]]

Use memcmp(3) instead.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agogets.3: SYNOPSIS: Mark gets() as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 00:05:18 +0000 (02:05 +0200)] 
gets.3: SYNOPSIS: Mark gets() as [[deprecated]]

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoresolver.3: SYNOPSIS: Use [[deprecated]] instead of a 'Deprecated' subsection
Alejandro Colomar [Fri, 29 Oct 2021 00:03:42 +0000 (02:03 +0200)] 
resolver.3: SYNOPSIS: Use [[deprecated]] instead of a 'Deprecated' subsection

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoperror.3: SYNOPSIS: Mark sys_errlist[] and sys_nerr as [[deprecated]]
Alejandro Colomar [Thu, 28 Oct 2021 23:57:26 +0000 (01:57 +0200)] 
perror.3: SYNOPSIS: Mark sys_errlist[] and sys_nerr as [[deprecated]]

They are no longer exposed by glibc.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agogetcwd.3: SYNOPSIS: Mark getwd() as [[deprecated]]
Alejandro Colomar [Thu, 28 Oct 2021 23:52:14 +0000 (01:52 +0200)] 
getcwd.3: SYNOPSIS: Mark getwd() as [[deprecated]]

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agostrsignal.3: SYNOPSIS: Mark sys_siglist[] as [[deprecated]]
Alejandro Colomar [Thu, 28 Oct 2021 23:49:28 +0000 (01:49 +0200)] 
strsignal.3: SYNOPSIS: Mark sys_siglist[] as [[deprecated]]

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoinet.3: SYNOPSIS: Mark inet_ntoa() as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:31:07 +0000 (21:31 +0200)] 
inet.3: SYNOPSIS: Mark inet_ntoa() as [[deprecated]]

See inet_ntop(3).

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agostrcpy.3: SYNOPSIS: Add missing 'restrict'
Alejandro Colomar [Mon, 28 Jun 2021 20:37:31 +0000 (22:37 +0200)] 
strcpy.3: SYNOPSIS: Add missing 'restrict'

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agopthread_mutexattr_setrobust.3: SYNOPSIS: Mark *_np() old functions as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:33:03 +0000 (21:33 +0200)] 
pthread_mutexattr_setrobust.3: SYNOPSIS: Mark *_np() old functions as [[deprecated]]

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoreaddir_r.3: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:32:02 +0000 (21:32 +0200)] 
readdir_r.3: SYNOPSIS: Mark as [[deprecated]]

Glibc:

dirent/dirent.h:183:
extern int readdir_r (DIR *__restrict __dirp,
                      struct dirent *__restrict __entry,
                      struct dirent **__restrict __result)
     __nonnull ((1, 2, 3)) __attribute_deprecated__;

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agopthread_yield.3: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:31:30 +0000 (21:31 +0200)] 
pthread_yield.3: SYNOPSIS: Mark as [[deprecated]]

sched_yield(3) is identical and is in POSIX.
See glibc commit c2fd60a5861efef48252f5cc7efc70e1d8a0da9a.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agogetipnodebyname.3: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:29:55 +0000 (21:29 +0200)] 
getipnodebyname.3: SYNOPSIS: Mark as [[deprecated]]

These functions are not anymore in glibc.  All other systems
call them deprecated.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agogamma.3: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:29:29 +0000 (21:29 +0200)] 
gamma.3: SYNOPSIS: Mark as [[deprecated]]

These functions are misleading, and in some systems mean a
different thing (tgamma(3) vs lgamma(3)).  Never use gamma(3).

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agobcopy.3: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:28:28 +0000 (21:28 +0200)] 
bcopy.3: SYNOPSIS: Mark as [[deprecated]]

memmove(3) completely replaces bcopy(3), being an almost identical
function, except for the different order in the arguments.

memmove(3) is part of ISO C and POSIX.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agouselib.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 01:02:10 +0000 (03:02 +0200)] 
uselib.2: SYNOPSIS: Mark as [[deprecated]]

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosysfs.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 00:57:14 +0000 (02:57 +0200)] 
sysfs.2: SYNOPSIS: Mark as [[deprecated]]

Use proc(5) instead.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosetpgid.2: SYNOPSIS: Mark BSD versions of getpgrp() and setpgrp() as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 00:55:17 +0000 (02:55 +0200)] 
setpgid.2: SYNOPSIS: Mark BSD versions of getpgrp() and setpgrp() as [[deprecated]]

The BSD version of getpgrp(2) was superseeded by the POSIX one.
The BSD version of setpgrp(2) was superseeded by the POSIX one.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agofutimesat.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 00:37:25 +0000 (02:37 +0200)] 
futimesat.2: SYNOPSIS: Mark as [[deprecated]]

Use utimensat(2) instead.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosgetmask.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 00:33:27 +0000 (02:33 +0200)] 
sgetmask.2: SYNOPSIS: Mark as [[deprecated]]

Use sigprocmask(2) instead.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agotkill.2: SYNOPSIS: Mark tkill() as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 00:31:25 +0000 (02:31 +0200)] 
tkill.2: SYNOPSIS: Mark tkill() as [[deprecated]]

tkill(2) has been superseeded by tgkill(2).

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosysctl.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Fri, 29 Oct 2021 00:11:35 +0000 (02:11 +0200)] 
sysctl.2: SYNOPSIS: Mark as [[deprecated]]

This syscall no longer exists!

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agopthread_mutex_consistent.3: Mark *_np() old function as [[deprecated]]
Alejandro Colomar [Thu, 28 Oct 2021 23:41:31 +0000 (01:41 +0200)] 
pthread_mutex_consistent.3: Mark *_np() old function as [[deprecated]]

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoustat.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:37:45 +0000 (21:37 +0200)] 
ustat.2: SYNOPSIS: Mark as [[deprecated]]

Glibc 2.28 removed the wrapper for this syscall.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agostime.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:37:35 +0000 (21:37 +0200)] 
stime.2: SYNOPSIS: Mark as [[deprecated]]

This syscall was removed from glibc 2.31 for newly linked
programs.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agostatfs.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:37:21 +0000 (21:37 +0200)] 
statfs.2: SYNOPSIS: Mark as [[deprecated]]

LSB deprecated these syscalls in favor of [f]statvfs(3).

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosigprocmask.2: SYNOPSIS: Mark the legacy system call as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:36:49 +0000 (21:36 +0200)] 
sigprocmask.2: SYNOPSIS: Mark the legacy system call as [[deprecated]]

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoremap_file_pages.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:35:56 +0000 (21:35 +0200)] 
remap_file_pages.2: SYNOPSIS: Mark as [[deprecated]]

This syscall was marked as deprecated in Linux 3.16.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoquery_module.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:35:32 +0000 (21:35 +0200)] 
query_module.2: SYNOPSIS: Mark as [[deprecated]]

This syscall was removed in Linux 2.6.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoiopl.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:35:21 +0000 (21:35 +0200)] 
iopl.2: SYNOPSIS: Mark as [[deprecated]]

ioperm(2) is recommended instead.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agogetunwind.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:35:09 +0000 (21:35 +0200)] 
getunwind.2: SYNOPSIS: Mark as [[deprecated]]

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoget_kernel_syms.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:34:53 +0000 (21:34 +0200)] 
get_kernel_syms.2: SYNOPSIS: Mark as [[deprecated]]

This syscall was removed in Linux 2.6.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agocreate_module.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:34:38 +0000 (21:34 +0200)] 
create_module.2: SYNOPSIS: Mark as [[deprecated]]

This syscall was removed in Linux 2.6.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agobdflush.2: SYNOPSIS: Mark as [[deprecated]]
Alejandro Colomar [Mon, 25 Oct 2021 19:34:21 +0000 (21:34 +0200)] 
bdflush.2: SYNOPSIS: Mark as [[deprecated]]

This syscal is not supported anymore by glibc, and does nothing.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoNULL.3const: Add documentation for NULL
Alejandro Colomar [Fri, 22 Jul 2022 15:29:48 +0000 (17:29 +0200)] 
NULL.3const: Add documentation for NULL

Reported-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Ralph Corderoy <ralph@inputplus.co.uk>
Cc: Ingo Schwarze <schwarze@usta.de>
Cc: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoMakefile, install-man.mk: Adapt makefiles to new 3const subsection
Alejandro Colomar [Fri, 22 Jul 2022 15:29:10 +0000 (17:29 +0200)] 
Makefile, install-man.mk: Adapt makefiles to new 3const subsection

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoVarious pages: SYNOPSIS: ffix
Alejandro Colomar [Sun, 4 Sep 2022 22:45:17 +0000 (00:45 +0200)] 
Various pages: SYNOPSIS: ffix

Enclose struct/union definitions in EX/EE.

nf/fi produces alignment issues in output devices where the font
is not monospaced.  EX/EE forces use of monospaced font, so it's
more appropriate to format SYNOPSIS that contain structure types,
where alignment is essential.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoioctl_console.2: document all extant TIOCLINUX subcodes as of 6.0 (2.6.17)
наб [Fri, 2 Sep 2022 13:07:16 +0000 (15:07 +0200)] 
ioctl_console.2: document all extant TIOCLINUX subcodes as of 6.0 (2.6.17)

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Cc: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoioctl_console.2: devices/char/console.c and sel_buffer don't exist anymore
наб [Fri, 2 Sep 2022 13:06:57 +0000 (15:06 +0200)] 
ioctl_console.2: devices/char/console.c and sel_buffer don't exist anymore

And haven't for over a decade.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Cc: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoioctl_console.2: use symbolic subcodes
наб [Fri, 2 Sep 2022 13:06:15 +0000 (15:06 +0200)] 
ioctl_console.2: use symbolic subcodes

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Cc: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agohosts.5: Use "example.org" as example domain
Jakub Wilk [Wed, 31 Aug 2022 13:41:28 +0000 (15:41 +0200)] 
hosts.5: Use "example.org" as example domain

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosysvipc.7: tfix
Štěpán Němec [Thu, 1 Sep 2022 13:01:17 +0000 (15:01 +0200)] 
sysvipc.7: tfix

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoioctl_console.2: ffix
наб [Thu, 1 Sep 2022 13:35:52 +0000 (15:35 +0200)] 
ioctl_console.2: ffix

Separate TIOCLINUX from subcode: they're separate variables

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoioctl_ns.2, stat.2: Drop unneeded uintmax_t casts
Jakub Wilk [Tue, 30 Aug 2022 19:58:00 +0000 (21:58 +0200)] 
ioctl_ns.2, stat.2: Drop unneeded uintmax_t casts

major() and minor() return unsigned int,
so the typecasts to uintmax_t are not needed.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agotermios.3: mention the integer types in SEE ALSO
наб [Mon, 29 Aug 2022 21:46:50 +0000 (23:46 +0200)] 
termios.3: mention the integer types in SEE ALSO

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agocc_t.3type, speed_t.3type, tcflag_t.3type: document all together
наб [Mon, 29 Aug 2022 22:33:52 +0000 (00:33 +0200)] 
cc_t.3type, speed_t.3type, tcflag_t.3type: document all together

speed_t and tcflag_t were both unmentioned in general

Issue 7 has this to say:
  The <termios.h> header shall define the following data types through typedef:
    cc_t     Used for terminal special characters.
    speed_t  Used for terminal baud rates.
    tcflag_t Used for terminal modes.
  The above types shall be all unsigned integer types.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agolint-man.mk: Redirect groff output to stderr
Alejandro Colomar [Sun, 28 Aug 2022 11:30:42 +0000 (13:30 +0200)] 
lint-man.mk: Redirect groff output to stderr

groff(1) is being used to warn.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agocmd.mk, lint-man.mk: Use MANWIDTH instead of a hardcoded 80
Alejandro Colomar [Sun, 28 Aug 2022 11:18:54 +0000 (13:18 +0200)] 
cmd.mk, lint-man.mk: Use MANWIDTH instead of a hardcoded 80

Also need another variable set to MANWIDTH - 2, since troff needs
room for two extra characters for some reason.

Cc: Ralph Corderoy <ralph@inputplus.co.uk>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agolint-man.mk: Use ascii instead of utf8
Alejandro Colomar [Sun, 28 Aug 2022 10:56:49 +0000 (12:56 +0200)] 
lint-man.mk: Use ascii instead of utf8

This is relevant for tables, which will now use ASCIIart, instead
of pretty multi-byte characters which interfere with the
calculation of the line width.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agolint-man.mk: Use grep through its command variable
Alejandro Colomar [Sun, 28 Aug 2022 10:55:05 +0000 (12:55 +0200)] 
lint-man.mk: Use grep through its command variable

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agolint-man.mk: Remove highlighting in a more robust way
Alejandro Colomar [Sun, 28 Aug 2022 10:53:11 +0000 (12:53 +0200)] 
lint-man.mk: Remove highlighting in a more robust way

'grotty -c | col -bx' is more reliable, and far more readable.

Suggested-by: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agolint-man.mk: Specify the output device through a variable
Alejandro Colomar [Sun, 28 Aug 2022 10:34:25 +0000 (12:34 +0200)] 
lint-man.mk: Specify the output device through a variable

Suggested-by: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agolint-man.mk: Use a pipeline instead of the groff(1) wrapper
Alejandro Colomar [Sat, 27 Aug 2022 18:55:41 +0000 (20:55 +0200)] 
lint-man.mk: Use a pipeline instead of the groff(1) wrapper

This more explicitly shows how stuff really works, and allows
inspecting some intermediate steps in case it may be necessary.

Cc: Ralph Corderoy <ralph@inputplus.co.uk>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: <groff@gnu.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agolint-man.mk: Use UTF-8 output
Alejandro Colomar [Sat, 27 Aug 2022 19:07:18 +0000 (21:07 +0200)] 
lint-man.mk: Use UTF-8 output

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoman7/regex.7: change "\o'o\(ha'"to a real character "\(^o" (o circumflex)
Bjarni Ingi Gislason [Fri, 26 Aug 2022 22:11:51 +0000 (22:11 +0000)] 
man7/regex.7: change "\o'o\(ha'"to a real character "\(^o" (o circumflex)

  Use real accented characters instead of producing them by overstriking
the letter with the diacritic mark.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@vortex.is>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agolint-man.mk: Force groff(1) to use 80 columns
Alejandro Colomar [Fri, 26 Aug 2022 19:23:35 +0000 (21:23 +0200)] 
lint-man.mk: Force groff(1) to use 80 columns

Cc: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agopthread_setname_np.3: Rename 'len' to 'size'
Alejandro Colomar [Thu, 25 Aug 2022 22:04:12 +0000 (00:04 +0200)] 
pthread_setname_np.3: Rename 'len' to 'size'

The parameter doesn't represent a string length (strlen(3)), but a
buffer size (sizeof()).  Use a more proper name.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoconfstr.3: Rename 'len' to 'size'
Alejandro Colomar [Thu, 25 Aug 2022 20:15:17 +0000 (22:15 +0200)] 
confstr.3: Rename 'len' to 'size'

The parameter doesn't represent a string length (strlen(3)), but a
buffer size (sizeof()).  Use a more proper name.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>