/* +----------------------------------------------------------------------+ | PHP Version 4 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2002 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available at through the world-wide-web at | | http://www.php.net/license/2_02.txt. | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Chris Vandomelen | | Sterling Hughes | | | | WinSock: Daniel Beulshausen | +----------------------------------------------------------------------+ */ #ifdef PHP_WIN32 #include #include #include "php.h" #include "php_sockets.h" #include "php_sockets_win.h" ssize_t readv(SOCKET sock, const struct iovec *iov, int iovcnt) { size_t bytes, remain, len, pos = 0; ssize_t retval; int i; char *buffer = NULL; for(bytes=0, i=0; is_addr = inet_addr(cp); if (inp->s_addr == INADDR_NONE) { return 0; } return 1; } int fcntl(int fd, int cmd, ...) { va_list va; int retval, io, mode; va_start(va, cmd); switch(cmd) { case F_GETFL: case F_SETFD: case F_GETFD: default: retval = -1; break; case F_SETFL: io = va_arg(va, int); mode = io == O_NONBLOCK ? 1 : 0; retval = ioctlsocket(fd, io, &mode); break; } va_end(va); return retval; } #endif