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 41a153208a792240f876eced6ead9c2f303e2c0a..a201f25699bf676cf6ff161deb65dafc75e2a41f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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'.
index f1ed8b826a4e464ef6874e53b3c4bc3a4b9871cd..3e22d8defcbbdebc657be2bf94a2304bf14eb66b 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));