2002-08-02 10:01:35 +00:00
|
|
|
/*
|
|
|
|
** JNetLib
|
|
|
|
** Copyright (C) 2000-2001 Nullsoft, Inc.
|
|
|
|
** Author: Justin Frankel
|
|
|
|
** File: netinc.h - network includes and portability defines (used internally)
|
2009-12-05 21:23:57 +00:00
|
|
|
** License: see License.txt
|
2002-08-02 10:01:35 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NETINC_H_
|
|
|
|
#define _NETINC_H_
|
|
|
|
|
|
|
|
#include <windows.h>
|
2002-12-04 20:05:35 +00:00
|
|
|
#include "util.h"
|
|
|
|
|
2002-08-02 10:01:35 +00:00
|
|
|
#define strcasecmp(x,y) stricmp(x,y)
|
|
|
|
#define ERRNO (WSAGetLastError())
|
|
|
|
#define SET_SOCK_BLOCK(s,block) { unsigned long __i=block?0:1; ioctlsocket(s,FIONBIO,&__i); }
|
|
|
|
#define EWOULDBLOCK WSAEWOULDBLOCK
|
|
|
|
#define EINPROGRESS WSAEWOULDBLOCK
|
2002-12-04 20:05:35 +00:00
|
|
|
#define memset mini_memset
|
|
|
|
#define memcpy mini_memcpy
|
|
|
|
#define strcpy lstrcpy
|
|
|
|
#define strncpy lstrcpyn
|
|
|
|
#define strcat lstrcat
|
|
|
|
#define strlen lstrlen
|
|
|
|
#define malloc(x) (new char[x])
|
2005-06-13 19:39:36 +00:00
|
|
|
#define free(x) {delete [] x;}
|
2002-08-02 10:01:35 +00:00
|
|
|
typedef int socklen_t;
|
|
|
|
|
|
|
|
#ifndef INADDR_NONE
|
|
|
|
#define INADDR_NONE 0xffffffff
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef INADDR_ANY
|
|
|
|
#define INADDR_ANY 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SHUT_RDWR
|
|
|
|
#define SHUT_RDWR 2
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif //_NETINC_H_
|