Re: 7/22 no uid_t / getuid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 07, 2007 at 12:42:35PM +0100, Jim Meyering wrote:
> "Richard W.M. Jones" <rjones@xxxxxxxxxx> wrote:
> > There is no uid_t or getuid in MinGW.
> >
> > I'm not really sure that forcing connections readonly if the user is
> > non-root is a useful thing to be doing anyway, so perhaps this code is
> > better off just being deleted?
> 
> For the missing uid_t, you could add this to configure.in
> AC_CHECK_TYPE(mode_t, int)
> then no need for ifndef around the decl of "uid".
> 
> With this function (and a test for getuid in configure.in),
> (or maybe that should be "return 0"?)
> 
> #ifndef HAVE_GETUID
> static int getuid() { return 1; }
> #endif /* __MINGW32__ */
> 
> you could avoid the remaining ifdefs.

 Sounds better, maybe return -1 to indicate it is a failure, though uid_t
should be unsigned,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]