Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite26af97

Browse files
committed
ifdef out pqGetpwuid() because Win32 doesn't have struct passwd.
Needed for libpq builds, not just for native Win32 port, and probablyfor cygwin too.
1 parentcec1333 commite26af97

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎src/include/port.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: port.h,v 1.12 2003/08/08 21:42:31 momjian Exp $
9+
* $Id: port.h,v 1.13 2003/09/05 17:43:39 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -112,8 +112,10 @@ extern void srandom(unsigned int seed);
112112
/* thread.h */
113113
externchar*pqStrerror(interrnum,char*strerrbuf,size_tbuflen);
114114

115+
#ifndefWIN32
115116
externintpqGetpwuid(uid_tuid,structpasswd*resultbuf,char*buffer,
116117
size_tbuflen,structpasswd**result);
118+
#endif
117119

118120
externintpqGethostbyname(constchar*name,
119121
structhostent*resbuf,

‎src/port/thread.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
99
*
10-
* $Id: thread.c,v 1.5 2003/09/03 19:30:31 momjian Exp $
10+
* $Id: thread.c,v 1.6 2003/09/05 17:43:40 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -66,6 +66,7 @@ pqStrerror(int errnum, char *strerrbuf, size_t buflen)
6666
* Wrapper around getpwuid() or getpwuid_r() to mimic POSIX getpwuid_r()
6767
* behaviour, if it is not available or required.
6868
*/
69+
#ifndefWIN32
6970
int
7071
pqGetpwuid(uid_tuid,structpasswd*resultbuf,char*buffer,
7172
size_tbuflen,structpasswd**result)
@@ -84,6 +85,7 @@ pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
8485
#endif
8586
return (*result==NULL) ?-1 :0;
8687
}
88+
#endif
8789

8890
/*
8991
* Wrapper around gethostbyname() or gethostbyname_r() to mimic

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp