aboutsummaryrefslogtreecommitdiffstats
path: root/man/man3
AgeCommit message (Collapse)AuthorFilesLines
9 daysman/man3/getopt_long*.3: Split getopt_long_only() from getopt_long(3)HEADmasterAlejandro Colomar2-21/+61
Signed-off-by: Alejandro Colomar <alx@kernel.org>
9 daysman/man3/getopt_long.3: SYNOPSIS: Simplify feature test macroAlejandro Colomar1-11/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
9 daysman/man3/getopt*.3: Split getopt_long*() from getopt(3)Alejandro Colomar3-222/+265
Signed-off-by: Alejandro Colomar <alx@kernel.org>
9 daysman/man3/*s*printf.3: Split [v]sprintf() from snprintf(3)Alejandro Colomar3-80/+112
Signed-off-by: Alejandro Colomar <alx@kernel.org>
9 daysman/man3/*printf.3: Split *s*printf() from printf(3)Alejandro Colomar5-220/+327
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-12-01man/man3/strtol.3: Use _Maxof(3) and _Minof(3) instead of macros from <limits.h>Alejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-12-01man/man3/_Minof.3: Add link pageAlejandro Colomar1-0/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-12-01man/man3/_Maxof.3: Add pageAlejandro Colomar1-0/+51
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-12-01man/man3/sscanf.3: Document exact matching for %cFlorian Weimer1-0/+7
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>
2025-11-24man/man3/: {str,wcs}n{cmp,len}(3): Remove array parameter length expressionsAlejandro Colomar4-8/+4
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>
2025-11-09man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about ↵Alejandro Colomar1-1/+18
.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>
2025-11-09man/: Use '.member' notation for referring to struct/union membersAlejandro Colomar1-22/+22
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man3/ftime.3: SYNOPSIS: Declare ftime with [[deprecated]]Collin Funk1-1/+1
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>
2025-10-29man/man3/ptsname.3: VERSIONS: Document ptsname_r(3) incompatibility on FreeBSDCollin Funk1-1/+1
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>
2025-10-29man/man3*/: STANDARDS: Update APIs for POSIX.1-2024Alejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man3/getenv.3: Mention secure_getenv() was standardized in POSIX-1.2024Collin Funk1-3/+3
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>
2025-10-29man/man3/ptsname.3: Mention ptsname_r() was standardized in POSIX-1.2024Collin Funk1-7/+6
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>
2025-10-29man/man3/_Fork.3: Document _Fork()Alejandro Colomar1-0/+29
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man3/alloca.3: wfixAlejandro Colomar1-4/+7
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>
2025-10-29man/man3/opendir.3: ERRORS: Document that long file names result in ENAMETOOLONGCollin Funk1-0/+4
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>
2025-10-28man/man3/[umax]abs.3: Document umaxabs(3)Alejandro Colomar2-6/+9
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>
2025-10-16man/man3/pthread_cond_init.3: CAVEATS: Add a note regarding real-time usageSebastian Andrzej Siewior1-0/+24
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>
2025-10-10man/man3/[f]getc.3: Document that getc(3) should not be usedAlejandro Colomar2-14/+50
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>
2025-10-05man/: ffixAlejandro Colomar2-8/+8
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>
2025-09-25man/: ffix (escape dashes)Alejandro Colomar4-9/+9
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>
2025-09-21man/: Use semantic newlinesAlejandro Colomar164-796/+1270
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>
2025-09-20man/: EXAMPLES: Use NITEMS() consistentlyAlejandro Colomar5-15/+15
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-20man/man3/streq.3: Add pageAlejandro Colomar1-0/+52
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>
2025-09-20man/man3/memeq.3: Add pageAlejandro Colomar1-0/+56
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>
2025-09-09man/: EXAMPLES: Fix includesAlejandro Colomar2-2/+0
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>
2025-09-07man/: Address diagnostic about mismatched quotesAlejandro Colomar25-122/+111
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>
2025-09-07man/man3/cfree.3: pfixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-06man/man3/fma.3: ERRORS: Add missing errorAlejandro Colomar1-2/+2
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>
2025-09-06man/man3/login.3: ffixAlejandro Colomar1-8/+26
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-06man/man3/stdin.3: tfixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-06man/: ffixAlejandro Colomar1-2/+2
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>
2025-09-06man/man3/gethostbyname.3: Fix reference to function parameterAlejandro Colomar1-1/+1
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>
2025-09-06man/man3/gnu_get_libc_version.3: grfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-06man/man3/malloc.3: STANDARDS: wfixAlejandro Colomar1-2/+2
Suggested-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-08-24man/man3/pthread_mutexattr_getpshared.3: ffixAlejandro Colomar1-1/+2
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-08-24man/man3/random_r.3: pfixAlejandro Colomar1-2/+2
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-08-20man/: EXAMPLES: Use err(3) and errc(3bsd) instead of similar macrosAlejandro Colomar16-140/+98
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>
2025-08-19man/man3/strftime.3: EXAMPLES: Validate number of argumentsDr. David Alan Gilbert1-0/+5
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>
2025-08-19man/man3/countof.3: Add pageAlejandro Colomar1-0/+35
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>
2025-08-19man/man3/posix_spawn.3: EXAMPLES: Validate the number of argumentsDr. David Alan Gilbert1-0/+5
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>
2025-08-19man/man3/sem_post.3: ERRORS: Clarify EOVERFLOWAlex Tran1-1/+2
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>
2025-08-19man/man3/mallinfo.3: Reduce MAX_ALLOCSDr. David Alan Gilbert1-1/+1
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>
2025-08-10man/man3/setlocale.3: SYNOPSIS: Use _NullableAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-21man/man3/malloc.3: STANDARDS: tfix, ffixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-20man/man3/malloc.3: STANDARDS, HISTORY, BUGS: Clarify (non)conformance of ↵Alejandro Colomar1-2/+80
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>
2025-07-19man/: Replace reserved exp identifierVincent Lefevre4-38/+38
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>
2025-07-19man/man3/printf.3: Mention Android's %m support.Elliott Hughes1-1/+2
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>
2025-07-11man/man3/stpncpy.3: RETURN VALUE: wfixAlejandro Colomar1-1/+3
This is for consistency with wcpncpy(3). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-11man/man3/wcpncpy.3: RETURN VALUE: Fix incorrect wordingAlejandro Colomar1-2/+4
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>
2025-06-28man/: SYNOPSIS: Don't highlight forward declarations of function parametersAlejandro Colomar95-162/+162
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>
2025-06-28man/man3/ftime.3: Reorder and clarify STANDARDSCollin Funk1-2/+3
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>
2025-06-28man/man3/malloc.3: Shorten parameter name (s/ptr/p/)Alejandro Colomar1-17/+17
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-06-08man/man3/scalb*.3: NAME: Document the meaning of the name of these functionsAlejandro Colomar2-3/+4
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>
2025-06-05man/man3/inet_net_pton.3: SYNOPSIS: ffixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-06-05man/man3/: Shorten parameter namesAlejandro Colomar2-13/+13
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-06-05man/: SYNOPSIS: Use array notationAlejandro Colomar3-5/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-21man/man3/mbrtowc.3: RETURN VALUE: Tweak description of -2 returnSteffen Nurpmeso1-3/+3
Signed-off-by: Steffen Nurpmeso <steffen@sdaoden.eu> Message-ID: <f90b33d398ccf814083e300454df88e0937b94d3.1747784310.git.steffen@sdaoden.eu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-21man/man3/*printf.3: Document ERRORSTobias Stoeckmann3-4/+58
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>
2025-05-17*: grfixAlejandro Colomar586-587/+587
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>
2025-05-10*, AUTHORS: Consistently refer to authorsAlejandro Colomar586-587/+587
- 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>
2025-05-09man/: Consistently use 'path' for parameters referring to pathnamesAlejandro Colomar6-24/+24
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>
2025-05-08man/man3/[static_]assert.3: SYNOPSIS: Use 'bool' instead of 'scalar'Alejandro Colomar2-4/+5
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>
2025-05-06*, CREDITS: Unify copyright noticesAlejandro Colomar586-877/+629
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>
2025-05-06man/, CREDITS: Move in-source contribution records to CREDITSAlejandro Colomar360-2024/+15
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>
2025-04-22man/man3/slist.3: SYNOPSIS: Add missing argumentSolomon Tan1-1/+1
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>
2025-04-14man/man3/abs.3: Remove NOTES sectionAlejandro Colomar1-16/+0
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>
2025-04-14man/man3/abs.3: Reorganize pageAlejandro Colomar1-58/+39
Cc: Anton Zellerhoff <wg14@ascz.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-04-14man/man3/abs.3: Document u{,l,ll,imax}abs()Anton Zellerhoff5-10/+57
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>
2025-03-31man/man3/: Use 'path' instead of 'pathname' for parametersAlejandro Colomar7-39/+37
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-03-31man/man3/mkfifo.3: PATH_MAX limits the size, not the lengthAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-03-30man/: srcfix (\fX => \f[X])Alejandro Colomar170-1007/+2364
While doing this global change, fix other minor issues found nearby. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-03-23man/man3/strto[u]l.3: C23 added "0b" and "0B"Alejandro Colomar2-6/+26
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>
2025-03-23man/man3/strtoul.3: The prefix "0X" is equivalent to "0x"Alejandro Colomar1-1/+1
strtol(3) mentiones both, but this page somehow forgot the uppercase variant. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-03-23man/man3/strtol.3: CAVEATS: Clarify how to perform range checksAlejandro Colomar1-0/+14
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>
2025-03-23man/man3/strto[u]l.3: BUGS: Signed numbers and white space are not rejectedAlejandro Colomar2-5/+20
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>
2025-03-20man/man3/wc{,r}tomb.3: wfix regarding MB_CUR_MAXKang-Che Sung2-3/+13
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>
2025-03-14man/: SYNOPSIS: Use GNU forward-declarations of parameters for sizes of ↵Alejandro Colomar94-249/+396
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>
2025-03-14man/: EXAMPLES: Add missing 'static'Alejandro Colomar3-7/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-03-14man/man3/: SYNOPSIS: Fix incorrect array parametersAlejandro Colomar3-3/+3
See the non-wide equivalent functions. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-02-24man/man3/static_assert.3: EXAMPLES: Remove unused includeAlejandro Colomar1-1/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-02-20man/man3/getcwd.3: tfix (pathname => pathnames)Askar Safin1-1/+1
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>
2025-02-20man/man3/getcwd.3: VERSIONS: The syscall can return "(unreachable)", but ↵Askar Safin1-1/+4
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>
2025-02-18man/man3/ctime.3: Mention that timegm(3) is a UTC equivalent of mktime(3)Alejandro Colomar1-0/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-02-10man/man3/timespec_get.3: Correct return value and clarify descriptionMark Harris1-26/+37
- 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>
2025-02-10man/man3/regex.3: EXAMPLES: Don't use z length modifier with unsigned intArkadiusz Drabczyk1-1/+1
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>
2025-01-11man/man3/: SYNOPSIS: Use typeof() to improve readability of function pointer ↵Alejandro Colomar2-2/+2
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>
2025-01-05man/: Use typeof() to improve readability of function pointer typesAlejandro Colomar4-13/+13
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>
2025-01-05man/man3/: EXAMPLES: wsfixAlejandro Colomar1-1/+1
Add a space after a cast. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-01-05man/man3/: EXAMPLES: Remove unnecessary parenthesesAlejandro Colomar3-3/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-01-05man/man3/sem_open.3: SYNOPSIS: This is a variadic functionAlejandro Colomar1-3/+2
Specify the prototype consistently with open(2). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-01-04man/man3/pthread_cond_init.3: Remove EINTR error codeArkadiusz Drabczyk1-3/+0
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>
2024-12-24man/man3/: Don't use 'length' to refer to buffer sizeAlejandro Colomar17-106/+106
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-12-24man/man3/stdio_ext.3: wfixAlejandro Colomar1-1/+1
For consistency with wide characters, say characters instead of bytes. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-12-24man/man3/{stdin,stdio}.3: SYNOPSIS: Consistently declare as 'extern' variablesAlejandro Colomar2-6/+6
And leave two spaces between the type name and the variable name. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-12-22man/man3/string.3: SYNOPSIS: SimplifyAlejandro Colomar1-150/+76
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>
2024-12-20man/man3/getline.3: wfixAlejandro Colomar1-2/+2
Fixes: ef53ef760638 (2024-12-18, "man/man3/getline.3: Clarify ERRORS") Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-12-19man/man3/getopt.3: Remove _<PID>_GNU_nonoption_argv_flags_ descriptionAhelenia Ziemiańska1-9/+6
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>
2024-12-18man/man3/getline.3: Clarify ERRORSenh1-4/+6
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>
2024-12-16man/man3/strverscmp.3: This is NOT the ordering used by ls -vAhelenia Ziemiańska1-15/+8
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>
2024-12-13man/: SYNOPSIS: Use typeof() to improve readability of function pointer typesAlejandro Colomar24-61/+70
Suggested-by: Jorenar <dev@jorenar.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-12-13man/man3/makecontext.3: SYNOPSIS: Add ellipsis to function typeAlejandro Colomar1-3/+3
The old syntax with empty parentheses has been removed from the language in C23. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-12-11man/man3/isalpha.3: tfixAlejandro Colomar1-12/+12
Fixes: ba687b00ecb3 (2023-07-30, "man3/: srcfix") Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-19alloca.3: Clarify that alloca(3)ted space is deallocated when the caller returnsAlejandro Colomar1-1/+2
Reported-by: Pali Rohár <pali@kernel.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17man/: Terminology consistency reforms (n, size, length)Alejandro Colomar26-143/+142
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>
2024-11-17wcwidth.3: Rename function parameterAlejandro Colomar1-6/+6
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17fmod.3: ffixAlejandro Colomar1-1/+3
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17remquo.3: pfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17sscanf.3: wfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17sscanf.3: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17sscanf.3: ffixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17man/: tfixAlejandro Colomar3-3/+3
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17scanf.3: pfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17getrpcent_r.3: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17log1p.3: pfixAlejandro Colomar1-2/+2
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17printf.3: wfixKen Pizzini1-2/+5
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>
2024-11-17printf.3: wfixKen Pizzini1-2/+2
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>
2024-11-14lsearch.3: Dereference 'nmemb' pointerAlejandro Colomar1-2/+2
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>
2024-11-13pthread_cond_init.3: tfixAlejandro Colomar1-1/+1
Reported-by: Antti Antinoja <antti@c1.fi> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-05pthread_cancel.3: tfixAlejandro Colomar1-1/+1
Reported-by: Jona Christopher Sahnwaldt <jcsahnwaldt@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-03man/: EXAMPLES: Fix includesAlejandro Colomar3-2/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-09-08timespec_get.3, timespec_getres.3: Add page and link pageнаб2-0/+89
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Message-ID: <lacitlat2jwybavkgkmmsxfbzcbz532uihejn5k2boe2x5eyyy@tarta.nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-09-01wctrans.3, wctype.3: srcfixG. Branden Robinson2-20/+22
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>
2024-08-31man/: srcfixG. Branden Robinson1-59/+177
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>
2024-08-30tzset.3: CAVEATS: Document the inability of tzset() to report errorsAlejandro Colomar1-0/+3
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>
2024-08-30ctime.3: EXAMPLES: Document how to detect invalid or ambiguous timesAlejandro Colomar1-1/+77
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>
2024-08-30ctime.3: CAVEATS: Add note about tm_isdst handling in mktime(3)DJ Delorie1-0/+39
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>
2024-08-28dlinfo.3: Document the RTLD_DI_PHDR requestFlorian Weimer1-1/+14
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>
2024-08-24ctime.3: Move NOTES to a subsection within CAVEATSAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-23ctime.3: Document how to check errors from mktime(3)Alejandro Colomar1-1/+103
-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>
2024-08-21regex.3: *preg is initialized with regcomp(), not regexec()Dirk Gouders1-1/+1
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>
2024-08-21fmod.3: Fix exampleAlejandro Colomar1-1/+1
Reported-by: Morten Welinder <mwelinder@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-21nextup.3: wfix + tfixVincent Lefevre1-3/+4
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>
2024-08-21tzset.3: srcfix (semantic newlines)Alejandro Colomar1-2/+3
Reported-by: Vincent Lefevre <vincent@vinc17.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-07-31memccpy.3: Clarify that the delimiter is copiedAlejandro Colomar1-1/+3
Reported-by: Keith Thompson <Keith.S.Thompson@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-07-23man/: ffixAlejandro Colomar574-575/+575
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-07-23strsep.3: Use CAVEATS instead of BUGSAlejandro Colomar1-1/+1
These are not bugs at all. It's a good API. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-07-23strsep.3: HISTORY: Relax portability concernsAlejandro Colomar1-3/+0
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>
2024-07-23strsep.3: STANDARDS: It's available in the BSDs (as it originated there)Alejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-07-20shm_open.3: EXAMPLES: Add missing error handlingAlejandro Colomar1-2/+4
Reported-by: gcc(1) (`make build-ex-cc`) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-07-20getutent.3: EXAMPLES: Add missing error handlingAlejandro Colomar1-5/+11
Reported-by: gcc(1) (`make build-ex-cc`) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-07-12man/: RETURN VALUE: Unify error wordingPetr Vorel6-6/+6
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>
2024-07-12fnmatch.3: Update FNM_CASEFOLD availability, FNM_IGNORECASE aliasнаб1-3/+11
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>
2024-07-09printf.3: the overall syntax is "%argnum$...", not "%$..."наб1-1/+1
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Message-ID: <atyx4os7275jhfsrnblyr6ykxwghjzdpdnvnrvxcskei7kbb6n@tarta.nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-07-09__riscv_flush_icache.3, riscv_flush_icache.2: Add page (and link page)Charlie Jenkins1-0/+49
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>
2024-07-09fmod.3: EXAMPLES: Fix calculationAlejandro Colomar1-1/+1
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>
2024-06-28printf.3: Rework 'наб1-14/+19
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>
2024-06-28wcscasecmp.3, wcsncasecmp.3: Mergeнаб2-123/+29
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>
2024-06-16setjmp.3: Fix section referencesKir Kolyshkin1-2/+2
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>
2024-06-16readdir.3: Fix wrong section referencesKir Kolyshkin1-4/+4
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>
2024-06-16strtod.3, strtol.3, strtoul.3: SYNOPSIS: Document _Nullable parametersAlejandro Colomar3-8/+10
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-06-16man/, share/mk/: srcfix, and remove corresponding XFAIL exceptionsAlejandro Colomar3-7/+0
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>
2024-06-16strtod.3, strtol.3, strtoul.3: VERSIONS, CAVEATS: Reorganize sectionsAlejandro Colomar3-42/+42
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections") Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-06-16strtod.3: Fix wrong section referenceKir Kolyshkin1-1/+1
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>
2024-06-16strtok.3: SYNOPSIS: Document _Nullable parametersAlejandro Colomar1-2/+4
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-06-16strtok.3: Fix section referenceKir Kolyshkin1-1/+1
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>
2024-06-16stailq.3: Fix section referenceKir Kolyshkin1-1/+1
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>
2024-06-16sigpause.3: Fix section referenceKir Kolyshkin1-1/+1
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>
2024-06-16getdtablesize.3: Fix section referenceKir Kolyshkin1-1/+1
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>
2024-06-16ceil.3, floor.3, rint.3, round.3: POSIX.1-2008 doesn't define errorsAlejandro Colomar4-8/+8
Cc: Kir Kolyshkin <kolyshkin@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-06-16ceil.3, rint.3, round.3: mv NOTES section to HISTORYKir Kolyshkin3-6/+6
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>
2024-06-16posix_fallocate.3: Fix section referencesKir Kolyshkin1-2/+2
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>
2024-06-16exec.3: Fix section referenceKir Kolyshkin1-1/+1
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>
2024-06-15man/: ffixAlejandro Colomar1-1/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-06-15man/: srcfix: Use \[rs] instead of \eAlejandro Colomar162-556/+556
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>
2024-06-12tzset.3: STANDARDS: timezone & daylight in POSIX.1-2001Paul Eggert1-0/+9
Message-ID: <20240611153005.3066-11-eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-06-12ctime.3, tzset.3: Update more POSIX citations and quotesPaul Eggert2-18/+21
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>
2024-06-12tzset.3: Omit colon in examplePaul Eggert1-1/+1
Message-ID: <20240611153005.3066-8-eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-06-12tzset.3: TZ=":EST5" worksPaul Eggert1-7/+13
Message-ID: <20240611153005.3066-7-eggert@cs.ucla.edu> [alx: \fI => .I] Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-06-12tzset.3: Use NZ's current rules in examplePaul Eggert1-3/+3
Message-ID: <20240611153005.3066-6-eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-06-12tzset.3: time hh range is now [-167, 167]Paul Eggert1-0/+6
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>
2024-06-12tzset.3: TZ can also be emptyPaul Eggert1-1/+1
Message-ID: <20240611153005.3066-4-eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-06-12tzset.3: CAVEATS: Recommend tm_gmtoff, tm_zone insteadPaul Eggert1-0/+14
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>
2024-06-12tzset.3: State vars unspecified if geographical TZPaul Eggert1-1/+8
Message-ID: <20240611153005.3066-2-eggert@cs.ucla.edu> [alx: use em dashes instead of commas] Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-06-11ctime.3: Simplify coverage of tzname etc.Paul Eggert1-15/+9
* 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>
2024-05-26grantpt.3: SYNOPSIS: Explicitly show #define _XOPEN_SOURCE requirementEmanuele Torre1-0/+1
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>
2024-05-19pthread_*.3: ffixAlejandro Colomar4-17/+30
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-05-03mbsinit.3, mbstate_t.3type: Split page into one for the type and one for the ↵Alejandro Colomar1-50/+6
function Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-05-02man/: EXAMPLES: Add missing includesAlejandro Colomar1-0/+1
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>
2024-05-02man/, share/mk/: Move man*/ to man/Alejandro Colomar1704-0/+99858
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>
2022-09-09Revert "src.mk, All pages: Move man* to man/"Alejandro Colomar1664-97802/+0
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>
2022-09-05src.mk, All pages: Move man* to man/Alejandro Colomar1664-0/+97802
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>