Re: [PATCH] regex.3: Remove unnecessary include

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/10/20 7:50 PM, Alejandro Colomar wrote:
> 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.

Thanls, Alex. Patch applied.

Cheers,

Michael

> The POSIX docs don't use that include:
> https://pubs.opengroup.org/onlinepubs/9699919799/functions/regcomp.html
> 
> Signed-off-by: Alejandro Colomar <colomar.6.4.3@xxxxxxxxx>
> ---
>  man3/regex.3 | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/man3/regex.3 b/man3/regex.3
> index d4f7a09e7..414011d91 100644
> --- a/man3/regex.3
> +++ b/man3/regex.3
> @@ -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 );
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux