Re: [PATCH 2/3] getpwuid(mingw): provide a better default for the user name

2018-10-16 Thread Johannes Schindelin
Hi Eric, On Tue, 16 Oct 2018, Eric Sunshine wrote: > On Tue, Oct 16, 2018 at 8:38 AM Johannes Schindelin > wrote: > > On Mon, 15 Oct 2018, Eric Sunshine wrote: > > > On Mon, Oct 15, 2018 at 5:47 AM Johannes Schindelin via GitGitGadget > > > wrote: > > > > + len = ARRAY_SIZE(wbuffer); > >

Re: [PATCH 2/3] getpwuid(mingw): provide a better default for the user name

2018-10-16 Thread Eric Sunshine
On Tue, Oct 16, 2018 at 8:38 AM Johannes Schindelin wrote: > On Mon, 15 Oct 2018, Eric Sunshine wrote: > > On Mon, Oct 15, 2018 at 5:47 AM Johannes Schindelin via GitGitGadget > > wrote: > > > + len = ARRAY_SIZE(wbuffer); > > > + if (GetUserNameExW(type, wbuffer, &len)) { > > > +

Re: [PATCH 2/3] getpwuid(mingw): provide a better default for the user name

2018-10-16 Thread Johannes Schindelin
Hi Eric, On Mon, 15 Oct 2018, Eric Sunshine wrote: > On Mon, Oct 15, 2018 at 5:47 AM Johannes Schindelin via GitGitGadget > wrote: > > We do have the excellent GetUserInfoEx() function to obtain more > > detailed information of the current user (if the user is part of a > > Windows domain); Let'

Re: [PATCH 2/3] getpwuid(mingw): provide a better default for the user name

2018-10-15 Thread Eric Sunshine
On Mon, Oct 15, 2018 at 5:47 AM Johannes Schindelin via GitGitGadget wrote: > We do have the excellent GetUserInfoEx() function to obtain more > detailed information of the current user (if the user is part of a > Windows domain); Let's use it. > [...] > Signed-off-by: Johannes Schindelin > --- >

[PATCH 2/3] getpwuid(mingw): provide a better default for the user name

2018-10-15 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin We do have the excellent GetUserInfoEx() function to obtain more detailed information of the current user (if the user is part of a Windows domain); Let's use it. Suggested by Lutz Roeder. To avoid the cost of loading Secur32.dll (even lazily, loading DLLs takes a non-