> From: l...@gnu.org (Ludovic Courtès) > Cc: Eli Zaretskii <e...@gnu.org>, wi...@pobox.com, guile-devel@gnu.org > Date: Tue, 05 Jul 2016 10:04:23 +0200 > > Mark H Weaver <m...@netris.org> skribis: > > > Eli Zaretskii <e...@gnu.org> writes: > > > >>> From: Mark H Weaver <m...@netris.org> > >>> Cc: l...@gnu.org (Ludovic Courtès), wi...@pobox.com, > >>> guile-devel@gnu.org > >>> Date: Sat, 02 Jul 2016 19:02:08 -0400 > >>> > >>> Eli Zaretskii <e...@gnu.org> writes: > >>> > +# define getuid() (500) /* Local Administrator */ > >>> > +# define getgid() (513) /* None */ > >>> > +# define setuid(u) (0) > >>> > +# define setgid(g) (0) > > What about leaving ‘setuid’ and ‘setgid’ undefined, as was the case > until now?
I fail to see how this would be better. It would mean any program that calls these will not work on MS-Windows. Why should we expect developers of those Guile programs to be aware of the issue and solve it on the Guile Scheme level? And what solution will they possibly be able to come up with, except not to call these APIs on Windows? > ‘getuid’ and ‘getgid’ could either be undefined or return a “random” > value; the latter only makes sense if in practice it helps run useful > code without any observable difference, though I’m unsure whether such > code exists. Random values are better than nothing, but they are worse than consistent values, because some program might record the value from one call and then compare it further down the program flow with the results of another call. Consistent values will win in this case. > Anyway, I think we shouldn’t lose our hair over this problem; I’m > grateful Eli did all this work porting Guile to MinGW, and that is what > matters most. Thank you. I certainly hope so.