2 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
6 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
7 /* All Rights Reserved */
10 * Copyright (c) 1980 Regents of the University of California.
11 * All rights reserved. The Berkeley software License Agreement
12 * specifies the terms and conditions for redistribution.
15 #pragma ident "%Z%%M% %I% %E% SMI"
18 #include <sys/types.h>
23 #define MSG "whoami: no login associated with uid %u.\n"
30 main(int argc
, char *argv
[])
36 /* Set locale environment variables local definitions */
37 (void) setlocale(LC_ALL
, "");
38 #if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */
39 #define TEXT_DOMAIN "SYS_TEST" /* Use this only if it wasn't */
41 (void) textdomain(TEXT_DOMAIN
);
46 (void) printf(gettext(MSG
), euid
);
49 (void) printf("%s\n", pp
->pw_name
);