mirror of
https://github.com/postgres/postgres.git
synced 2025-07-24 14:22:24 +03:00
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.
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: port.h,v 1.12 2003/08/08 21:42:31 momjian Exp $
|
* $Id: port.h,v 1.13 2003/09/05 17:43:39 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -112,8 +112,10 @@ extern void srandom(unsigned int seed);
|
|||||||
/* thread.h */
|
/* thread.h */
|
||||||
extern char *pqStrerror(int errnum, char *strerrbuf, size_t buflen);
|
extern char *pqStrerror(int errnum, char *strerrbuf, size_t buflen);
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
extern int pqGetpwuid(uid_t uid, struct passwd * resultbuf, char *buffer,
|
extern int pqGetpwuid(uid_t uid, struct passwd * resultbuf, char *buffer,
|
||||||
size_t buflen, struct passwd ** result);
|
size_t buflen, struct passwd ** result);
|
||||||
|
#endif
|
||||||
|
|
||||||
extern int pqGethostbyname(const char *name,
|
extern int pqGethostbyname(const char *name,
|
||||||
struct hostent * resbuf,
|
struct hostent * resbuf,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* 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()
|
* Wrapper around getpwuid() or getpwuid_r() to mimic POSIX getpwuid_r()
|
||||||
* behaviour, if it is not available or required.
|
* behaviour, if it is not available or required.
|
||||||
*/
|
*/
|
||||||
|
#ifndef WIN32
|
||||||
int
|
int
|
||||||
pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
|
pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
|
||||||
size_t buflen, struct passwd **result)
|
size_t buflen, struct passwd **result)
|
||||||
@ -84,6 +85,7 @@ pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
|
|||||||
#endif
|
#endif
|
||||||
return (*result == NULL) ? -1 : 0;
|
return (*result == NULL) ? -1 : 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wrapper around gethostbyname() or gethostbyname_r() to mimic
|
* Wrapper around gethostbyname() or gethostbyname_r() to mimic
|
||||||
|
Reference in New Issue
Block a user