diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2010-03-26 21:08:35 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2010-03-26 21:08:35 +0000 |
commit | 30feca091914f8d41f452394367677bfe56b3316 (patch) | |
tree | b9f750862b34524d3bcf230ab749d293e9caebc8 /libc/sysdeps/unix/getlogin.c | |
parent | 5c92b8030ed5819dd183df7cc3cfb085317beb16 (diff) |
Merge changes between r10031 and r10115 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@10116 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps/unix/getlogin.c')
-rw-r--r-- | libc/sysdeps/unix/getlogin.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/sysdeps/unix/getlogin.c b/libc/sysdeps/unix/getlogin.c index 4752685f8..b0ad97cfa 100644 --- a/libc/sysdeps/unix/getlogin.c +++ b/libc/sysdeps/unix/getlogin.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1996, 1997, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,16 +25,20 @@ #include <utmp.h> +static char name[UT_NAMESIZE + 1]; + /* Return the login name of the user, or NULL if it can't be determined. The returned pointer, if not NULL, is good only until the next call. */ +#ifdef STATIC +STATIC +#endif char * getlogin (void) { char tty_pathname[2 + 2 * NAME_MAX]; char *real_tty_path = tty_pathname; char *result = NULL; - static char name[UT_NAMESIZE + 1]; struct utmp *ut, line, buffer; /* Get name of tty connected to fd 0. Return NULL if not a tty or |