* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
- * $Id: commio.h 24059 2007-07-24 17:25:41Z androsyn $
*/
#ifndef _COMMIO_INT_H
#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
#define SetFDOpen(F) (F->flags |= FLAG_OPEN)
#define ClearFDOpen(F) (F->flags &= ~FLAG_OPEN)
+#if !defined(SHUT_RDWR) && defined(_WIN32)
+# define SHUT_RDWR SD_BOTH
+#endif
struct _fde
{