getlogin_r: Add comment.
authorBruno Haible <bruno@clisp.org>
Sat, 9 Jan 2010 13:16:57 +0000 (14:16 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 9 Jan 2010 13:16:57 +0000 (14:16 +0100)
ChangeLog
lib/unistd.in.h

index 41a1532..a201f25 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-01-09  Bruno Haible  <bruno@clisp.org>
 
+       * lib/unistd.in.h (getlogin_r): Add comment.
+
+2010-01-09  Bruno Haible  <bruno@clisp.org>
+
        Tests for module 'getlogin_r'.
        * modules/getlogin_r-tests: New file.
        * tests/test-getlogin_r.c: New file.
index f1ed8b8..3e22d8d 100644 (file)
@@ -485,6 +485,11 @@ extern int gethostname(char *name, size_t len) _GL_ARG_NONNULL ((1));
    provided (this case is hopefully rare but is left open by the POSIX spec).
 
    See <http://www.opengroup.org/susv3xsh/getlogin.html>.
+
+   Most programs don't need to use this function, because the information is
+   available through environment variables:
+     ${LOGNAME-$USER}        on Unix platforms,
+     $USERNAME               on native Windows platforms.
  */
 # if !@HAVE_DECL_GETLOGIN_R@
 extern int getlogin_r (char *name, size_t size) _GL_ARG_NONNULL ((1));