2
* usernm.c -- $Id: usernm.c,v 1.1 2003/03/08 15:26:48 travo Exp $
3
* p_getuser for UNIX machines
5
* Copyright (c) 1998. See accompanying LEGAL file for details.
9
#define _POSIX_SOURCE 1
17
#include <sys/types.h>
24
char *user = getlogin();
26
struct passwd *pw = getpwuid(getuid()); /* see also pathnm.c */
27
if (pw) user = pw->pw_name;
34
extern char *cuserid(char *);
38
char *user = cuserid((char *)0);