Re: pg_id.c windows fix - Mailing list pgsql-patches

From Stephan Szabo
Subject Re: pg_id.c windows fix
Date
Msg-id 20031004224132.F57459@megazone.bigpanda.com
Whole thread Raw
In response to Re: pg_id.c windows fix  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
On Sun, 5 Oct 2003, Bruce Momjian wrote:

>
> Can you tell me what Win32 compile environment can't handle a sizeof()
> as a function parameter?
>
> !       GetUserName(pw->pw_name, sizeof(pw->pw_name)-1);
>
> Does casting to DWORD help?

> > !       GetUserName(pw->pw_name, &pwname_size);

It looks like the second argument is supposed to be a pointer and probably
returns back the length actually used (if it follows the pattern of other
win32 calls)

It's something like:
BOOL GetUserName(
    LPTSTR lpBuffer,    // address of name buffer
    LPDWORD nSize     // address of size of name buffer
   );

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_id.c windows fix
Next
From: "Andrew Dunstan"
Date:
Subject: Re: pg_id.c windows fix