dbus-glib Build Problem

Tor Lillqvist tml at iki.fi
Tue May 29 11:56:06 PDT 2007

Thiago Macieira writes:
 > int __attribute__((__cdecl__)) _pipe (int __fildes[2], 4096, _O_BINARY);

Hmm, this might be caused by the (unfortunate) fact that the GLib
header gwin32.h currently contains:

#define pipe(phandles)	_pipe (phandles, 4096, _O_BINARY)

(This line has been removed in trunk GLib. It is not GLib's business
to go #defining stuff outside its namespace like that.)

So if one first includes <glib.h> and then some header (like Cygwin's
unistd.h) that declares "int _cdecl pipe(int __fildes[2]);" it will
expand to something like that.

But the pipe #define in gwin32.h is inside #ifdef G_OS_WIN32. When
compiling for Cygwin G_OS_WIN32 is *not* defined. G_OS_UNIX is. So I
think there is some confusion here between native Win32 and Cygwin,
like using headers (especially glibconfig.h) from a GLib built for
native Win32 when building for Cygwin. Don't do that!


More information about the dbus mailing list