diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-12-22 11:19:49 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-12-22 11:19:49 +0000 |
commit | 47e3b888b6317b3de9a2fb699489decbee3e3ed3 (patch) | |
tree | 1ab2f4494c0834c84ce80118971c5de0ef165d5a /libc/unistd | |
parent | 5fb172f624a5e14001fa5dfc71cb8b0d14b23149 (diff) |
implement the worthless cuserid() function we claim to support.
This isn't in SuSv3, but is expected by at least some apps such
as emacs...
Diffstat (limited to 'libc/unistd')
-rw-r--r-- | libc/unistd/getlogin.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/unistd/getlogin.c b/libc/unistd/getlogin.c index 6db73ae1c..d1a00feb9 100644 --- a/libc/unistd/getlogin.c +++ b/libc/unistd/getlogin.c @@ -46,3 +46,11 @@ int getlogin_r(char *name, size_t len) return 0; } +char *cuserid(char *name) +{ + char *name = getlogin(); + if (s) { + return(strcpy(s, name ? name : "")); + } + return name; +} |