> The current state is an attempt to make code compile if it doesn't use > <pwd.h> or <grp.h>. I don't know whether this state can be significantly > improved. But if you have reasonable suggestions, please show them!
For requests to get the actual username I don't know if it is better to: 1) Try the official API GetUserName but it requires an additional windows library if it is not already included (which most of the time it is not) https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getusernamea 2) Rely on the environmental variable USERNAME which should contain the current user but clearly is just an ENV var 3) Return some constant value I would be inclined to do #2, it will be correct most of the time but not have additional deps. For the uid/gid if there is a specific constant we want to stick to for windows I can try to make sure to standardize on that. ~mitch (they, them) >