getdents.2: SYNOPSIS: Add missing header and feature test macro

Message ID 20201028195123.123843-1-colomar.6.4.3@gmail.com
State Not applicable
Headers
Series getdents.2: SYNOPSIS: Add missing header and feature test macro |

Commit Message

Alejandro Colomar Oct. 28, 2020, 7:51 p.m. UTC
  Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man2/getdents.2 | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Michael Kerrisk \(man-pages\) Oct. 28, 2020, 9:21 p.m. UTC | #1
Hello Alex,

On 10/28/20 8:51 PM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>

Thanks. Patch applied. But tweaked with a follow-on commit

> ---
>  man2/getdents.2 | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/man2/getdents.2 b/man2/getdents.2
> index 02790b8f7..17904ed66 100644
> --- a/man2/getdents.2
> +++ b/man2/getdents.2
> @@ -35,6 +35,10 @@ getdents, getdents64 \- get directory entries
>  .nf
>  .BI "int getdents(unsigned int " fd ", struct linux_dirent *" dirp ,
>  .BI "             unsigned int " count );
> +.PP
> +.BR "#define _GNU_SOURCE" "        /* See feature_test_macros(7) */"
> +.BR "#include <dirent.h>" "        /* See NOTES */"

I removed the piece "/* See NOTES */", since the NOTES don't
really explain the #include.

> +.PP
>  .BI "int getdents64(unsigned int " fd ", struct linux_dirent64 *" dirp ,
>  .BI "             unsigned int " count );
>  .fi


Cheers,

Michael
  
Alejandro Colomar Oct. 28, 2020, 10 p.m. UTC | #2
On 2020-10-28 22:21, Michael Kerrisk (man-pages) wrote:
 > Hello Alex,
 >
 > On 10/28/20 8:51 PM, Alejandro Colomar wrote:
 >> Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
 >
 > Thanks. Patch applied. But tweaked with a follow-on commit
 >
 >> ---
 >>   man2/getdents.2 | 4 ++++
 >>   1 file changed, 4 insertions(+)
 >>
 >> diff --git a/man2/getdents.2 b/man2/getdents.2
 >> index 02790b8f7..17904ed66 100644
 >> --- a/man2/getdents.2
 >> +++ b/man2/getdents.2
 >> @@ -35,6 +35,10 @@ getdents, getdents64 \- get directory entries
 >>   .nf
 >>   .BI "int getdents(unsigned int " fd ", struct linux_dirent *" dirp ,
 >>   .BI "             unsigned int " count );
 >> +.PP
 >> +.BR "#define _GNU_SOURCE" "        /* See feature_test_macros(7) */"
 >> +.BR "#include <dirent.h>" "        /* See NOTES */"
 >
 > I removed the piece "/* See NOTES */", since the NOTES don't
 > really explain the #include.

Hi Michael,

Fair enough.

Cheers,

Alex
  

Patch

diff --git a/man2/getdents.2 b/man2/getdents.2
index 02790b8f7..17904ed66 100644
--- a/man2/getdents.2
+++ b/man2/getdents.2
@@ -35,6 +35,10 @@  getdents, getdents64 \- get directory entries
 .nf
 .BI "int getdents(unsigned int " fd ", struct linux_dirent *" dirp ,
 .BI "             unsigned int " count );
+.PP
+.BR "#define _GNU_SOURCE" "        /* See feature_test_macros(7) */"
+.BR "#include <dirent.h>" "        /* See NOTES */"
+.PP
 .BI "int getdents64(unsigned int " fd ", struct linux_dirent64 *" dirp ,
 .BI "             unsigned int " count );
 .fi