51 #ifndef ADNS_WIN32_H_INCLUDED 52 #define ADNS_WIN32_H_INCLUDED 60 # ifdef ADNS_DLL_EXPORTS 61 # define ADNS_API __declspec(dllexport) 63 # define ADNS_API __declspec(dllimport) 69 #if defined (_MSC_VER) 70 #pragma warning(disable:4003) 78 #define WIN32_NO_STATUS 80 #define COM_NO_WINDOWS_H 94 #define HAVE_WINSOCK 1 96 #define inline __inline 98 #define ADNS_SOCKET SOCKET 99 #define adns_socket_close(sck) closesocket(sck) 100 #define adns_socket_read(sck, data, len) recv(sck, (char *)data, len, 0) 101 #define adns_socket_write(sck, data, len) send(sck, (char *)data, len, 0) 107 #define ADNS_CAPTURE_ERRNO {errno = WSAGetLastError(); WSASetLastError(errno);} 108 #define ADNS_CLEAR_ERRNO {WSASetLastError(errno = 0);} 110 #define ENOBUFS WSAENOBUFS 118 #define EWOULDBLOCK WSAEWOULDBLOCK 120 #define EINPROGRESS WSAEINPROGRESS 121 #define EMSGSIZE WSAEMSGSIZE 122 #define ENOPROTOOPT WSAENOPROTOOPT 123 #define ECONNRESET WSAECONNRESET 159 #define gettimeofday(tv, tz) adns_gettimeofday(tv, tz) 160 #define writev(FileDescriptor, iov, iovCount) adns_writev(FileDescriptor, iov, iovCount) 161 #define inet_aton(ap, inp) adns_inet_aton(ap, inp) 162 #define getpid() adns_getpid() 165 # define malloc(bytes) adns_malloc(bytes) 166 # define realloc(ptr, bytes) adns_realloc(ptr, bytes) 167 # define free(ptr) adns_free(ptr)
static unsigned char bytes[4]
ADNS_API int adns_writev(int FileDescriptor, const struct iovec *iov, int iovCount)
ADNS_API int adns_gettimeofday(struct timeval *tv, struct timezone *tz)
ADNS_API int adns_inet_aton(const char *cp, struct in_addr *inp)
ADNS_API int adns_getpid()