mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
Allow pg_id to compile on Win32.
Andrew Dunstan
This commit is contained in:
parent
de8b3b4913
commit
99a53d89c8
@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.24 2003/09/07 03:43:53 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.25 2003/10/10 01:34:51 momjian Exp $
|
||||
*/
|
||||
#include "postgres_fe.h"
|
||||
|
||||
@ -38,6 +38,7 @@ main(int argc, char *argv[])
|
||||
char pw_name[128];
|
||||
} pass_win32;
|
||||
struct passwd_win32 *pw = &pass_win32;
|
||||
unsigned long pwname_size = sizeof(pass_win32.pw_name) - 1;
|
||||
|
||||
pw->pw_uid = 1;
|
||||
#endif
|
||||
@ -113,7 +114,7 @@ main(int argc, char *argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
GetUserName(pw->pw_name, sizeof(pw->pw_name)-1);
|
||||
GetUserName(pw->pw_name, &pwname_size);
|
||||
#endif
|
||||
|
||||
if (!limit_user_info)
|
||||
|
Loading…
Reference in New Issue
Block a user