diff mbox series

[26/39] open.2: Remove unused <sys/stat.h>

Message ID 20210510175546.28445-27-alx.manpages@gmail.com
State New
Headers show
Series man2: SYNOPSIS: Fix headers, use syscall(), and other fixes | expand

Commit Message

Alejandro Colomar \(man-pages\) May 10, 2021, 5:55 p.m. UTC
I can't see a reason to include it.  <fcntl.h> provides O_*
constants for 'flags', S_* constants for 'mode', and mode_t.

Probably a long time ago, some of those weren't defined in
<fcntl.h>, and both headers needed to be included, or maybe it's
a historical error.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/open.2 | 1 -
 1 file changed, 1 deletion(-)

Comments

Alejandro Colomar \(man-pages\) May 10, 2021, 6:02 p.m. UTC | #1
On 5/10/21 7:55 PM, Alejandro Colomar wrote:
> I can't see a reason to include it.  <fcntl.h> provides O_*
> constants for 'flags', S_* constants for 'mode', and mode_t.
> 
> Probably a long time ago, some of those weren't defined in
> <fcntl.h>, and both headers needed to be included, or maybe it's
> a historical error.
> 
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

Drop this one, please.  (We discussed it yesterday.)

> ---
>   man2/open.2 | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/man2/open.2 b/man2/open.2
> index bac1ee806..1bcd995f4 100644
> --- a/man2/open.2
> +++ b/man2/open.2
> @@ -53,7 +53,6 @@
>   open, openat, creat \- open and possibly create a file
>   .SH SYNOPSIS
>   .nf
> -.B #include <sys/stat.h>
>   .B #include <fcntl.h>
>   .PP
>   .BI "int open(const char *" pathname ", int " flags );
>
Michael Kerrisk \(man-pages\) May 11, 2021, 5:15 a.m. UTC | #2
On 5/11/21 6:02 AM, Alejandro Colomar (man-pages) wrote:
> On 5/10/21 7:55 PM, Alejandro Colomar wrote:
>> I can't see a reason to include it.  <fcntl.h> provides O_*
>> constants for 'flags', S_* constants for 'mode', and mode_t.
>>
>> Probably a long time ago, some of those weren't defined in
>> <fcntl.h>, and both headers needed to be included, or maybe it's
>> a historical error.
>>
>> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
> 
> Drop this one, please.  (We discussed it yesterday.)

Okay.
diff mbox series

Patch

diff --git a/man2/open.2 b/man2/open.2
index bac1ee806..1bcd995f4 100644
--- a/man2/open.2
+++ b/man2/open.2
@@ -53,7 +53,6 @@ 
 open, openat, creat \- open and possibly create a file
 .SH SYNOPSIS
 .nf
-.B #include <sys/stat.h>
 .B #include <fcntl.h>
 .PP
 .BI "int open(const char *" pathname ", int " flags );