]> 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>
Tue, 1 Apr 2025 14:27:33 +0000 (16:27 +0200)
commit4eb716b7571dd678aafc60d8f70e801b61e27e26
treef0bf99f3b1bec6a6dd8ee6b13c794d7975c7a91a
parent3fbc2c7bb371916a6f3433ef28d84874909d1052
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.
ChangeLog
lib/getlogin.c
lib/unistd.in.h
m4/getlogin.m4
m4/unistd_h.m4
modules/getlogin
modules/unistd-h
tests/test-getlogin.c