* [PATCH resend] statx.2: Add #define _GNU_SOURCE to synopsis
@ 2022-06-08 22:43 Jakub Wilk
2022-06-09 9:07 ` Alejandro Colomar
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Wilk @ 2022-06-08 22:43 UTC (permalink / raw)
To: Michael Kerrisk, Alejandro Colomar; +Cc: linux-man
The original text hinted that you need _GNU_SOURCE only for a few of the
AT_* constants; but actually you need it to get the statx() declaration.
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
---
man2/statx.2 | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/man2/statx.2 b/man2/statx.2
index 0b3f6747f..a8620be6f 100644
--- a/man2/statx.2
+++ b/man2/statx.2
@@ -15,6 +15,7 @@ Standard C library
.RI ( libc ", " \-lc )
.SH SYNOPSIS
.nf
+.BR "#define _GNU_SOURCE " "/* See feature_test_macros(7) */"
.BR "#include <fcntl.h> " "/* Definition of " AT_* " constants */"
.B #include <sys/stat.h>
.PP
@@ -166,11 +167,6 @@ If
is
.BR AT_FDCWD ,
the call operates on the current working directory.
-.IP
-This flag is Linux-specific; define
-.B _GNU_SOURCE
-.\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed
-to obtain its definition.
.TP
.B AT_NO_AUTOMOUNT
Don't automount the terminal ("basename") component of
@@ -193,11 +189,6 @@ and
act as though
.B AT_NO_AUTOMOUNT
was set.
-.IP
-This flag is Linux-specific; define
-.B _GNU_SOURCE
-.\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed
-to obtain its definition.
.TP
.B AT_SYMLINK_NOFOLLOW
If
--
2.36.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH resend] statx.2: Add #define _GNU_SOURCE to synopsis
2022-06-08 22:43 [PATCH resend] statx.2: Add #define _GNU_SOURCE to synopsis Jakub Wilk
@ 2022-06-09 9:07 ` Alejandro Colomar
0 siblings, 0 replies; 2+ messages in thread
From: Alejandro Colomar @ 2022-06-09 9:07 UTC (permalink / raw)
To: Jakub Wilk; +Cc: linux-man
[-- Attachment #1.1: Type: text/plain, Size: 2714 bytes --]
Hi Jakub!
On 6/9/22 00:43, Jakub Wilk wrote:
> The original text hinted that you need _GNU_SOURCE only for a few of the
> AT_* constants; but actually you need it to get the statx() declaration.
>
> Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Thanks for resending! I applied both patches. And in this one I added
the following to the commit message:
[alx:]
You can check yourself:
$ grepc -tfp statx
./io/bits/statx-generic.h:60:
int statx (int __dirfd, const char *__restrict __path, int __flags,
unsigned int __mask, struct statx *__restrict __buf)
__THROW __nonnull ((2, 5));
$ grep -rnC1 '<bits/statx-generic.h>' io/
io/bits/statx-generic.h-21-#ifndef _SYS_STAT_H
io/bits/statx-generic.h:22:# error Never include
<bits/statx-generic.h> directly, include <sys/stat.h> instead.
io/bits/statx-generic.h-23-#endif
--
io/bits/statx.h-25-/* Use the generic definitions. */
io/bits/statx.h:26:#include <bits/statx-generic.h>
$ grep -rnC1 '<bits/statx.h>' io/
io/bits/statx.h-21-#ifndef _SYS_STAT_H
io/bits/statx.h:22:# error Never include <bits/statx.h> directly,
include <sys/stat.h> instead.
io/bits/statx.h-23-#endif
--
io/sys/stat.h-371-#ifdef __USE_GNU
io/sys/stat.h:372:# include <bits/statx.h>
io/sys/stat.h-373-#endif
Cheers,
Alex
> ---
> man2/statx.2 | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/man2/statx.2 b/man2/statx.2
> index 0b3f6747f..a8620be6f 100644
> --- a/man2/statx.2
> +++ b/man2/statx.2
> @@ -15,6 +15,7 @@ Standard C library
> .RI ( libc ", " \-lc )
> .SH SYNOPSIS
> .nf
> +.BR "#define _GNU_SOURCE " "/* See feature_test_macros(7) */"
> .BR "#include <fcntl.h> " "/* Definition of " AT_* " constants */"
> .B #include <sys/stat.h>
> .PP
> @@ -166,11 +167,6 @@ If
> is
> .BR AT_FDCWD ,
> the call operates on the current working directory.
> -.IP
> -This flag is Linux-specific; define
> -.B _GNU_SOURCE
> -.\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed
> -to obtain its definition.
> .TP
> .B AT_NO_AUTOMOUNT
> Don't automount the terminal ("basename") component of
> @@ -193,11 +189,6 @@ and
> act as though
> .B AT_NO_AUTOMOUNT
> was set.
> -.IP
> -This flag is Linux-specific; define
> -.B _GNU_SOURCE
> -.\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed
> -to obtain its definition.
> .TP
> .B AT_SYMLINK_NOFOLLOW
> If
--
Alejandro Colomar
Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-09 9:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08 22:43 [PATCH resend] statx.2: Add #define _GNU_SOURCE to synopsis Jakub Wilk
2022-06-09 9:07 ` Alejandro Colomar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox