diff options
| author | Jakob Kaivo <jkk@ung.org> | 2024-01-31 16:44:28 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2024-01-31 16:44:28 -0500 |
| commit | 2bc46bd54cc8cdcd7647461f2d76384266f2a0e4 (patch) | |
| tree | 52b77d68abbe5f971f63d2c82df8e933b831b521 /src/unistd/cuserid.c | |
| parent | a05e8f1436eecb990d68bc1de8ba28721f1f387d (diff) | |
remove unistd
Diffstat (limited to 'src/unistd/cuserid.c')
| -rw-r--r-- | src/unistd/cuserid.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/unistd/cuserid.c b/src/unistd/cuserid.c deleted file mode 100644 index f075c5bf..00000000 --- a/src/unistd/cuserid.c +++ /dev/null @@ -1,35 +0,0 @@ -#if 0 - -#include <stddef.h> -#include <sys/types.h> -#include <unistd.h> -#include <stdio.h> -#include <string.h> -#include <pwd.h> - -char *cuserid(char *s) -{ - static char userid[L_cuserid]; - - struct passwd *pwd = getpwuid(geteuid()); - - if (s == NULL) { - s = userid; - } - - if (pwd == NULL) { - s[0] = '\0'; - } else { - strcpy(s, pwd->pw_name); - } - - return s; -} - -/* -TODO: verify -POSIX(1, 199506) -*/ - - -#endif |
