librb: further cleanups
This commit is contained in:
parent
dc7e6b42ca
commit
17e4e6af83
2 changed files with 7 additions and 10 deletions
|
@ -33,15 +33,6 @@
|
|||
|
||||
#define FD_DESC_SZ 128 /* hostlen + comment */
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#define rb_get_errno() do { errno = WSAGetLastError(); WSASetLastError(errno); } while(0)
|
||||
typedef SOCKET rb_platform_fd_t;
|
||||
#else
|
||||
#define rb_get_errno()
|
||||
typedef int rb_platform_fd_t;
|
||||
#endif
|
||||
|
||||
#define rb_hash_fd(x) ((x ^ (x >> RB_FD_HASH_BITS) ^ (x >> (RB_FD_HASH_BITS * 2))) & RB_FD_HASH_MASK)
|
||||
|
||||
#ifdef HAVE_WRITEV
|
||||
|
|
|
@ -66,7 +66,13 @@ char *alloca();
|
|||
#define rb_unlikely(x) (x)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#define rb_get_errno() do { errno = WSAGetLastError(); WSASetLastError(errno); } while(0)
|
||||
typedef SOCKET rb_platform_fd_t;
|
||||
#else
|
||||
#define rb_get_errno()
|
||||
typedef int rb_platform_fd_t;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <process.h>
|
||||
|
|
Loading…
Reference in a new issue