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