On Thu, Jan 15, 2009 at 01:37:01PM +0000, Daniel P. Berrange wrote: > On Thu, Jan 15, 2009 at 01:27:00PM +0000, John Levon wrote: > > On Thu, Jan 15, 2009 at 01:15:13PM +0000, Richard W.M. Jones wrote: > > > > > We really should go by features detected in configure, not assumptions > > > about the platform which may not even be true. > > > > That's my point. They are true, and they always will be. In fact, it's > > MUCH safer in these cases to check __sun. I can't check for stropts.h, > > since someone might have installed that icky STREAMS stuff on Linux, > > which would then break. I can't check for priv.h, since it's generic > > enough to exist in different form on other platforms. Even if least priv > > in the exact Solaris form gets ported to say BSD, it won't have > > __init_suid_priv(), for example. > > > > I'm not arguing against configure checks in the general case (e.g. > > cfmakeraw), but these two cases (STREAMS terminals and least priv) are > > very different. > > I think configure.ac checks for things like the ioctl flags for TTY > attr settings are reasonable, because it is conceivable that other OS > may implement such flags later. For stuff like the STREAMS/privilege > bits they are so completely Solaris specific its easier to just #ifdef > __sun them One caveat on the latter though - if there's solaris specific stuff that is only available on newer Solaris versions, then a configure.ac check would be sensible to allow it to still build on earlier versions, depending on how much back-compat support you want todo, and whether its still practical to work without the feature in question. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list