Anthony Liguori, le Wed 06 Feb 2008 13:19:23 -0600, a écrit : > Ian Jackson wrote: > >iwj writes ("[PATCH] Allow AF_UNIX sockets to be disabled on non-Windows"): > > > >>The patch below makes it possible to disable AF_UNIX (unix-domain) > >>sockets in host environments which do not define _WIN32, by adding > >>-DNO_UNIX_SOCKETS to the compiler flags. This is useful in the > >>effectively-embedded qemu host which are going to be using for device > >>emulation in Xen. > > It should just check a define for _MINIOS.
That's exactly what we wanted to avoid. > That makes it a lot more obvious why it's not being included. But it doesn't necessarily make obvious _what_ is not being included (here, local sockets). To my mind, something like #if !(defined(_WIN32) || defined(_MINIOS)) #define DO_UNIX_SOCKET #endif And then in the code, #ifdef DO_UNIX_SOCKET, is much nicer than repeating the if (!def||def) everywhere (and have to change them all if another system needs that too) Samuel