dbus-sysdeps-unix.h
Havoc Pennington
hp at redhat.com
Sun Sep 10 11:20:23 PDT 2006
Hi,
For people working on the Windows port - I think it's important not to
take UNIX emulation too far. For example, the unix: addresses should
fail on Windows, i.e. don't try to emulate
dbus_(connect,listen)_unix_socket on Windows. Instead, a
Windows-specific appropriate mechanism should be used, whatever it is.
Maybe Windows always uses tcp: for now.
Essentially, any emulate-unix-on-windows hacks should stay internal and
not leak out into config files, bus addresses, or the public API.
The public functions with _unix in the name should always return an
error on Windows, they should not do emulation stuff.
One thing I think might help with this is a dbus-sysdeps-unix.h header
that has the stuff from dbus-sysdeps.h which is truly unix-specific,
like the unix socket functions. Then be sure this header is not included
on Windows - perhaps put a #error "not on windows" in there if it is.
I think in an ideal world, a fair bit of dbus-sysdeps.h is either in
dbus-sysdeps-unix.h or gets modified to be less unix-like, e.g.
returning a DBusError instead of setting errno, etc.
To start though, a few of the major items like unix sockets might make
sense in dbus-sysdeps-unix.h.
Havoc
More information about the dbus
mailing list