Przeglądaj źródła

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 22 lat temu
rodzic
commit
47e3b888b6
1 zmienionych plików z 8 dodań i 0 usunięć
  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;
+}