pg_id.c windows fix
От | Andrew Dunstan |
---|---|
Тема | pg_id.c windows fix |
Дата | |
Msg-id | 002001c38a7c$a08144f0$6401a8c0@DUNSLANE обсуждение исходный текст |
Ответы |
Re: pg_id.c windows fix
Re: pg_id.c windows fix |
Список | pgsql-patches |
Here's a patch for pg_id.c that lets it compile cleanly and run on Windows.
cheers
andrew
Index: src/bin/pg_id/pg_id.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/pg_id/pg_id.c,v
retrieving revision 1.22.2.1
diff -c -w -r1.22.2.1 pg_id.c
*** src/bin/pg_id/pg_id.c 7 Sep 2003 04:37:04 -0000 1.22.2.1
--- src/bin/pg_id/pg_id.c 4 Oct 2003 13:33:30 -0000
***************
*** 38,43 ****
--- 38,44 ----
char pw_name[128];
} pass_win32;
struct passwd_win32 *pw = &pass_win32;
+ DWORD pwname_size = sizeof(pass_win32.pw_name) - 1;
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/pg_id/pg_id.c,v
retrieving revision 1.22.2.1
diff -c -w -r1.22.2.1 pg_id.c
*** src/bin/pg_id/pg_id.c 7 Sep 2003 04:37:04 -0000 1.22.2.1
--- src/bin/pg_id/pg_id.c 4 Oct 2003 13:33:30 -0000
***************
*** 38,43 ****
--- 38,44 ----
char pw_name[128];
} pass_win32;
struct passwd_win32 *pw = &pass_win32;
+ DWORD pwname_size = sizeof(pass_win32.pw_name) - 1;
pw->pw_uid = 1;
#endif
***************
*** 113,119 ****
exit(1);
}
#endif
***************
*** 113,119 ****
exit(1);
}
! GetUserName(pw->pw_name, sizeof(pw->pw_name)-1);
#endif
#endif
if (!limit_user_info)
--- 114,120 ----
exit(1);
}
--- 114,120 ----
exit(1);
}
! GetUserName(pw->pw_name, &pwname_size);
#endif
#endif
if (!limit_user_info)
В списке pgsql-patches по дате отправления: