Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
47e3b888b6
1 muutettua tiedostoa jossa 8 lisäystä ja 0 poistoa
  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;
+}