mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-27 15:05:17 +00:00
Remove DOS line-endings.
* src/socketcompat.h: Remove DOS line-endings in this file.
This commit is contained in:
parent
9d7661e415
commit
569200b6d4
@ -1,3 +1,8 @@
|
|||||||
|
Wed Jan 23 14:43:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
|
||||||
|
|
||||||
|
Remove DOS line-endings.
|
||||||
|
* src/socketcompat.h: Remove DOS line-endings in this file.
|
||||||
|
|
||||||
Tue Jan 22 16:27:47 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
Tue Jan 22 16:27:47 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* configure.ac: Remove use of PKG_CHECK_EXISTS macro. Avoid
|
* configure.ac: Remove use of PKG_CHECK_EXISTS macro. Avoid
|
||||||
|
@ -1,60 +1,60 @@
|
|||||||
/*
|
/*
|
||||||
* socketcompat.h: Socket compatibility for Windows, making it slightly
|
* socketcompat.h: Socket compatibility for Windows, making it slightly
|
||||||
* less painful to use.
|
* less painful to use.
|
||||||
*
|
*
|
||||||
* Use this header under the following circumstances:
|
* Use this header under the following circumstances:
|
||||||
* (a) Instead of including any of: <net/if.h>, <netinet/in.h>,
|
* (a) Instead of including any of: <net/if.h>, <netinet/in.h>,
|
||||||
* <sys/socket.h>, <netdb.h>, <netinet/tcp.h>, AND
|
* <sys/socket.h>, <netdb.h>, <netinet/tcp.h>, AND
|
||||||
* (b) The file will be part of what is built on Windows (basically
|
* (b) The file will be part of what is built on Windows (basically
|
||||||
* just remote client stuff).
|
* just remote client stuff).
|
||||||
*
|
*
|
||||||
* You need to use socket_errno() instead of errno to get socket
|
* You need to use socket_errno() instead of errno to get socket
|
||||||
* errors.
|
* errors.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 Red Hat, Inc.
|
* Copyright (C) 2008 Red Hat, Inc.
|
||||||
*
|
*
|
||||||
* See COPYING.LIB for the License of this software
|
* See COPYING.LIB for the License of this software
|
||||||
*
|
*
|
||||||
* Richard W.M. Jones <rjones@redhat.com>
|
* Richard W.M. Jones <rjones@redhat.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SOCKETCOMPAT_H__
|
#ifndef __SOCKETCOMPAT_H__
|
||||||
#define __SOCKETCOMPAT_H__
|
#define __SOCKETCOMPAT_H__
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifndef HAVE_WINSOCK2_H /* Unix & Cygwin. */
|
#ifndef HAVE_WINSOCK2_H /* Unix & Cygwin. */
|
||||||
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <netinet/tcp.h>
|
#include <netinet/tcp.h>
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
socket_errno (void)
|
socket_errno (void)
|
||||||
{
|
{
|
||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* MinGW & Win32 */
|
#else /* MinGW & Win32 */
|
||||||
|
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
|
||||||
/* Socket functions in Windoze don't set errno. Instead of using errno
|
/* Socket functions in Windoze don't set errno. Instead of using errno
|
||||||
* to test for socket errors, call this function to get the errno.
|
* to test for socket errors, call this function to get the errno.
|
||||||
*/
|
*/
|
||||||
static inline int
|
static inline int
|
||||||
socket_errno (void)
|
socket_errno (void)
|
||||||
{
|
{
|
||||||
return WSAGetLastError ();
|
return WSAGetLastError ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Compatibility. */
|
/* Compatibility. */
|
||||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||||
#define ECONNREFUSED WSAECONNREFUSED
|
#define ECONNREFUSED WSAECONNREFUSED
|
||||||
|
|
||||||
#endif /* HAVE_WINSOCK2_H */
|
#endif /* HAVE_WINSOCK2_H */
|
||||||
|
|
||||||
#endif /* __WINSOCKWRAPPER_H__ */
|
#endif /* __WINSOCKWRAPPER_H__ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user