From 47e3b888b6317b3de9a2fb699489decbee3e3ed3 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 22 Dec 2003 11:19:49 +0000 Subject: 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... --- libc/unistd/getlogin.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libc/unistd') 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; +} -- cgit v1.2.3