]> Savannah Git Hosting - gnulib.git/commit
getlogin: Work around musl bug.
authorBruno Haible <bruno@clisp.org>
Sun, 9 Mar 2025 09:16:58 +0000 (10:16 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 9 Mar 2025 09:16:58 +0000 (10:16 +0100)
commit90840606e77dd24d87ad7f075d8f87c0ed814ef5
tree639920fb78a8672aeba76d45d2385a1ad9c61563
parent2a60c939bec320abe18737360bb9841595f5d8d1
getlogin: Work around musl bug.

* lib/unistd.in.h (getlogin): Consider REPLACE_GETLOGIN.
* lib/getlogin.c: Change license header to GPL.
(getlogin): Add implementation for Linux.
* m4/getlogin.m4 (gl_FUNC_GETLOGIN): Test whether getlogin works.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETLOGIN.
* modules/unistd-h (Makefile.am): Substitute REPLACE_GETLOGIN.
* modules/getlogin (Depends-on): Add readutmp.
(configure.ac): Consider REPLACE_GETLOGIN.
(License): Change to GPL.
* tests/test-getlogin.c (main): Add another test.
* doc/posix-functions/getlogin.texi: Mention the workaround.
ChangeLog
doc/posix-functions/getlogin.texi
lib/getlogin.c
lib/unistd.in.h
m4/getlogin.m4
m4/unistd_h.m4
modules/getlogin
modules/unistd-h
tests/test-getlogin.c