Skip to contentSkip to conversation

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

PATCH In review Alejandro Colomar 2 participants 3 messages Oct 28, 2020 – Oct 29, 2020 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

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

---
 man2/getdents.2 | 4 ++++
 1 file changed, 4 insertions(+)
man2/getdents.2 +4 -0
index 02790b8f7..17904ed66 100644
@@ -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
Signature · 1 line
2.28.0
#1 lore raw

Hello Alex,

Quoted 1 line · Alejandro Colomar

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

Quoted 9 lines
---
 man2/getdents.2 | 4 ++++
 1 file changed, 4 insertions(+)
man2/getdents.2 +0 -0
index 02790b8f7..17904ed66 100644

man2/getdents.2 getdents, getdents64 \- get directory entries · line 40

Quoted 6 lines
man2/getdents.2 +3 -0
@@ -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.

man2/getdents.2 getdents, getdents64 \- get directory entries · line 44

Quoted 4 lines
man2/getdents.2 +1 -0
+.PP
 .BI "int getdents64(unsigned int " fd ", struct linux_dirent64 *" dirp ,
 .BI "             unsigned int " count );
 .fi

Cheers,

Michael

Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#2 lore raw
Quoted 11 lines · Michael Kerrisk (man-pages)

Hello Alex,

Quoted 1 line · Alejandro Colomar

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

Quoted 4 lines
---
  man2/getdents.2 | 4 ++++
  1 file changed, 4 insertions(+)
Quoted 14 lines

man2/getdents.2 getdents, getdents64 \- get directory entries · line 40

Quoted 11 lines
man2/getdents.2 +3 -0
index 02790b8f7..17904ed66 100644
@@ -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