| 62 | */ |
| 63 | #ifndef WIN32 |
| 64 | int |
| 65 | pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer, |
| 66 | size_t buflen, struct passwd **result) |
| 67 | { |
| 68 | #if defined(ENABLE_THREAD_SAFETY) && defined(HAVE_GETPWUID_R) |
| 69 | return getpwuid_r(uid, resultbuf, buffer, buflen, result); |
| 70 | #else |
| 71 | /* no getpwuid_r() available, just use getpwuid() */ |
| 72 | errno = 0; |
| 73 | *result = getpwuid(uid); |
| 74 | /* paranoia: ensure we return zero on success */ |
| 75 | return (*result == NULL) ? errno : 0; |
| 76 | #endif |
| 77 | } |
| 78 | #endif |
| 79 | |
| 80 | /* |
no outgoing calls
no test coverage detected