Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 99a53d8

Browse files
committed
Allow pg_id to compile on Win32.
Andrew Dunstan
1 parent de8b3b4 commit 99a53d8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bin/pg_id/pg_id.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
88
*
9-
* $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.24 2003/09/07 03:43:53 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.25 2003/10/10 01:34:51 momjian Exp $
1010
*/
1111
#include "postgres_fe.h"
1212

@@ -38,6 +38,7 @@ main(int argc, char *argv[])
3838
char pw_name[128];
3939
} pass_win32;
4040
struct passwd_win32 *pw = &pass_win32;
41+
unsigned long pwname_size = sizeof(pass_win32.pw_name) - 1;
4142

4243
pw->pw_uid = 1;
4344
#endif
@@ -113,7 +114,7 @@ main(int argc, char *argv[])
113114
exit(1);
114115
}
115116

116-
GetUserName(pw->pw_name, sizeof(pw->pw_name)-1);
117+
GetUserName(pw->pw_name, &pwname_size);
117118
#endif
118119

119120
if (!limit_user_info)

0 commit comments

Comments
 (0)