This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Warning: Porting Win32 socket code


If you are porting code to CYGWIN32 that has already been ported to the
WIN32 API, and which uses the send/recv socket calls etc, beware that it
might well end up calling the wrong functions.  The file winsock.h
defines send as a PASCAL function, while socket.h defines it as an
ordinary C function.  Calling the wrong one is a good recipe for
failure.  The safest thing is probably to -UWIN32 and rebuild all of
your code.  If you get random failures in send/recv, check whether the
real function being called is send or send@16.  The latter of these is
the PASCAL imposter.  The assembly code mode of the debugger will show
you this.

--
Simon Tuffs
Systems Architect
Octant Technologies Inc

(remove -nospam from return address to reply by mail).


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]