* net.cc (cygwin_inet_ntoa): Rearrange previous patch to use
thread local buffer space when compiled thread safe. (cygwin_getprotobyname): Ditto. (cygwin_getprotobynumber): Ditto. (cygwin_getservbyname): Ditto. (cygwin_getservbyport): Ditto. (cygwin_gethostbyname): Ditto. (cygwin_gethostbyaddr): Ditto. Move near to cygwin_gethostbyname. * thread.h (struct _winsup_t): Add pointers for above used buffer space. * passwd.cc (getpwduid): Remove initializing passwd. (setpwent): Ditto. (endpwent): Ditto. (setpassent): Ditto.
This commit is contained in:
@@ -376,36 +376,24 @@ getpwent (void)
|
||||
extern "C" struct passwd *
|
||||
getpwduid (uid_t)
|
||||
{
|
||||
if (passwd_state <= initializing)
|
||||
read_etc_passwd ();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
setpwent (void)
|
||||
{
|
||||
if (passwd_state <= initializing)
|
||||
read_etc_passwd ();
|
||||
|
||||
pw_pos = 0;
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
endpwent (void)
|
||||
{
|
||||
if (passwd_state <= initializing)
|
||||
read_etc_passwd ();
|
||||
|
||||
pw_pos = 0;
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
setpassent ()
|
||||
{
|
||||
if (passwd_state <= initializing)
|
||||
read_etc_passwd ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user