Browse Source

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...

Eric Andersen 21 years ago
parent
commit
47e3b888b6
1 changed files with 8 additions and 0 deletions
  1. 8 0
      libc/unistd/getlogin.c

+ 8 - 0
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;
+}