2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Ancient Dragon
0

Ok, so if on my unix box I see a call to:

#if INCL_WINSOCK_API_PROTOTYPES
WINSOCK_API_LINKAGE
int
WSAAPI
connect(
    IN SOCKET s,
    __in_bcount(namelen) const struct sockaddr FAR * name,
    IN int namelen
    );
#endif /* INCL_WINSOCK_API_PROTOTYPES */

Does that mean something's not right?

0

>>Does that mean something's not right?
No, it means the code has been ported to both MS-Windows and *nix. If compiling on MS-Windows then define INCL_WINSOCK_API_PROTOTYPES somewhere before the code snippet you posted. Using preprocessor instructions like that is a common way to write portable programs that are compiled with different compilers and/or operating systems.

Use of the FAR macro would leave me to believe the code was written for some 16-bit segmented MS-DOS compiler. 32-bit compilers do not use FAR.

Edited by Ancient Dragon: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.