home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 March / CMCD0304.ISO / Software / Freeware / Programare / nullsoft / nsis20.exe / Contrib / NSISdl / netinc.h < prev    next >
C/C++ Source or Header  |  2002-12-04  |  952b  |  43 lines

  1. /*
  2. ** JNetLib
  3. ** Copyright (C) 2000-2001 Nullsoft, Inc.
  4. ** Author: Justin Frankel
  5. ** File: netinc.h - network includes and portability defines (used internally)
  6. ** License: see jnetlib.h
  7. */
  8.  
  9. #ifndef _NETINC_H_
  10. #define _NETINC_H_
  11.  
  12. #include <windows.h>
  13. #include "util.h"
  14.  
  15. #define strcasecmp(x,y) stricmp(x,y)
  16. #define ERRNO (WSAGetLastError())
  17. #define SET_SOCK_BLOCK(s,block) { unsigned long __i=block?0:1; ioctlsocket(s,FIONBIO,&__i); }
  18. #define EWOULDBLOCK WSAEWOULDBLOCK
  19. #define EINPROGRESS WSAEWOULDBLOCK
  20. #define memset mini_memset
  21. #define memcpy mini_memcpy
  22. #define strcpy lstrcpy
  23. #define strncpy lstrcpyn
  24. #define strcat lstrcat
  25. #define strlen lstrlen
  26. #define malloc(x) (new char[x])
  27. #define free(x) {delete x;}
  28. typedef int socklen_t;
  29.  
  30. #ifndef INADDR_NONE
  31. #define INADDR_NONE 0xffffffff
  32. #endif
  33.  
  34. #ifndef INADDR_ANY
  35. #define INADDR_ANY 0
  36. #endif
  37.  
  38. #ifndef SHUT_RDWR
  39. #define SHUT_RDWR 2
  40. #endif
  41.  
  42. #endif //_NETINC_H_
  43.