From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PG Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: pg_id.c windows fix |
Date: | 2003-10-10 01:35:05 |
Message-ID: | 200310100135.h9A1Z5426314@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
OK, patch applied. I changed DWORD to unsigned long.
---------------------------------------------------------------------------
Andrew Dunstan wrote:
> 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;
>
> pw->pw_uid = 1;
> #endif
> ***************
> *** 113,119 ****
> exit(1);
> }
>
> ! GetUserName(pw->pw_name, sizeof(pw->pw_name)-1);
> #endif
>
> if (!limit_user_info)
> --- 114,120 ----
> exit(1);
> }
>
> ! GetUserName(pw->pw_name, &pwname_size);
> #endif
>
> if (!limit_user_info)
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-10-10 01:39:13 | Re: [HACKERS] initdb |
Previous Message | Bruce Momjian | 2003-10-09 23:37:56 | Re: [HACKERS] initdb |