updwtmp.3: Add #define GNU_SOURCE for updwtmpx
PATCH 1/1 updwtmp.3: Add #define GNU_SOURCE for updwtmpx
Signed-off-by Sam James <[email protected]>
--- man3/updwtmp.3 | 1 + 1 file changed, 1 insertion(+)
man3/updwtmp.3 +1 -0
@@ -66,6 +66,7 @@ glibc provides (since version 2.1): .PP .in +4n .EX +.BR "#define _GNU_SOURCE " "/* See feature_test_macros(7) */" .B #include <utmpx.h> .BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx ); .EE
Signature · 1 line
2.36.1
Hi Sam!
Quoted 2 lines · Sam James
Signed-off-by Sam James <[email protected]>
Thanks for the patch! I applied it.
And yes, glibc uses internally __USE_GNU for when a user is expected to define _GNU_SOURCE.
Cheers,
Alex
See also:
alx@asus5775:/usr/include$ grepc __USE_GNU ./features.h:392: # define __USE_GNU 1
./regex.h:33:
# define __USE_GNU 1
./x86_64-linux-gnu/ruby-3.0.0/rb_mjit_min_header-3.0.4.h:19554:
#define __USE_GNU 1
alx@asus5775:/usr/include$ grep -rnC1 define.__USE_GNU features.h regex.h features.h-391-#ifdef _GNU_SOURCE features.h:392:# define __USE_GNU 1 features.h-393-#endif -- regex.h-32-#ifdef _GNU_SOURCE regex.h:33:# define __USE_GNU 1 regex.h-34-#endif
Quoted 16 lines
--- man3/updwtmp.3 | 1 + 1 file changed, 1 insertion(+)man3/updwtmp.3 +1
-0@@ -66,6 +66,7 @@ glibc provides (since version 2.1): .PP .in +4n .EX +.BR "#define _GNU_SOURCE " "/* See feature_test_macros(7) */" .B #include <utmpx.h> .BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx ); .EE
Signature · 2 lines
Alejandro Colomar <http://www.alejandro-colomar.es/>