getlogin_r: Work around portability problem on OSF/1.
authorBruno Haible <bruno@clisp.org>
Wed, 22 Dec 2010 18:25:34 +0000 (19:25 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 22 Dec 2010 18:25:34 +0000 (19:25 +0100)
commite53e23a012113952499a70115d2ca26b2a33e2bf
treec5bb164ee5ca5bfd8f95f3398aaf2a4c3f1a1406
parentf7fecbfc47c114a633f1fa754a0d9e1ad6cfc868
getlogin_r: Work around portability problem on OSF/1.

* m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Detect the OSF/1 problem.
* lib/unistd.in.h (getlogin_r): Replace if REPLACE_GETLOGIN_R is set.
* lib/getlogin_r.c (getlogin_r): When getlogin_r exists, invoke it and
test for a truncated result.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETLOGIN_R.
* modules/unistd (Makefile.am): Substitute REPLACE_GETLOGIN_R.
* modules/getlogin_r (Depends-on): Add memchr.
* doc/posix-functions/getlogin_r.texi: Mention the OSF/1 problem.
ChangeLog
doc/posix-functions/getlogin_r.texi
lib/getlogin_r.c
lib/unistd.in.h
m4/getlogin_r.m4
m4/unistd_h.m4
modules/getlogin_r
modules/unistd