66 size_t buflen,
struct passwd **result)
68 #if defined(FRONTEND) && defined(ENABLE_THREAD_SAFETY) && defined(HAVE_GETPWUID_R) 69 return getpwuid_r(uid, resultbuf, buffer, buflen, result);
73 *result = getpwuid(uid);
75 return (*result == NULL) ? errno : 0;
85 #ifndef HAVE_GETADDRINFO 88 struct hostent *resultbuf,
89 char *buffer,
size_t buflen,
90 struct hostent **result,
93 #if defined(FRONTEND) && defined(ENABLE_THREAD_SAFETY) && defined(HAVE_GETHOSTBYNAME_R) 99 *result = gethostbyname_r(name, resultbuf, buffer, buflen, herrno);
100 return (*result == NULL) ? -1 : 0;
104 *result = gethostbyname(name);
int pqGethostbyname(const char *name, struct hostent *resultbuf, char *buffer, size_t buflen, struct hostent **result, int *herrno)
int pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer, size_t buflen, struct passwd **result)