File:  [Qemu by Fabrice Bellard] / qemu / qemu_socket.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:40:55 2018 UTC (18 months, 3 weeks ago) by root
Branches: qemu, MAIN
CVS tags: qemu0082, qemu0081, HEAD
qemu 0.8.1

    1: /* headers to use the BSD sockets */
    2: #ifndef QEMU_SOCKET_H
    3: #define QEMU_SOCKET_H
    4: 
    5: #ifdef _WIN32
    6: 
    7: #include <windows.h>
    8: #include <winsock2.h>
    9: #include <ws2tcpip.h>
   10: 
   11: #define socket_error() WSAGetLastError()
   12: #undef EINTR
   13: #define EWOULDBLOCK WSAEWOULDBLOCK
   14: #define EINTR       WSAEINTR
   15: #define EINPROGRESS WSAEINPROGRESS
   16: 
   17: #else
   18: 
   19: #include <sys/socket.h>
   20: #include <netinet/in.h>
   21: #include <netinet/tcp.h>
   22: 
   23: #define socket_error() errno
   24: #define closesocket(s) close(s)
   25: 
   26: #endif /* !_WIN32 */
   27: 
   28: void socket_set_nonblock(int fd);
   29: 
   30: #endif /* QEMU_SOCKET_H */

unix.superglobalmegacorp.com