delorie.com/djgpp/doc/libc/libc_403.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <unistd.h> char *getlogin(void); |
Get the login ID of the user.
Returns the value of the USERNAME
environment variable if it is
defined, else the LOGNAME
environment variable, else the
USER
environment variable, else "dosuser"
.
USERNAME
is set automatically by Windows NT and Windows 2000.
None of these environment variables are set automatically on DOS,
Windows 95 or Windows 98.
The stock version of the file `DJGPP.ENV' defines USER
with
the value "dosuser"
.
ANSI/ISO C | No |
POSIX | 1003.2-1992; 1003.1-2001 |
printf("I am %s\n", getlogin()); |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |