diff options
author | dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-06-15 18:44:04 +0000 |
---|---|---|
committer | dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-06-15 18:44:04 +0000 |
commit | 76fee36660207f4eaea9c05fa12913ce860cb65c (patch) | |
tree | d5a27c78ffab0ddd70f2b6f25befa12a23fb646f /sockets.h | |
parent | a0211857cd029fea81aead88cd50c03ff7b1f8d3 (diff) |
BUILD : 1.7.3 (194) BUGS : none NOTES : Rolled back win32 support files in lieu of a branch.
git-svn-id: svn://svn.anope.org/anope/trunk@194 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@137 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'sockets.h')
-rw-r--r-- | sockets.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/sockets.h b/sockets.h deleted file mode 100644 index e5ae27c58..000000000 --- a/sockets.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * - * (C) 2004 Anope Team - * Contact us at info@anope.org - * - * Please read COPYING and README for furhter details. - * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * - * - */ - -#ifndef SOCKETS_H -#define SOCKETS_H - -#ifdef _WIN32 -typedef SOCKET ano_socket_t; -#define ano_sockread(fd, buf, len) recv(fd, buf, len, 0) -#define ano_sockwrite(fd, buf, len) send(fd, buf, len, 0) -#define ano_sockclose(fd) closesocket(fd) -#define ano_sockgeterr() WSAGetLastError() -#define ano_sockseterr(err) WSASetLastError(err) -/* ano_sockstrerror in sockutil.c */ -/* ano_socksetnonb in sockutil.c */ -#define ano_sockerrnonb(err) (err == WSAEINPROGRESS || err == WSAEWOULDBLOCK) -#define SOCKERR_EBADF WSAENOTSOCK -#define SOCKERR_EINTR WSAEINTR -#define SOCKERR_EINVAL WSAEINVAL -#define SOCKERR_EINPROGRESS WSAEINPROGRESS -#else -typedef int ano_socket_t; -#define ano_sockread(fd, buf, len) read(fd, buf, len) -#define ano_sockwrite(fd, buf, len) write(fd, buf, len) -#define ano_sockclose(fd) close(fd) -#define ano_sockgeterr() errno -#define ano_sockseterr(err) errno = err -#define ano_sockstrerror(err) strerror(err) -#define ano_socksetnonb(fd) fcntl(fd, F_SETFL, O_NONBLOCK) -#define ano_sockerrnonb(err) (err == EINPROGRESS) -#define SOCKERR_EBADF EBADF -#define SOCKERR_EINTR EINTR -#define SOCKERR_EINVAL EINVAL -#define SOCKERR_EINPROGRESS EINPROGRESS -#endif - -#endif |