#define THREAD_LOCK() if (__isthreaded) _pthread_mutex_lock(&logname_mutex)
#define THREAD_UNLOCK() if (__isthreaded) _pthread_mutex_unlock(&logname_mutex)
-extern int _getlogin(char *, int);
+extern int __getlogin(char *, int);
int _logname_valid; /* known to setlogin() */
static pthread_mutex_t logname_mutex = PTHREAD_MUTEX_INITIALIZER;
static char logname[MAXLOGNAME];
if (_logname_valid == 0) {
- if (_getlogin(logname, sizeof(logname)) < 0) {
+ if (__getlogin(logname, sizeof(logname)) < 0) {
*status = errno;
return (NULL);
}
}
int
-getlogin_r(char *logname, int namelen)
+getlogin_r(char *logname, size_t namelen)
{
char *result;
int len;