regex.3: Remove unnecessary include
PATCH 1/1 regex.3: Remove unnecessary include
POSIX requires that the <regex.h> header shall define the structures and symbolic constants used by the regcomp(), regexec(), regerror(), and regfree() functions.
Therefore, there should be no need to include <sys/types.h> at all.
The POSIX docs don't use that include:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/regcomp.html
--- man3/regex.3 | 1 - 1 file changed, 1 deletion(-)
man3/regex.3 +0 -1
@@ -32,7 +32,6 @@ regcomp, regexec, regerror, regfree \- POSIX regex functions .SH SYNOPSIS .nf -.B #include <sys/types.h> .B #include <regex.h> .PP .BI "int regcomp(regex_t *" preg ", const char *" regex ", int " cflags );
Signature · 1 line
2.28.0
Hi Michael,
I missed an example about these functions.
I'll send you one next week :)
Cheers
Alex
Quoted 27 lines · Alejandro Colomar
POSIX requires that the <
regex.h> header shall define the structures and symbolic constants used by theregcomp(),regexec(),regerror(), andregfree()functions.Therefore, there should be no need to include <
sys/types.h> at all.The POSIX docs don't use that include:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/regcomp.htmlSigned-off-by Alejandro Colomar <[email protected]>--- man3/regex.3 | 1 - 1 file changed, 1 deletion(-)man3/regex.3 +0
-1@@ -32,7 +32,6 @@ regcomp, regexec, regerror, regfree \- POSIX regex functions .SH SYNOPSIS .nf -.B #include <sys/types.h> .B #include <regex.h> .PP .BI "int regcomp(regex_t *" preg ", const char *" regex ", int " cflags );
Quoted 4 lines · Alejandro Colomar
Hi Michael,
I missed an example about these functions.
I'll send you one next week :)
Sounds good!
Cheers,
Michael
Signature · 3 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/
Quoted 5 lines · Alejandro Colomar
POSIX requires that the <
regex.h> header shall define the structures and symbolic constants used by theregcomp(),regexec(),regerror(), andregfree()functions.Therefore, there should be no need to include <
sys/types.h> at all.
Thanls, Alex. Patch applied.
Cheers,
Michael
Quoted 21 lines
The POSIX docs don't use that include:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/regcomp.htmlSigned-off-by Alejandro Colomar <[email protected]>--- man3/regex.3 | 1 - 1 file changed, 1 deletion(-)man3/regex.3 +0
-1@@ -32,7 +32,6 @@ regcomp, regexec, regerror, regfree \- POSIX regex functions .SH SYNOPSIS .nf -.B #include <sys/types.h> .B #include <regex.h> .PP .BI "int regcomp(regex_t *" preg ", const char *" regex ", int " cflags );
Signature · 3 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/