Lennart Poettering <mzynq(a)0pointer.de> writes:
I am Linux developer. My priority is Linux.
That's nice, but most of us developers don't have the luxury of being
able to forget about portability. I've spent quite a bit of effort
packaging software for other free operating systems, and there's already
a widespread (and largely justified) stereotype that Linux developers
don't write portable code. Please don't contribute to the problem.
I don't think it is worth creating a tiny mini
library that I'd need
to maintain and everyone depend on for just one (or two) little
function call. Especially since this would be an extra dep to a lot of
software.
But instead you're proposing adding two dependencies (the D-Bus client
library and the RealtimeKit service), and having everybody who wants to
use it copy a large chunk of code into their project. I don't see how
that's a simpler option than providing a library interface; it's
certainly not simpler to write a configure test for.
Also, the reference client should compile fine on
non-Linux, however
it will become a NOP and return ENOSUPP when you call it.
Whether the kernel is Linux or not is completely irrelevant for a
program trying to get realtime priority using your service. What matters
is whether D-Bus is available. Suppose I go away and implement your
realtime service for FreeBSD; because of that #ifdef, I now need to go
and patch every application that's copied your code before it'll work.
If the API were a library, like essentially every other API on a modern
Unix-like system, then I'd only have to change the library to add
support for new platforms and mechanisms, and I'd be able to support
systems where asking another process to increase your privileges isn't
the right way to do things.
How did you come to the conclusion that dbus was
AFL/GPL2-only? Can you
point me to where this is claimed?
It's stated clearly in the COPYING file for D-Bus: "D-Bus is licensed to
you under your choice of the Academic Free License version 2.1, or the
GNU General Public License version 2." If that isn't their intent, it
needs fixing.
--
Adam Sampson <ats(a)offog.org> <http://offog.org/>