summaryrefslogtreecommitdiff
path: root/src/port/thread.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-09-05 17:43:40 +0000
committerBruce Momjian <bruce@momjian.us>2003-09-05 17:43:40 +0000
commite26af972b5fc350d5fe093e78dd88b7640bd7a90 (patch)
tree9e11d22305bf791cea358b5dcf9977452880bec6 /src/port/thread.c
parentcec1333bbabb7d83a30545d302154e9e37c3f4c8 (diff)
downloadpostgresql-e26af972b5fc350d5fe093e78dd88b7640bd7a90.tar.gz
ifdef out pqGetpwuid() because Win32 doesn't have struct passwd.
Needed for libpq builds, not just for native Win32 port, and probably for cygwin too.
Diffstat (limited to 'src/port/thread.c')
-rw-r--r--src/port/thread.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/port/thread.c b/src/port/thread.c
index 8446f01f8a..c00202a063 100644
--- a/src/port/thread.c
+++ b/src/port/thread.c
@@ -7,7 +7,7 @@
*
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
*
- * $Id: thread.c,v 1.5 2003/09/03 19:30:31 momjian Exp $
+ * $Id: thread.c,v 1.6 2003/09/05 17:43:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -66,6 +66,7 @@ pqStrerror(int errnum, char *strerrbuf, size_t buflen)
* Wrapper around getpwuid() or getpwuid_r() to mimic POSIX getpwuid_r()
* behaviour, if it is not available or required.
*/
+#ifndef WIN32
int
pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
size_t buflen, struct passwd **result)
@@ -84,6 +85,7 @@ pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
#endif
return (*result == NULL) ? -1 : 0;
}
+#endif
/*
* Wrapper around gethostbyname() or gethostbyname_r() to mimic