error compiling giochannel.h in a Win64 build environment



Hi -

I'm not actually trying to compile glib source itself at the moment, but I am taking the 2.8.6 runtime/dev bits I've already installed and am trying to compile netperf4 in an IA64 build enviromment (on an XP laptop with the DDK installed.

The compiler is complaining about my calls to g_io_channel_win32_new_socket - it is saying that there is a possible loss of data converting from a SOCKET to a gint and refusing to generate an object file. I went looking at giochannel.h and found g_io_channel_win32_new_socket takes a "gint socket" as its input. I confirmed it is still that way in 2.10.2 giochannel.h:

/* Create an IO channel for a winsock socket. The parameter should be
 * a SOCKET. Contrary to IO channels for file descriptors (on *Win32),
 * you can use normal recv() or recvfrom() on sockets even if GLib
 * is polling them.
 */
GIOChannel *g_io_channel_win32_new_socket (gint socket);

Shouldn't that parameter be a SOCKET rather than a gint? _I_ am being a good little Windows programmer :) and declaring all my sockets as SOCKET as I'm supposed to, but the above then causes problems. I'm guessing that in a 64-bit compile environment a SOCKET is a 64-bit quantity rather than 32.

sincerely,

rick jones



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]