]>
Commit | Line | Data |
---|---|---|
1f2f436a A |
1 | --- getlogin.c.bsdnew 2009-12-08 00:37:57.000000000 -0800 |
2 | +++ getlogin.c 2009-12-08 00:44:06.000000000 -0800 | |
3 | @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/get | |
224c7076 A |
4 | #define THREAD_LOCK() if (__isthreaded) _pthread_mutex_lock(&logname_mutex) |
5 | #define THREAD_UNLOCK() if (__isthreaded) _pthread_mutex_unlock(&logname_mutex) | |
6 | ||
7 | -extern int _getlogin(char *, int); | |
8 | +extern int __getlogin(char *, int); | |
9 | ||
10 | int _logname_valid; /* known to setlogin() */ | |
11 | static pthread_mutex_t logname_mutex = PTHREAD_MUTEX_INITIALIZER; | |
1f2f436a | 12 | @@ -59,7 +59,7 @@ getlogin_basic(int *status) |
224c7076 A |
13 | static char logname[MAXLOGNAME]; |
14 | ||
15 | if (_logname_valid == 0) { | |
16 | - if (_getlogin(logname, sizeof(logname)) < 0) { | |
17 | + if (__getlogin(logname, sizeof(logname)) < 0) { | |
18 | *status = errno; | |
19 | return (NULL); | |
20 | } | |
1f2f436a | 21 | @@ -82,7 +82,7 @@ getlogin(void) |
3d9156a7 A |
22 | } |
23 | ||
24 | int | |
25 | -getlogin_r(char *logname, int namelen) | |
26 | +getlogin_r(char *logname, size_t namelen) | |
27 | { | |
28 | char *result; | |
29 | int len; |