aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2025-10-31src/bin/grepc: Refactor to avoid process substitutionAlejandro Colomar1-8/+5
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-31src/bin/grepc: Add defensive checkAlejandro Colomar1-1/+3
This is safer than silencing shellcheck(1). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-31src/bin/grepc: Add defensive checkAlejandro Colomar1-2/+1
In theory, getopts(1) will make sure that no other values arrive here. However, it's easy to add a check, and that will be safer than silencing shellcheck(1). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29src/bin/grepc: srcfix (Simplify case/esac)Alejandro Colomar1-10/+10
We don't need ';;&' since the commit referenced below. Fixes: 0ba68dd03564 (2024-09-19, 2025-10-29; "bin/grepc, grepc.1: -k: Remove flag") Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29Adapt grepc(1) to the Linux man-pages projectAlejandro Colomar2-0/+466
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man1/grepc.1: Use a smaller exampleAlejandro Colomar1-15/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29src/bin/grepc: Use if/else instead of && and ||Alejandro Colomar1-3/+5
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29src/bin/grepc: Quote variablesAlejandro Colomar1-23/+23
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29src/bin/grepc: Ignore shellcheck(1) diagnosticsAlejandro Colomar1-0/+4
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29src/bin/grepc: Use test(1) instead of [(1)Alejandro Colomar1-10/+10
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man1/grepc.1, src/bin/grepc: Add copyright noticeAlejandro Colomar2-0/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29src/bin/grepc: Handle errorsAlejandro Colomar1-0/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man1/grepc.1: Adapt to the Linux man-pages projectAlejandro Colomar1-20/+11
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man1/grepc.1: Move manual page to man/man1/Alejandro Colomar1-0/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29src/bin/grepc: Move script to src/bin/Alejandro Colomar1-0/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29Import grepc(1) (script and manual page) from separate projectAlejandro Colomar2-0/+473
It started as a script in the Linux man-pages project, under scripts/ within scripts/bash_aliases. Eventually, I turned it into a large script, and moved it into a separate project, to be able to work on it more freely. The original scripts were removed from this project in commit c3752af0549c (2022-11-22; "bash_aliases: Remove grep_syscall(), grep_syscall_def(), and grep_glibc_prototype()"). Now, grepc(1) has stabilized, and I find it very useful for maintaining this project (as well as others), so let's merge it back. This will allow distros to package it sooner than if it remained as a standalone project. I've imported the git history (ignoring files we don't care about) with the help of git-filter-repo(1). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: -tuf: Reuse grepc_c_f_decl_() for the function declaratorAlejandro Colomar1-1/+1
It's slightly different than the regex we were using, but I can't see a reason for it. It was probably due to forgetting to improve this regex. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: -tf: Factor out regex for function declaratorsAlejandro Colomar1-2/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: -tt: Add word boundary around the identifierAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Add robustness against non-portable pathnamesAlejandro Colomar1-3/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Use <() instead of $()Alejandro Colomar1-1/+5
Files are simpler to handle. It results in less flags, and simpler command invocations. And it allows breaking the line more nicely, without having to break in the middle of a quoted region. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: -tfp, -tfd: Add support for forward-declarations of parametersAlejandro Colomar1-2/+2
This is currently a (very useful) GNU extension, and soon might become standard in C2y. Link: n3394 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3394.pdf> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc, grepc.1: -k: Remove flagAlejandro Colomar2-17/+3
Just behave like grep(1) and pcre2grep(1). If the user wants to see it more nicely, they can do it themselves. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: bugfix: Pass options to grep(1) correctlyAlejandro Colomar1-1/+1
Fixes: 92dca8e97bfa ("bin/grepc: srcfix (Variables for options hold their '-')") Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/, man/: -m: Add flag, and pass it to pcre2grep(1)Alejandro Colomar2-2/+9
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: -x: c, mk: Add support for Makefile codeAlejandro Colomar1-84/+139
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Ignore a shellcheck(1) warningAlejandro Colomar1-0/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Compact cases a little bit)Alejandro Colomar1-16/+8
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Remove unnecessary comment)Alejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Use printf '%s\n' instead of echo)Alejandro Colomar1-21/+21
Reported-by: terdon <https://linux.codidact.com/users/57088> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Use bash(1) array variable)Alejandro Colomar1-12/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Remove grepc_search() and main())Alejandro Colomar1-43/+29
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Remove grepc_patterns())Alejandro Colomar1-27/+26
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Remove grepc_parse_cmd())Alejandro Colomar1-84/+79
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Simplify 'case's thanks to bash(1)'s ';;&')Alejandro Colomar1-75/+43
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Escape '?' in bash(1) case following getopts(1))Alejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Compact single-line cases)Alejandro Colomar1-57/+19
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc, grepc.1: -c: Add option to count matchesAlejandro Colomar2-2/+15
As in pcre2grep(1) and grep(1). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc, grepc.1: Rename option -c to -rAlejandro Colomar2-10/+11
This leaves -c unused, so we can add -c with the same meaning of grep(1): count. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29grepc.1: -c: Remove outdated sentenceAlejandro Colomar1-3/+0
Since 83cfbb6042d1 ("bin/grepc: Optimize"), we color also in ther types of code. Update the manual page. Fixes: 83cfbb6042d1 ("bin/grepc: Optimize") Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc, grepc.1: Use 'l' instead of 's' for Linux system callsAlejandro Colomar2-20/+20
To avoid confusion to users of other kernels. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Reorder some function definitions)Alejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc, grepc.1: -n: Add option to control printing of line numbersAlejandro Colomar2-3/+11
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Actually create file with mktemp(1))Alejandro Colomar1-1/+1
This ensures we own the file, removing any races. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Add some tabs, and remove a function)Alejandro Colomar1-23/+22
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc, grepc.1: -A, -B, -C: Add flags for printing context.Alejandro Colomar2-1/+31
These flags are passed to pcre2grep(1). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Variables for options hold their '-')Alejandro Colomar1-7/+14
This is to allow adding options that have arguments that are passed to pcre2grep(1). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc, grepc.1: -h: Add option to suppress prefixing file namesAlejandro Colomar2-3/+10
Equivalent to grep(1)'s -h, except that we always default to -H behavior. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Add missing variable definition)Alejandro Colomar1-0/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc, grepc.1: Remove -h flagAlejandro Colomar2-8/+1
There's already a manual page, and the short help from -h was quite unhelpful. I want to reuse -h for grep(1)'s meaning (don't print the filename). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: srcfix (Change variable names)Alejandro Colomar1-19/+19
Use single-letter names for variables that hold command-line options. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc, grepc.1: Always enable recursive mode; remove -rAlejandro Colomar2-18/+15
The non-recursive behavior is so slow that it's quite useless. It is only useful when reading from standard input, but for several files it's useless. Make '-r' the default when any files are specified, and remove the flag (since now it's always enabled). This happens to bring back a behavior close to what we had before 2fb22befdfb9 ("Don't find files recursively"). Non-seekable files can still be read, if redirected to standard input. Update the example from the manual page to reflect current usage. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29Add recursive search back in with -rAlejandro Colomar2-3/+32
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29Allow specifying several filesAlejandro Colomar2-8/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Don't use pcre2grep(1)'s --labelAlejandro Colomar1-3/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Simplify (remove grepc_search())Alejandro Colomar1-9/+5
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Compact codeAlejandro Colomar1-10/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: OptimizeAlejandro Colomar2-236/+57
Call pcre2grep(1) only once, which allows removing named pipes. This is an important optimization, and will also allow accepting several file names in the command line (in a future commit). The source code is also significantly simplified. It has a caveat: this single call to pcre2grep(1) will consume more resources, and will crash on certain input files. The workaround is to restrict the search to just one or a few types of code. Document this in the manual page. This caveat only applies to very specific files, which so far I've only found in the Linux kernel source tree.
2025-10-29Don't find files recursivelyAlejandro Colomar2-56/+64
grep only one file (or stdin). The current implementation doesn't allow filterin standard input, which I miss some times. I'm removing this feature now, to be able to rewrite most of the program in a way that allows filtering stdin, and then will consider adding back a recursive mode if necessary. Also, don't remove the two blanks at the start of the output, for consistency when calling this program via xargs(1), which will become more common now that it only handles single files. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29Remove '-g' optionAlejandro Colomar2-14/+2
This program shouldn't know about file names. If that is wanted, use something like `find ... | grep ... | xargs grepc ...`. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29Remove '-x' optionAlejandro Colomar2-19/+1
This program shouldn't know about file extensions. If that is wanted, use something like `find ... | grep ... | xargs grepc ...`. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc, grepc.1: -tmf, -tmo: Add options to find only function-like ↵Alejandro Colomar2-10/+24
macros, or other macros Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Shorten function namesAlejandro Colomar1-43/+43
Also, use names consistent with the command-line option arguments. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Shorten variable namesAlejandro Colomar1-117/+96
Also, use names consistent with the command-line option arguments. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Simplify (remove grepc_use_func())Alejandro Colomar1-13/+11
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Simplify (remove grepc_use_type())Alejandro Colomar1-16/+18
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Simplify (remove grepc_type())Alejandro Colomar1-18/+24
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Simplify (remove grepc_type_typedef())Alejandro Colomar1-8/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Simplify (remove grepc_macro())Alejandro Colomar1-12/+10
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Compact one-liner definitionsAlejandro Colomar1-26/+5
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Simplify (remove grepc_glibc_func_def())Alejandro Colomar1-14/+14
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Improve error messagesAlejandro Colomar1-11/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Transform some if's to simpler test&&Alejandro Colomar1-39/+26
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Simplify (remove grepc_use())Alejandro Colomar1-26/+15
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Simplify (remove grepc_glibc_func())Alejandro Colomar1-20/+11
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Simplify (remove grepc_linux_func())Alejandro Colomar1-20/+11
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Simplify (remove grepc_func())Alejandro Colomar1-36/+28
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29bin/grepc: Simplify (remove grepc_search_default())Alejandro Colomar1-56/+50
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29Use pcre2grep(1) instead of pcregrep(1)Alejandro Colomar2-3/+3
PCRE are EOL. Long live PCRE2. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29Use recursion to improve matching of function parameter listsAlejandro Colomar1-4/+4
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29Support parenthesized function namesAlejandro Colomar1-2/+2
This creates some false positives, but with appropriate flags, those can be removed. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29grepc, grepc.1: -tg, -tgp, -tgd: Add more support for glibc internal names ↵Alejandro Colomar2-2/+62
of libc functions Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: -tm: Fix finding macros defined as emptyAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: -c: Add flag to color usesAlejandro Colomar2-11/+45
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Remove constraints in the file prefilteringAlejandro Colomar1-1/+1
To make -tu work correctly, which doesn't have the word-boundary constraint. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: -tut: Fix regex for braces in the same line as 'struct'Alejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Read in the helperAlejandro Colomar1-35/+19
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Don't search underlying structure of a typedefAlejandro Colomar1-14/+0
In some cases it might be nice, but in some other cases, it might cause a lot of code to be printed. Let the user explicitly search for it or not in a separate run. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Fix glitch with incorrectly indented codeAlejandro Colomar1-4/+4
Avoid this glich from glibc: ./sysdeps/unix/sysv/linux/x86/sys/ucontext.h:133: typedef struct { gregset_t __ctx(gregs); /* Note that fpregs is a pointer. */ fpregset_t __ctx(fpregs); __extension__ unsigned long long __reserved1 [8]; } mcontext_t; /* Userlevel context. */ typedef struct ucontext_t { unsigned long int __ctx(uc_flags); struct ucontext_t *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; struct _libc_fpstate __fpregs_mem; __extension__ unsigned long long int __ssp[4]; } ucontext_t; Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Fix some typedef corner casesAlejandro Colomar1-3/+3
- Typedefs to arrays of structures. - Typedefs to structures of the same name. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Improve regexesAlejandro Colomar1-16/+16
- Use the same ammount of spaces for the closing brace as for the opening brace. - Fix position of attributes. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: bugfixAlejandro Colomar1-2/+2
SC2068: Double quote array expansions to avoid re-splitting elements. Reported-by: shellcheck(1) Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: srcfixAlejandro Colomar1-1/+1
SC2124: Use $* instead of $@ to concatenate. Reported-by: shellcheck(1) Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: srcfixAlejandro Colomar1-1/+1
SC2004: $/${} is unnecessary on arithmetic variables. Reported-by: shellcheck(1) Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: Add -i flag as in grep(1)Alejandro Colomar2-8/+16
Also, add some symmetry between ${iflag} and ${lflag}. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: Remove -tu from the defaultsAlejandro Colomar2-3/+2
Normally, one either wants to see a declaration/definition, or its uses, but not both at the same time. Also, there are usually many more use sites than than definitions, and therefore definitions are shadowed between all the noise. Restrict the default to declarations and definitions, which in my experience seems to be the most common use case. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: -tu: Allow searching special charactersAlejandro Colomar2-14/+22
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Fix grepc_type_typedef_underlying_struct_union_enumAlejandro Colomar1-26/+43
When it calls grepc_type_struct_union_enum(), it needs to use a different file list, since it's searching for an identifier different from the one passed in the command line. Also, while at it, improve the quoting of the pattern passed to pcregrep(1). Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: -tt: Find typedefs to function pointersAlejandro Colomar1-0/+10
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: tfixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: srcfixAlejandro Colomar1-1/+1
Sort alphabetically the optstring. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Allow a pattern to start with '-'Alejandro Colomar1-5/+5
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: -t...: Allow more granularityAlejandro Colomar2-2/+105
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc.1: wfixAlejandro Colomar1-2/+2
2025-10-29grepc, grepc.1: wfixAlejandro Colomar2-12/+12
Rename functions to have different starting letters. Also rename the macro functions to more closely match ISO C nomenclature. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: -tu: Search also within enum and type definitionsAlejandro Colomar2-2/+51
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_enum_constant: Fix edge casesAlejandro Colomar1-3/+3
Most importantly, typedef enum. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: Add -l flag as in grep(1)Alejandro Colomar2-3/+19
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_use_macro: tfixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc.1: ffixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: Add -tu to search for usesAlejandro Colomar2-1/+63
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_macro_*: Remove a few false positivesAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: srcfixAlejandro Colomar1-13/+13
Use alphabetic order. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: Add -k option for a more compact outputAlejandro Colomar2-3/+16
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: Add -t option to restrict the search to a type of code.Alejandro Colomar2-3/+78
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: srcfixAlejandro Colomar1-43/+43
Improve grouping so that adding flags for running the different functions is simple. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: Don't print leading blank lines.Alejandro Colomar2-12/+13
Also, update the manual page EXAMPLES regarding blank lines. Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc.1: SYNOPSIS: ffixAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: Add optional FILE trailing argumentsAlejandro Colomar2-6/+30
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: -g: Add option to restrict search to files tracked by gitAlejandro Colomar2-2/+14
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: -x: Add option to edit file extensionAlejandro Colomar2-4/+18
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc, grepc.1: -h: Add option to print the usage message.Alejandro Colomar2-12/+43
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Usage: ffixAlejandro Colomar1-1/+1
Using caps instead of <> will be nicer when we add options and optional arguments for the files/directories: Usage: grepc [OPTION]... IDENTIFIER [FILE]... vs Usage: grepc [<option>]... IDENTIFIER [<file>]... Also, it's what pcregrep(1) and GNU grep(1) use, so it's good to use the same syntax here. Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc.1: wfixAlejandro Colomar1-2/+1
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Simplify escaping \Alejandro Colomar1-2/+2
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Use -r option to read(1)Alejandro Colomar1-1/+1
Let's fall on the safe side. Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Make it portable to sh(1)Alejandro Colomar1-23/+23
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Use a portable shebangAlejandro Colomar1-1/+1
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Remove spurious blank linesAlejandro Colomar1-7/+7
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Remove blank line between header and codeAlejandro Colomar1-1/+1
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_linux_syscall_def: Improve readability of regexAlejandro Colomar1-1/+1
This improves the readability of the regex, and also the robustness, at the cost of just a few ms. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_find_files: Get a reduced list of files onceAlejandro Colomar1-18/+27
Instead of running find and grep -l for every function, store the result in a temporary file for reuse in all functions. This is a considerable speedup, between 3x and 10x in some tests within the Linux kernel source code. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Fix some corner casesAlejandro Colomar1-2/+2
Those two spaces are for handling some insane GNU style. Those are always spaces, so let's use ' ' instead of '\s\s' to make sure we don't match two tabs, or things like that. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc.1: ffixAlejandro Colomar1-4/+4
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc.1: Add break points in URIAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc.1: EXAMPLES: Add example with nxt_sprintfAlejandro Colomar1-0/+26
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc.1: Add manual pageAlejandro Colomar1-0/+29
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Use '' when possibleAlejandro Colomar1-10/+10
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Fix some corner casesAlejandro Colomar1-4/+4
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_type_*: Fix some typedef corner casesAlejandro Colomar1-8/+8
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_macro_simple: Fix regex for empty macroAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: OptimizeAlejandro Colomar1-7/+18
Use 2 grep(1) filters instead of 1, to be able to filter better before the multiline pcregrep(1) filter, which is considerably slower. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_enum_constant, grepc_type_typedef_simple: Remove a few false ↵Alejandro Colomar1-3/+3
positives Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_linux*, grepc_syscall*: Rename functions to clearly refer to linuxAlejandro Colomar1-6/+6
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_type_struct_union_enum: Don't duplicate outputAlejandro Colomar1-1/+1
In definitions of the form typedef struct foo {...} foo; grepc_type_typedef_struct_union_enum() is already finding it. Remove the duplicate here. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_glibc_math: Support glibc math functionsAlejandro Colomar1-0/+13
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_helper: Add helper function to remove repeated codeAlejandro Colomar1-63/+39
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_func_decl: OptimizeAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_enum_constant: Fix patternAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_type_struct_union_enum: OptimizeAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_type_struct_union_enum: Allow attributes before ↵Alejandro Colomar1-1/+1
struct|union|enum keyword Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_type_typedef_underlying_struct_union_enum: Don't duplicate outputAlejandro Colomar1-1/+2
In typedefs of the form 'typedef struct foo foo;', don't print the structure twice. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Allow tabsAlejandro Colomar1-3/+3
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_type*: Simplify finding typedefsAlejandro Colomar1-13/+7
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Consistently use Perl regexAlejandro Colomar1-15/+15
If we use different regex types within the program, then users can't use regex patterns in the identifier due to incompatibilities. Let's use Perl regex everywhere we can, so that users can consistently use Perl regex patterns in the identifier. Example: $ grepc (vf|as)printf; Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_enum_constant: Find enumeration constant definitionsAlejandro Colomar1-0/+13
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_syscall_decl: OptimizeAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grep_macro_*: Allow tabsAlejandro Colomar1-4/+4
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_func_def: Find kernel function definitionsAlejandro Colomar1-3/+3
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_syscall: Find kernel syscalls (both declaration and definition)Alejandro Colomar1-0/+31
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_func_def: Increase robustness of regexAlejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_type_struct_union_enum: Increase robustness of regexAlejandro Colomar1-2/+4
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_type_typedef_underlying_struct_union_enum: Fix corner casesAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: Fix parsing of argumentsAlejandro Colomar1-18/+19
Allow one single argument only. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grepc_type_struct_union_enum: Support glibcAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29grepc: grep_func_decl: Support glibcAlejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29bin/grepc: Add programAlejandro Colomar1-0/+141
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2025-10-29SPONSORS: Two sponsors didn't renew this yearAlejandro Colomar1-2/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29Start of man-pages-NEXT: Move Changes to Changes.oldAlejandro Colomar2-135/+172
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29lsm: Released 6.16Alejandro Colomar1-3/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29Changes: Ready for 6.16man-pages-6.16Alejandro Colomar1-9/+135
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29RELEASE: Sort tags using sort(1) -VAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29Changes[.old]: Move Changes to Changes.oldAlejandro Colomar2-100/+137
I forgot to do it right after releasing man-pages-6.15. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man7/bpf-helpers.7: Refresh page from Linux v6.17Alejandro Colomar1-7/+18
Scripted change: $ ~/src/linux/linux/v6.17/scripts/bpf_doc.py \ | rst2man \ >man7/bpf-helpers.7; Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/: Update some APIs for POSIX.1-2024posix24Alejandro Colomar156-354/+367
This work is incomplete, but waiting until all pages have been updated would unnecessarily delay publishing these changes, which are already useful. 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/man2/gettimeofday.2: Declare functions with [[deprecated]]Collin Funk1-0/+6
As documented in the STANDARDS section, gettimeofday(2) was deprecated in POSIX.1-2008 and removed in POSIX.1-2024. Mark it and settimeofday(2) with [[deprecated]], and mention clock_settime(2) as a modern and standardized alternative to settimeofday(2). Signed-off-by: Collin Funk <collin.funk1@gmail.com> Message-ID: <2d37d5a9251af3c1d25cf8e73e3585a9955d5772.1750373011.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 Colomar40-42/+44
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man3type/time_t.3type: STANDARDS, HISTORY: POSIX.1-2008 removed useconds_tAlejandro Colomar1-10/+10
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man3type/time_t.3type: STANDARDS, HISTORY: Update time_t for POSIX.1-2024Alejandro Colomar1-7/+15
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/man7/signal.7: Mention SIGWINCH was standardized in POSIX-1.2024Collin Funk1-1/+3
Signed-off-by: Collin Funk <collin.funk1@gmail.com> Message-ID: <bae6bc16f9ab6bd3e5c30dc8e11bd83566b06a6f.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/man2/: STANDARDS: Update system calls for POSIX.1-2024Alejandro Colomar106-218/+201
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man2/open.2: Simplify STANDARDS, and move part of it to HISTORYAlejandro Colomar1-26/+16
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/: Update fork(2) for POSIX.1-2024, and add references to _Fork(3)Alejandro Colomar3-14/+8
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/man7/pathname.7: VERSIONS: Linux doesn't disallow new-line charactersAlejandro Colomar1-0/+5
POSIX.1-2024 encourages implementations to disallow new-line characters, but Linux doesn't follow that. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man2/close.2: CAVEATS: Document divergence from POSIX.1-2024Alejandro Colomar1-15/+6
POSIX.1-2024 now mandates a behavior different from what Linux (and many other implementations) does. It requires that we report EINPROGRESS for what now is EINTR. There are no plans to conform to POSIX.1-2024 within the Linux kernel, so document this divergence. Keep POSIX.1-2008 as the standard to which we conform in STANDARDS. Link: <https://sourceware.org/bugzilla/show_bug.cgi?id=14627> Link: <https://pubs.opengroup.org/onlinepubs/9799919799/functions/close.html> Cc: Jan Kara <jack@suse.cz> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Christian Brauner <brauner@kernel.org> Cc: Rich Felker <dalias@libc.org> Cc: <linux-fsdevel@vger.kernel.org> Cc: <linux-api@vger.kernel.org> Cc: <libc-alpha@sourceware.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man2/close.2: Move part of NOTES into a new CAVEATS sectionAlejandro Colomar1-8/+8
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man2/socket.2: VERSIONS: POSIX.1-2024 specifies SOCK_CLOFORK, but Linux ↵Alejandro Colomar1-0/+4
doesn't support it Fixes: 265b9898dfe2 (2025-05-09; "man/man2/: VERSIONS: POSIX.1-2024 specifies *_CLOFORK, but Linux doesn't support it") Link: <https://lore.kernel.org/all/20200515160342.GE23230@ZenIV.linux.org.uk/> Cc: Mateusz Guzik <mjguzik@gmail.com> Cc: Jeff Layton <jlayton@kernel.org> Cc: Chuck Lever <chuck.lever@oracle.com> Cc: <linux-fsdevel@vger.kernel.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man2/: Fix STANDARDS and HISTORYAlejandro Colomar3-3/+3
Fixes: 4131356cdab8 (2023-03-30; "man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections") 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/man2/pidfd_send_signal.2: Describe flagsKir Kolyshkin1-3/+60
Those flags were added in Linux 6.9 (see [1]), and are documented in [2]. The text added is a modified version of [3], removing some repetition and adapting from markdown to mandoc. [1]: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e1fb1dc08e73> [2]: <https://github.com/brauner/man-pages-md/blob/main/pidfd_send_signal.md> [3]: <https://github.com/brauner/man-pages-md/pull/2> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> Message-ID: <20251008020031.1215030-4-kolyshkin@gmail.com> Cc: Christian Brauner <brauner@kernel.org> Cc: Oleg Nesterov <oleg@redhat.com> [alx: ffix] Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man2/pidfd_open.2: Document PIDFD_THREADKir Kolyshkin1-6/+36
PIDFD_THREAD flag for pidfd_open(2) was added in Linux 6.9 (see [1]). Add a TODO to describe the nuances of using poll/epoll/select with a pidfd referring to a process vs a thread. [1]: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=64bef697d33b> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> Message-ID: <20251013191049.193375-2-kolyshkin@gmail.com> Cc: Christian Brauner <brauner@kernel.org> Cc: Oleg Nesterov <oleg@redhat.com> [alx: ffix] Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man7/tcp.7: Add TCP_SAVE_SYN and TCP_SAVED_SYNValdikSS1-4/+17
Document TCP_SAVE_SYN and TCP_SAVED_SYN options based on git commit linux.git cd8ae85299d5 (2015-05-05; "tcp: provide SYN headers for passive connections") which introduced it. Link: <https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cd8ae85299d54155702a56811b2e035e63064d3d> Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: ValdikSS <iam@valdikss.org.ru> Message-ID: <20251015214826.70750-1-iam@valdikss.org.ru> 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>