Skip to content
Snippets Groups Projects
Commit b0c241d4 authored by Jean-Damien Durand's avatar Jean-Damien Durand Committed by Steven Murray
Browse files

Enclose defintions of INVALID_SOCKET, SOCKET_ERROR, closesocket, ioctlsocket...

Enclose defintions of INVALID_SOCKET, SOCKET_ERROR, closesocket, ioctlsocket between #ifndef/#endif (they are coming from _WIN32 and CASTOR is not the only package trying to mimic _WIN32 with #define hacks - an example is gsoap and its redefinition of closesocket [btw gsoap should have protected his definition as well...])
parent c8716fa4
Branches
Tags
No related merge requests found
/*
* $Id: net.h,v 1.4 2000/06/14 13:42:37 jdurand Exp $
* $Id: net.h,v 1.5 2005/07/14 14:02:52 jdurand Exp $
*/
#ifndef _NET_H
......@@ -43,12 +43,19 @@ typedef int SOCKET;
* SOCKET_ERROR should be used for all other network routines
* returning an int, e.g. connect(), bind()
*/
#ifndef INVALID_SOCKET
#define INVALID_SOCKET -1
#endif
#ifndef SOCKET_ERROR
#define SOCKET_ERROR -1
#endif
#ifndef closesocket
#define closesocket close
#endif
#ifndef ioctlsocket
#define ioctlsocket ioctl
#endif
#else /* _WIN32 */
#include <winsock2.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment