| Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The glibc manual has always documented this behavior, but the
implementation differed, treating the field width as an upper limit.
Signed-off-by: Florian Weimer <fweimer@redhat.com>
Message-ID: <lhu1pli6tsj.fsf@oldenburg.str.redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The arguments to these APIs may be shorter than that, as long as they
are null terminated strings.
Reported-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
.d_ino and .st_ino
Suggested-by: Pali Rohár <pali@kernel.org>
Co-authored-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Pali Rohár <pali@kernel.org>
Co-authored-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: "Darrick J. Wong" <djwong@kernel.org>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: <linux-fsdevel@vger.kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This function was marked as legacy in POSIX.1-2001 and has been removed
from many systems, including glibc.
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Message-ID: <5924c3b09d8e373be6ac1b5ca663b8ad7d106d93.1750306917.git.collin.funk1@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The FreeBSD implementation of ptsname_r(2) returns -1 on error and sets
errno, instead of just returning the errno. Document this issue for
programs written with portability in mind.
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Message-ID: <37f138bc5c5e6604f0a0afcc531694387d2cc424.1749792527.git.collin.funk1@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Message-ID: <2d55b75480ae862a622ac46e7e6c7628f6efc45d.1747519811.git.collin.funk1@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Message-ID: <883d4a9b8cfb757a080710cf0133be5d0e12adce.1747515178.git.collin.funk1@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Alejandro Colomar <alx@kernel.org>
Cc: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Suggested-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Co-authored-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This behavior can be seen with the following example program:
$ cat main.c
#include <dirent.h>
#include <err.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
int
main(int argc, char *argv[argc+1])
{
DIR *d;
if (argc < 2)
errx(EXIT_FAILURE, "argc < 2");
d = opendir(argv[1]);
if (d == NULL)
err(EXIT_FAILURE, "opendir");
closedir(d);
exit(EXIT_SUCCESS);
}
$ cc -Wall -Wextra main.c
$ ./a.out $(printf '%0999d')
a.out: opendir: File name too long
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Message-ID: <4266061219d7406c0aa737f8d52108fea7e0f7fb.1760689006.git.collin.funk1@gmail.com>
[jwilk: simpler reproducer]
Cc: Jakub Wilk <jwilk@jwilk.net>
[alx: Fix style in the reproducer program]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Rename uimaxabs(3) => umaxabs(3). And add a link page.
Keep a link with the old name, so that programmers looking for the old
name are redirected to the new name, so they find what they need.
I've removed documentation for uimaxabs(3), instead of keeping
information in HISTORY, as it has only existed for one glibc version,
to avoid programmers being confused by the old name.
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3577.txt>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The "old" implementation led to priority inversion and was more or less
easy to trigger. It seems that after the rewrite the issue disappeared
especially since the old workaround does not apply anymore.
Add a note mentioning the old problem and why the issue is not gone
since the rewrite in glibc 2.25 but harder to trigger.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: André Almeida <andrealmeid@igalia.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Waiman Long <longman@redhat.com>
Message-ID: <20250915141305.906440-6-bigeasy@linutronix.de>
[alx: wfix, srcfix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Move getc(3) to a separate manual page, documenting the bugs
of this API, and recommending fgetc(3) instead. While the
relevant standards (ISO C and POSIX) don't deprecate this
API, let's deprecate it here.
Cc: <onf@disroot.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Remove spaces before a tab (except in a few cases).
Reported-by: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Most of these have been reported by 'make lint-man-dash'. A couple of
them were found manually.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
And fix related issues while at it.
Silence false positives with \&.
Reported-by: `make lint-man-semnl`
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3611.txt>
Link: <https://gitweb.git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=60b0949c939013bd8275fd9e6227014096d7c264>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3617.txt>
Link: <https://gitweb.git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=60b0949c939013bd8275fd9e6227014096d7c264>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: iwyu(1)
Fixes: 0e7a39804a3c (2025-08-20; "man/: EXAMPLES: Use err(3) and errc(3bsd) instead of similar macros")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Most of these are false positives, in the sense that a line break is
escaped, and the matching quote is in the next source line.
However, let's remove those escaped line breaks, which make reading the
source more difficult. For this, rename some parameters to be shorter,
and allow some lines to go slightly past the 80-column right margin.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There's also a domain error if z is a NaN, so let's simplify wording.
See the comments in the source code, which remind that POSIX doesn't
mandate some of this, so this is GNU-specific.
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Suggested-by: Adam Sampson <ats@offog.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: a82917ada050 (2025-03-30; "man/: srcfix (\fX => \f[X])")
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: d180b72135ab (2024-12-24; "man/man3/: Don't use 'length' to refer to buffer size")
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
These functions are quite portable. And if one doesn't have them for
some reason (but libbsd has been ported to many systems), one can write
them easily as macros, anyway.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The strftime example requires a format paramter. If you don't pass one,
it crashes. Check for the parameter.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Message-ID: <20250818174553.70132-1-dave@treblig.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3550.pdf#subsubsection.0.6.5.4.5>
Link: <https://thephd.dev/the-big-array-size-survey-for-c>
Link: <https://thephd.dev/the-big-array-size-survey-for-c-results>
Link: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117025>
Link: <https://github.com/llvm/llvm-project/issues/102836>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Make the example check for an executable name on the command line
rather than segfaulting in the child.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Message-ID: <20250818225910.101238-1-dave@treblig.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=219335>
Signed-off-by: Alex Tran <alex.t.tran@gmail.com>
Message-ID: <20250818042558.95341-1-alex.t.tran@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The current mallinfo2() example segfaults on 64bit Linux.
This happens because it builds a large 'alloc' array
on the stack, which is currently 2M entries, each of which
is a pointer, so hitting 16MB which is more than the default
Linux stack ulimit of 8MiB.
Reduce it.
Signed-off-by: "Dr. David Alan Gilbert" <dave@treblig.org>
Message-ID: <20250816204252.63616-1-dave@treblig.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
realloc{,array}(3)
Link: <https://nabijaczleweli.xyz/content/blogn_t/017-malloc0.html>
Link: <https://sourceware.org/pipermail/libc-alpha/1999-April/000956.html>
Link: <https://inbox.sourceware.org/libc-alpha/nbyurzcgzgd5rdybbi4no2kw5grrc32k63svf7oq73nfcbus5r@77gry66kpqfr/>
Link: <https://inbox.sourceware.org/libc-alpha/20241019014002.3684656-1-siddhesh@sourceware.org/T/#u>
Link: <https://inbox.sourceware.org/libc-alpha/qukfe5yxycbl5v7ooskvqdnm3au3orohbx4babfltegi47iyly@or6dgf7akeqv/T/#u>
Link: <https://github.com/bminor/glibc/commit/7c2b945e1fd64e0a5a4dbd6ae6592a7314dcd4b5>
Link: <https://github.com/llvm/llvm-project/issues/113065>
Link: <https://www.austingroupbugs.net/view.php?id=400>
Link: <https://www.austingroupbugs.net/view.php?id=526>
Link: <https://www.austingroupbugs.net/view.php?id=688>
Link: <https://sourceware.org/bugzilla/show_bug.cgi?id=12547>
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_400.htm>
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n868.htm>
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2438.htm>
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2464.pdf>
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3621.txt>
Link: <https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/functions/realloc.html>
Link: <https://pubs.opengroup.org/onlinepubs/9699919799.2013edition/functions/realloc.html>
Link: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120744>
Link: <https://lore.kernel.org/lkml/20220213182443.4037039-1-keescook@chromium.org/>
Link: <https://awakened1712.github.io/hacking/hacking-whatsapp-gif-rce/>
Link: <https://gbhackers.com/whatsapp-double-free-vulnerability/>
Cc: <bug-gnulib@gnu.org>
Cc: <musl@lists.openwall.com>
Cc: <libc-alpha@sourceware.org>
Cc: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
Cc: Paul Eggert <eggert@cs.ucla.edu>
Cc: Robert Seacord <rcseacord@gmail.com>
Cc: Elliott Hughes <enh@google.com>
Cc: Bruno Haible <bruno@clisp.org>
Cc: JeanHeyd Meneide <phdofthehouse@gmail.com>
Cc: Rich Felker <dalias@libc.org>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: Joseph Myers <josmyers@redhat.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Andreas Schwab <schwab@suse.de>
Cc: Thorsten Glaser <tg@mirbsd.de>
Cc: Eric Blake <eblake@redhat.com>
Cc: Vincent Lefevre <vincent@vinc17.net>
Cc: Mark Harris <mark.hsj@gmail.com>
Cc: Collin Funk <collin.funk1@gmail.com>
Cc: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Cc: DJ Delorie <dj@redhat.com>
Cc: Cristian Rodríguez <cristian@rodriguez.im>
Cc: Siddhesh Poyarekar <siddhesh@gotplt.org>
Cc: Sam James <sam@gentoo.org>
Cc: Mark Wielaard <mark@klomp.org>
Cc: "Maciej W. Rozycki" <macro@redhat.com>
Cc: Martin Uecker <ma.uecker@gmail.com>
Cc: Christopher Bazley <chris.bazley.wg14@gmail.com>
Cc: Eskil Steenberg <eskil@obsession.se>
Cc: Terence Kelly <tpkelly@eecs.umich.edu>
Cc: Daniel Krügler <daniel.kruegler@googlemail.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Valdis Klētnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Since exp is a library function, this is a reserved identifier, which
should not be used as a variable name / parameter.
Signed-off-by: Vincent Lefevre <vincent@vinc17.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
In future we might want to note that it's _not_ available on iOS/macOS
and the BSDs, since that's the caveat I usually give when recommending
the use of %m.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This is for consistency with wcpncpy(3).
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: d91506f8faa4 (1999-08-24, 2022-12-19; "man-pages 1.26")
Reported-by: Elliott Hughes <enh@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Previously, many people confused these for actual parameters, since it's
hard to distinguish a ',' from ';'. By removing bold/italics from
these, it will be easier to distinguish them.
The cases have been found with a script:
$ find -type f \
| xargs grep -l '^\.TH ' \
| sort \
| xargs mansect SYNOPSIS \
| man /dev/stdin \
| grep -e '^[^ ]' -e '[^ ]( [^ )].*[^)];' \
| less;
Reported-by: Mark Naughton <mnaughto@redhat.com>
Suggested-by: Mark Harris <mark.hsj@gmail.com>
Acked-by: Mark Naughton <mnaughto@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Put 4.2BSD first and mention that POSIX.1-2001 marked this function as
LEGACY.
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Message-ID: <fcc66f4d8694f933a71688ad529e6f4f43024658.1750646692.git.collin.funk1@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: Alex Celeste <alexg.nvfp@gmail.com>
Reported-by: Jorenar <dev@jorenar.com>
Suggested-by: "Fred J. Tydeman" <tydeman@tybor.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Steffen Nurpmeso <steffen@sdaoden.eu>
Message-ID: <f90b33d398ccf814083e300454df88e0937b94d3.1747784310.git.steffen@sdaoden.eu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The printf family of functions set errno if a negative value is returned.
Source is POSIX.1, see
<https://pubs.opengroup.org/onlinepubs/9799919799/functions/fprintf.html>
<https://pubs.opengroup.org/onlinepubs/9799919799/functions/fwprintf.html>
Also see manual pages of FreeBSD and OpenBSD.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Message-ID: <34octlcodbwm3kfqlouvrvhriiftmlzzobbohgzivlkgi53nfs@7gxajeb56klz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Scripted change:
$ grep -rl 'The authors of the Linux man-pages' \
| xargs sed -i '/Copyright, The authors of the Linux man-pages project/s/The/the/';
Reported-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
- Rename the file CREDITS => AUTHORS
- Say 'authors' in the copyright notice. Scripted change:
$ grep -rn 'The contributors to the Linux man-pages' -l \
| xargs sed -i '/Copyright, The contributors to the Linux man-pages project/s/contributors to/authors of/'
Suggested-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
And use 'pathname' in the descriptions.
'pathname' is the POSIXly correct term, and 'path' is a reasonable
abbreviation for it in parameter names.
Cc: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The type _Bool perfectly models these APIs. Conversion from any scalar
type to _Bool results in true if the value is non-zero, and false if it
is zero.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://lore.kernel.org/linux-man/jpin2dbnp5vpitnh7l4qmvkamzq3h3xljzsznrudgioox3nn72@57uybxbe3h4p/T/#u>
Link: <https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This information is better placed in the git logs, not in the source
code itself. For people interested in the old history of pages, before
we used git, they will probably look at old versions of these pages,
like for example man-pages-1.70, or the 'prehistory' branch, and there
they'll find these notes.
Keep the names and emails of contributors in a new CREDITS file.
Link: <https://lore.kernel.org/linux-man/jpin2dbnp5vpitnh7l4qmvkamzq3h3xljzsznrudgioox3nn72@57uybxbe3h4p/T/#u>
Link: <https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: bb8164dec0c4 (2020-10-22; "slist.3: ffix: Use man markup")
Signed-off-by: Solomon Tan <wjsota@icloud.com>
Message-ID: <20250420124447.1552510-2-wjsota@icloud.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This seems to be about implementation details that are unimportant to
programmers. It is widely understood that compilers may optimize some
libc calls.
Cc: Anton Zellerhoff <wg14@ascz.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: Anton Zellerhoff <wg14@ascz.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
C2Y adds unsigned versions of the abs functions (see C2Y draft N3467 and
proposal N3349). Support for these functions will be included in GCC 15
and glibc 2.42.
Link: <https://www.open-std.org/JTC1/SC22/WG14/www/docs/n3467.pdf>
Link: <https://www.open-std.org/JTC1/SC22/WG14/www/docs/n3349.pdf>
Link: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117024>
Link: <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=5b132ec2b7712dbc055838b3b538b83ad1196414>
Signed-off-by: Anton Zellerhoff <wg14@ascz.de>
Message-ID: <28a36070fe18707ab9fa26b91c88e6fd87a72097.1744566285.git.wg14@ascz.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
While doing this global change, fix other minor issues found nearby.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=64924422a99690d147a166b4de3103f3bf3eaf6c>
Reported-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
strtol(3) mentiones both, but this page somehow forgot the uppercase
variant.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Bruno Haible <bruno@clisp.org>
Co-authored-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://stackoverflow.com/questions/60955490/strtoul-what-is-the-correct-return-value-for-very-negative-strings>
Reported-by: Bruno Haible <bruno@clisp.org>
Co-authored-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Add the missing length requirement about MB_CUR_MAX to wcrtomb(3).
Change the wording on the MB_CUR_MAX requirement in wctomb(3). If
programmers know the wide character to convert beforehand, they are
allowed to use a buffer smaller than MB_CUR_MAX bytes, as long as it
"fits" the sequence.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Message-ID: <CADDzAfN7_kdv4iQtH=OpgSWtRuqOZXYhxsBiz_OF8Zqf-zy4_Q@mail.gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
array parameters
This syntax has been proposed for standardization in N3433.
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3433.pdf>
Cc: Christopher Bazley <chris.bazley.wg14@gmail.com>
Cc: Martin Uecker <uecker@tugraz.at>
Cc: Joseph Myers <josmyers@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
See the non-wide equivalent functions.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Askar Safin <safinaskar@zohomail.com>
Message-ID: <20250220091926.3985504-3-safinaskar@zohomail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
modern glibc wrapper cannot
I verified using an expirement (see below) that the modern glibc wrapper
getcwd() actually never returns "(unreachable)". I have also read the
modern glibc sources for all three functions documented here. None of
them return "(unreachable)".
Now let me describe my expirement:
d-user@comp:/tmp$ cat getcwd.c
#include <unistd.h>
#include <stdio.h>
#include <sys/syscall.h>
int
main(void)
{
char buf[1000];
if (syscall(SYS_getcwd, buf, sizeof(buf)) == -1)
perror("SYS_getcwd");
else
printf("SYS_getcwd: %s\n", buf);
if (getcwd(buf, sizeof(buf)) == NULL)
perror("getcwd");
else
printf("getcwd: %s\n", buf);
return 0;
}
d-user@comp:/tmp$ gcc -Wall -Wextra -o getcwd getcwd.c
d-user@comp:/tmp$ sudo unshare --mount bash
d-root@comp:/tmp# mkdir /tmp/dir
d-root@comp:/tmp# mount -t tmpfs tmpfs /tmp/dir
d-root@comp:/tmp# cd /tmp/dir
d-root@comp:/tmp/dir# umount -l .
d-root@comp:/tmp/dir# /tmp/getcwd
SYS_getcwd: (unreachable)/
getcwd: No such file or directory
d-root@comp:/tmp/dir# exit
exit
Link: <https://sourceware.org/bugzilla/show_bug.cgi?id=18203>
Link: <https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=52a713fdd0a30e1bd79818e2e3c4ab44ddca1a94>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Askar Safin <safinaskar@zohomail.com>
Message-ID: <20250220091926.3985504-2-safinaskar@zohomail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
- 0, not -1, is returned for an unsupported time base or error
(C23 7.29.2.6, 7.29.2.7; POSIX.1-2024 line 74358).
- Clarify that any supported value of base is always nonzero (i.e.,
there is no overlap between the two return value cases that may
require errno or some other source to disambiguate)
(C23 7.29.2.6, 7.29.2.7; POSIX.1-2024 line 74357).
- Clarify that timespec_getres(NULL, base) is a valid call to check
whether the specified time base is supported (C23 7.29.2.7).
- Clarify that the resolution for a particular time base is constant
for the lifetime of the process (i.e., there is no need to retrieve
it repeatedly) (C23 7.29.2.7).
- Calls to these functions are not technically equivalent to any
clock_* function call; at least the return value will be different.
Clarify that it is the time and resolution that are the same.
- The ERRORS section is removed, because it states only what is true
for every function that does not state otherwise (i.e., errno might
be affected by underlying system calls).
Fixes: 7bda5119fe5e (2024-09-08; "timespec_get.3, timespec_getres.3: Add page and link page")
Cc: наб <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Message-ID: <5f8dc5d2dc51f080a18de53e98610df43389b98b.1739063937.git.mark.hsj@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
GCC and Clang print warnings:
$ clang main.c -Wall
main.c:30:23: warning: format specifies type 'size_t' (aka 'unsigned long') but the argument has type 'unsigned int' [-Wformat]
30 | printf("#%zu:\n", i);
| ~~~ ^
| %u
1 warning generated.
$ gcc main.c -Wall
main.c: In function ‘main’:
main.c:30:16: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 2 has type ‘unsigned int’ [-Wformat=]
30 | printf("#%zu:\n", i);
| ~~^ ~
| | |
| | unsigned int
| long unsigned int
| %u
Fixes: b42296e4feaf (2022-09-15; "Various pages: EXAMPLES: Use unsigned types for loop iterators")
Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
Message-ID: <20250207211628.25164-1-arkadiusz@drabczyk.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
types
Due to different spacing, I had missed these ones in the previous
commits of this kind.
Suggested-by: Jorenar <dev@jorenar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
An exception of good taste is structure members. There, for alignment
reasons, traditional syntax seems more appropriate usually.
Suggested-by: Jorenar <dev@jorenar.com>
Cc: Martin Uecker <uecker@tugraz.at>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Add a space after a cast.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Specify the prototype consistently with open(2).
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
In pthreads.7 it says:
"For each of the pthreads functions that can return an error,
POSIX.1-2001 specifies that the function can never fail with the error
EINTR."
Link: <https://lore.kernel.org/linux-man/Z3W_qgawqyEB-QrA@comp../>
Cc: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
Message-ID: <20250103173816.6409-2-arkadiusz@drabczyk.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
For consistency with wide characters, say characters instead of bytes.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
And leave two spaces between the type name and the variable name.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Replace the prototypes by manual-page references, and use generic text
which doesn't use the names of the parameters. It's just an overview.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: ef53ef760638 (2024-12-18, "man/man3/getline.3: Clarify ERRORS")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Per <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bf079e19f50d64aa5e05b5e17ec29afab9aabb20>:
- this was set by bash 2.0 (1996-12)
(implemented in glibc b07c5668f672125074dd5b0b658145e1544120be)
- it's no longer set by bash 2.01 (1997-06) because it was bad
- glibc disabled this with no way to enable it in 2001-08
(518a0dd201c48a5c15d73c1919c304a9f8f5e3c1)
- glibc removed it in 2017 bf079e19f50d64aa5e05b5e17ec29afab9aabb20
So this was experienced by people for 5 months at best,
and could remotely be experienced for 3 years
(if you somehow wanted this bad behaviour and added it into your shell),
over 20 years ago.
No modern reader (or, frankly, non-modern reader)
has ever used this, or could use it, really.
Link to the removal note for completeness only.
Link: <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bf079e19f50d64aa5e05b5e17ec29afab9aabb20>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-Id: <dwfybzlb5ydbsc4puo6igj7nm7iregquv6hxhhqb53bwrvqswb@tarta.nabijaczleweli.xyz>
[alx: Add break points in URI; minor tweaks to commit message too]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Elliott Hughes <enh@google.com>
Message-ID: <CAJgzZoruFUg6X=JUNJXCbBOKs13SX=dsNFNdTMct2VecUFG=ww@mail.gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Compare, given:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int compar(const char **l, const char **r) {
return strverscmp(*l, *r);
}
int main(int argc, char ** argv) {
qsort(argv + 1, argc - 1, sizeof(*argv), compar);
for(int i = 1; i < argc; ++i)
puts(argv[i]);
}
yields:
$ /bin/ls -v1 a* # coreutils ls
a-1.0a
a-1.0.1a
$ ../vers a* # as above
a-1.0.1a
a-1.0a
$ ls -v1 a* # voreutils ls @ 5781698 with strverscmp()-equivalent sorting
a-1.0.1a
a-1.0a
compare also the results for real data like
netstat-nat-1.{0,1{,.1},2,3.1,4{,.{1,2,3,4,5,6,7,8,9,10}}}.tar.gz
Thus, coreutils ls -v (and sort -V) does NOT use strverscmp(3);
it uses a modified Debian version comparison algorithm with additional
suffix processing and `ls -v`-specific exceptions.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-Id: <myuppkwnltqtxduoop7g7wfuyou5cdo6sotocrvyztmqnazvph@tarta.nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Jorenar <dev@jorenar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The old syntax with empty parentheses has been removed from the language
in C23.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: ba687b00ecb3 (2023-07-30, "man3/: srcfix")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Use 'length' for the lenght of a string.
Use 'n' for the number of elements.
Use 'size' for the number of bytes. (And in wide-character string
functions, 'size' also refers to the number of wide characters.)
The change is quite large, and I might have made some mistakes.
But overall, this should improve consistency in use of these terms.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Improve description of %a format.
The description of the %a/%A specifiers in the printf(3) man page
could stand some improvement. In particular, it is not clear from the
current document what base is used for the "p±d" part of the format.
It can be inferred from the nature of %a that the base should be a power
of two. And it can be further inferred from the nature of hexadecimal
floating-point literals in C (as specified by C99 and later) that the
base must exactly be the number two, but it would be helpful for the
printf(3) man page to state this explicitly. My first expectation when
reading the man page was that the exponent would be taken in base 16;
after experimentation my second thought was that it would be base
FLT_RADIX (which is 2 on IEEE 754 floating-point systems, but 16 on
S/390). Only by going back to the standard [1] could I determine that
the exponent in p-notation must always be taken from a base of 2.
Link: [1] POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/printf.html>
Cc: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Ken Pizzini <ken@gnu.org>
Message-ID: <b932f13642502e063ef139d57b8f3c496023bf4a.1731707666.git.ken@gnu.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Improve terminology in %a description
The term "decimal point" does not technically apply when using bases
other than 10; the more generic term is "radix point". Update the
description of the a/A conversion specifier (i.e., for hexadecimal
floating point output) in printf(3) to use this terminology.
I do note that POSIX.1-2024 [1] does use the term "decimal-point
character" here, but I still maintain that using "radix point" is a
better term for that object in the %a description. (Confusingly, POSIX
does refer to "radix character" in the descriptions of %f and %e, where
reference to "decimal" instead of "radix" would actually make sense.)
Link: [1] <https://pubs.opengroup.org/onlinepubs/9799919799/functions/printf.html>
Signed-off-by: Ken Pizzini <ken@gnu.org>
Message-ID: <db91cc6f-93cc-4e99-806c-7a8b86232848@vagg4fs7.msa.explicate.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
nmemb is a pointer, so it needs to be dereferenced to calculate the size
of the array.
Reported-by: Martin Uecker <uecker@tugraz.at>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Antti Antinoja <antti@c1.fi>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Jona Christopher Sahnwaldt <jcsahnwaldt@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-ID: <lacitlat2jwybavkgkmmsxfbzcbz532uihejn5k2boe2x5eyyy@tarta.nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Convert from unfilled text using `nf` and `fi` requests to `IP` macro
calls and tbl(1) tables.
This change increases the item indentation slightly, as I elected not to
specify one in the `IP` calls. The content still fits easily in an
80-column terminal.
The reason for this change is to make the man page cross references
susceptible to scripted rewriting (and ultimately to make them
hyperlinkable). See, e.g.,
<https://lore.kernel.org/linux-man/20240831182027.b6pduwkthk5b3tcf@illithid/>.
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Message-ID: <20240901032513.afty634vpnhe24zi@illithid>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Prepare for `MR` macro migration.
Migrate table entries from using font selection escape sequences to font
alternation macros to set man page cross references.
This change was automatically driven by the following sed(1) script.
$ cat fix-man-page-refs-in-tbl-tables-2.sed
# Rewrite man page cross references on tbl(1) rows that
# precede text blocks to themselves use text blocks,
# and convert them to use man(7) macros
# instead of troff(1) font selection escape sequences
# (which cannot be done outside a text block).
/^\.\\"/b
/^\\fB[^\\]*\\fP([0-9][a-z]*).*T{/s/\\fB\([^\\]*\)\\fP\(([0-9][a-z]*)\)\(.*\)/T{\
.BR \1 \2\
T}\3/
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Message-ID: <20240831182027.b6pduwkthk5b3tcf@illithid>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
NetBSD has tzalloc(3), which returns NULL to report invalid tme zones.
Cc: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This example documents how to detect some corner cases of mktime(3),
such as DST transitions and other jumps in the calendar.
Link: <https://www.redhat.com/en/blog/brief-history-mktime>
Cc: DJ Delorie <dj@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Handling of "invalid" values for tm_isdst is not clearly specified
in any standard, and implementations vary as to how they react when you
(for example) pass tm_isdst=1 at a time when DST is not in effect.
Add a note about this, and a suggestion for a workaround.
I go into further detail about this in the link below.
Link: <https://www.redhat.com/en/blog/brief-history-mktime>
Cc: Paul Eggert <eggert@cs.ucla.edu>
Cc: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: DJ Delorie <dj@redhat.com>
Message-ID: <xncylqiznb.fsf@greed.delorie.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
First added in glibc 2.36, backported upstream to glibc 2.34,
so mention 2.34.1 for the first version.
Signed-off-by: Florian Weimer <fweimer@redhat.com>
Message-ID: <87o75chpwb.fsf@oldenburg.str.redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
-1 is a valid successful time_t, for one second before the Epoch. And
mktime(3) is allowed (like most libc calls) to set errno on success.
This makes it impossible to determine errors from the return value or
errno.
ISO C specifies that tp->tm_wday is unmodified after a failed call, and
puts an example where this is used to determine errors. It is indeed
the only way to check for errors from this call.
Document this detail in the RETURN VALUE section, add a CAVEATS section
that warns about this, and write an example program that shows how to
properly call this function.
Most code I've been able to find in several search engines either
doesn't check for errors after mktime(3), or checks them incorrectly, so
this documentation should help fix those.
This is guaranteed since ISO C23 and POSIX.1-2024. Prior to those
standards, there was no standard way to check for errors. However,
there are no known implementations that do not conform to this.
Link: <https://lore.kernel.org/linux-man/20240823131024.GD2713@cventin.lip.ens-lyon.fr/T/#t>
Link: <https://lore.kernel.org/linux-man/6un6baaq5tez23irtycuvzqtuh7a4sdrf2px7tnyb3y6iqoxmq@2ofln4cd27ep/T/#t>
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3147.txt>
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3148.doc>
Link: <https://austingroupbugs.net/view.php?id=1614>
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3220.pdf#subsubsection.7.29.2.3>
Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Cc: Vincent Lefevre <vincent@vinc17.net>
Cc: DJ Delorie <dj@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Xi Ruoyao <xry111@xry111.site>
Cc: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
Cc: "Robert C. Seacord" <rcseacord@gmail.com>
Cc: Jens Gustedt <jens.gustedt@inria.fr>
Cc: Robert Elz <kre@munnari.oz.au>
Cc: Andrew Josey <ajosey@opengroup.org>
Cc: Geoff Clare <gwc@opengroup.org>
Cc: Hans Åberg <haberg-1@telia.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Cc: Austin Group <austin-group-l@opengroup.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 1838a55edd6c47cb ("regex.3: Desoupify regexec() description")
Signed-off-by: Dirk Gouders <dirk@gouders.net>
Message-ID: <20240813185011.3806-1-dirk@gouders.net>
Reviewed-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Morten Welinder <mwelinder@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The current "If x is 0" condition is a bit misleading because "is"
is not the equality test (just like when saying "x is NaN") and 0
as a FP number stands for +0, while this condition should apply to
both -0 and +0.
Replace this condition by "If x is +0 or -0".
Replace "Nan" by "NaN" (typography used everywhere else).
Cc: Dave Kemper <saint.snit@gmail.com>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: Damian McGuckin <damianm@esi.com.au>
Cc: John Gardner <gardnerjohng@gmail.com>
Signed-off-by: Vincent Lefevre <vincent@vinc17.net>
Message-ID: <20240808115610.GC2669@cventin.lip.ens-lyon.fr>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Vincent Lefevre <vincent@vinc17.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Keith Thompson <Keith.S.Thompson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
These are not bugs at all. It's a good API.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
We already document that it's a BSD function, not in any standard.
No need to worry programmers much more than that.
We have STANDARDS for that.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: gcc(1) (`make build-ex-cc`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: gcc(1) (`make build-ex-cc`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Follow the pattern to replace "to indicate the cause of the error"
with "to indicate the error".
Suggested-by: Alejandro Colomar <alx@kernel.org>
Acked-by: Günther Noack <gnoack@google.com>
Cc: Mickaël Salaün <mic@linux.microsoft.com>
Cc: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
Message-ID: <20240712172246.151258-1-pvorel@suse.cz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Every system I looked at already had FNM_CASEFOLD,
so calling it "GNU" is misleading at best;
Solaris (and the illumos gate) call it FNM_IGNORECASE
but also provide FNM_CASEFOLD as an alias.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-ID: <2lnvud6qnttulm34ns3lsrafguzrdjdgnnnp4yrlsdl6c2yoef@tarta.nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-ID: <atyx4os7275jhfsrnblyr6ykxwghjzdpdnvnrvxcskei7kbb6n@tarta.nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
riscv_flush_icache() has been present in syscall.2, but had no page for
itself. Add the page for this syscall.
The syscall is named riscv_flush_icache(), but the glibc function is
named __riscv_flush_icache(). To handle this, name the syscall page
riscv_flush_icache.2 and point to the libc page __riscv_flush_icache.3.
Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Message-ID: <20240701-flush_icache-v2-1-15f7a35a0d13@rivosinc.com>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: ce23e8188f8f ("fmod.3: Add example section")
Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=219017>
Reported-by: Benjamin Otte <otte@gnome.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
As it stands, this is worse than useless
(defined as: I had to test it explicitly against strfmon() and look at
POSIX myself to make sure the manual wasn't lying to me
https://101010.pl/@nabijaczleweli/112694726416515899):
No-one cares if some compiler doesn't understand something from 1994.
(Careful readers will note it's been 30 years.)
"SUSv2 doesn't have this, SUSv3 does" is reefer-induced:
this figures in SUSv1 (XPG Issue 4 Version 2)
and the CHANGE HISTORY clearly notes ' was added in i4, not i4v2.
It's important that these aren't actually grouped by the thousand,
but, instead, by "what the locale says".
Each locale has two groupings: monetary and non-monetary,
and it's paramount to indicate which is which
(hi_IN is 3,2... monetary and 3... non-monetary;
mjw_IN is 3,2... both).
It waxes poetic for way too long about "how to set a locale".
Also replace "The Single UNIX Specification adds" with "POSIX adds".
The SUS is, on a good day, a profile of POSIX you pay 300$ for.
Maybe you could swing this back when it was an "extension"
(so, only required in the SUS profile)
but it's just shaded CX ("this is intentionally different from C")
in Issue 8. It's really irrelevant here.
Also add this to HISTORY
(and call it something sane there;
the Proper nomenclature is absolutely meaningless to normal people).
The most important bit for every HISTORY reader is the 1994 date.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-ID: <o2vchme4dchemjo4diziac5rlmhtsaze2yi72fzo5r67umlwny@tarta.nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This mirrors str[n]casecmp and is much more useful,
but more importantly these didn't crosslink at all.
The RETURN VALUE section is now copied from strncasecmp.3.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-ID: <wr4xqnhilpx7yszqxcggo7scpt3bnrfha3ohfs6uxwibhfafel@tarta.nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY:
Reorganize sections") results in a few problems with setjmp(3):
1. "Feature Test Macro Requirements for glibc" refers to NOTES, while
those macros are now described in HISTORY.
2. The discussion about saving signal mask is now split between HISTORY
and NOTES.
Fix the references accordingly.
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Message-ID: <20240616201946.1663626-1-kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There are references to NOTES section, but since the commit 4131356cd
("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize
sections") the relevant information is in VERSIONS.
While at it, unify the "see XXX" style.
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Message-ID: <20240616201323.1662948-1-kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
And remove them from XFAIL, since they don't fail anymore.
Reported-by: mandoc(1) (`make lint-man-mandoc`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Since the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY:
Reorganize sections"), the discussion about n-char-sequence refers to
NOTES, while the relevant information is now in VERSIONS.
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Message-ID: <20240616011920.1627949-12-kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There is a reference to NOTES section, which no longer exists since
the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY:
Reorganize sections").
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Message-ID: <20240616011920.1627949-11-kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There is a reference to NOTES section, which no longer exists since
the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY:
Reorganize sections").
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Message-ID: <20240616011920.1627949-10-kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There is a reference to NOTES section, which no longer exists since
the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY:
Reorganize sections").
Currently, the relevant information is kind of split between VERSIONS
and HISTORY, but VERSIONS is somewhat more relevant.
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Message-ID: <20240616011920.1627949-9-kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There is a reference to NOTES section, which no longer exists since
the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY:
Reorganize sections").
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Message-ID: <20240616011920.1627949-6-kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY:
Reorganize sections") removed the NOTES section from floor(3), moving
the explanation of overflow errors to HISTORY.
The very same explanation is also there in ceil(3), rint(3), and
round(3). Let's move it to HISTORY as well, for uniformity.
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Message-ID: <20240616011920.1627949-5-kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There are references to NOTES section, which no longer exists since
the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY:
Reorganize sections").
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Message-ID: <20240616011920.1627949-3-kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There is a reference to NOTES section, which no longer exists since
the commit 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY:
Reorganize sections").
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Message-ID: <20240616011920.1627949-2-kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Scripted change:
$ find man -type f \
| xargs grep -l '\\e' \
| xargs sed -i 's/\\e/\\[rs]/g';
Link: <https://lore.kernel.org/linux-man/20240611122453.qn6jyl4go4bvwkqm@illithid/>
Suggested-by: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Message-ID: <20240611153005.3066-11-eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Message-ID: <20240611153005.3066-10-eggert@cs.ucla.edu>
Co-developed-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Message-ID: <20240611153005.3066-8-eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Message-ID: <20240611153005.3066-7-eggert@cs.ucla.edu>
[alx: \fI => .I]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Message-ID: <20240611153005.3066-6-eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Message-ID: <20240611153005.3066-5-eggert@cs.ucla.edu>
[alx: use mathematical notation for the range, and \fI => .I]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Message-ID: <20240611153005.3066-4-eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
New section CAVEATS for why time zone state is dicey.
Message-ID: <20240611153005.3066-3-eggert@cs.ucla.edu>
[alx: use .I instead of \fI]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Message-ID: <20240611153005.3066-2-eggert@cs.ucla.edu>
[alx: use em dashes instead of commas]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
* man/man3/ctime.3: Simplify by referring to tzset(3) for details
about how it sets tzname etc. This simplifies a later patch,
which changes tzset(3)'s description.
Message-ID: <20240611153005.3066-1-eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Like the unlockpt(3) function, grantpt(3) requires _XOPEN_SOURCE to be
defined before including stdlib.h.
unlockpt.3 explicitly shows this requirement in its SYNOPSIS:
SYNOPSIS
#define _XOPEN_SOURCE
#include <stdlib.h>
int unlockpt(int fd);
But grantpt.3 did not:
SYNOPSIS
#include <stdlib.h>
int grantpt(int fd);
Message-ID: <20240526064227.937757-1-torreemanuele6@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
function
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://github.com/include-what-you-use/include-what-you-use/pull/1283>
Link: <https://github.com/include-what-you-use/include-what-you-use/pull/1344>
Reported-by: iwyu(1) (`make lint-c-iwyu`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This is a scripted change:
$ mkdir man/;
$ mv man* man/;
$ ln -st . man/man*;
$ find share/mk/ -type f \
| xargs grep -l '^MANDIR *:=' \
| xargs sed -i '/^MANDIR *:=/s,$,/man,';
$ find share/mk/dist/ -type f \
| xargs grep -l man \
| xargs sed -i 's,man%,man/%,g';
Link: <https://lore.kernel.org/linux-man/YxcV4h+Xn7cd6+q2@pevik/T/>
Cc: Petr Vorel <pvorel@suse.cz>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
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>
|
|
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>
|