Ver código fonte

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 23 anos atrás
pai
commit
47e3b888b6
1 arquivos alterados com 8 adições e 0 exclusões
  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;
+}