提交 f79ebbd1 编写于 作者: J Jim Meyering

remove src/socketcompat.h; no longer needed

* src/socketcompat.h: Remove file.
* src/remote_internal.c: Don't include socketcompat.h.
* qemud/qemud.h: Likewise.
* qemud/remote_protocol.x: Likewise, but do include <arpa/inet.h>
for htonl.
* src/remote_internal.c: Likewise, but do include <errno.h>.
* qemud/remote_protocol.c: Regenererate.
* qemud/remote_protocol.h: Regenererate.
* src/Makefile.am (REMOTE_DRIVER_SOURCES): Remove socketcompat.h.
上级 d6efc2ff
Tue Oct 28 19:17:20 +0100 2008 Jim Meyering <meyering@redhat.com>
remove src/socketcompat.h; no longer needed
* src/socketcompat.h: Remove file.
* src/remote_internal.c: Don't include socketcompat.h.
* qemud/qemud.h: Likewise.
* qemud/remote_protocol.x: Likewise, but do include <arpa/inet.h>
for htonl.
* src/remote_internal.c: Likewise, but do include <errno.h>.
* qemud/remote_protocol.c: Regenererate.
* qemud/remote_protocol.h: Regenererate.
* src/Makefile.am (REMOTE_DRIVER_SOURCES): Remove socketcompat.h.
Tue Oct 28 13:46:50 +0100 2008 Jim Meyering <meyering@redhat.com> Tue Oct 28 13:46:50 +0100 2008 Jim Meyering <meyering@redhat.com>
make generated qemud/*.[ch] files read-only make generated qemud/*.[ch] files read-only
......
/* /*
* qemud.h: daemon data structure definitions * qemud.h: daemon data structure definitions
* *
* Copyright (C) 2006, 2007 Red Hat, Inc. * Copyright (C) 2006-2008 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange * Copyright (C) 2006 Daniel P. Berrange
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
#include <config.h> #include <config.h>
#include "socketcompat.h"
#include <gnutls/gnutls.h> #include <gnutls/gnutls.h>
#include <gnutls/x509.h> #include <gnutls/x509.h>
#include "gnutls_1_0_compat.h" #include "gnutls_1_0_compat.h"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "remote_protocol.h" #include "remote_protocol.h"
#include <config.h> #include <config.h>
#include "internal.h" #include "internal.h"
#include "socketcompat.h" #include <arpa/inet.h>
bool_t bool_t
xdr_remote_nonnull_string (XDR *xdrs, remote_nonnull_string *objp) xdr_remote_nonnull_string (XDR *xdrs, remote_nonnull_string *objp)
......
...@@ -15,7 +15,7 @@ extern "C" { ...@@ -15,7 +15,7 @@ extern "C" {
#include <config.h> #include <config.h>
#include "internal.h" #include "internal.h"
#include "socketcompat.h" #include <arpa/inet.h>
#define REMOTE_MESSAGE_MAX 262144 #define REMOTE_MESSAGE_MAX 262144
#define REMOTE_STRING_MAX 65536 #define REMOTE_STRING_MAX 65536
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* remote_internal driver and libvirtd. This protocol is * remote_internal driver and libvirtd. This protocol is
* internal and may change at any time. * internal and may change at any time.
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2008 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
%#include <config.h> %#include <config.h>
%#include "internal.h" %#include "internal.h"
%#include "socketcompat.h" %#include <arpa/inet.h>
/*----- Data types. -----*/ /*----- Data types. -----*/
......
...@@ -74,8 +74,7 @@ REMOTE_DRIVER_SOURCES = \ ...@@ -74,8 +74,7 @@ REMOTE_DRIVER_SOURCES = \
gnutls_1_0_compat.h \ gnutls_1_0_compat.h \
remote_internal.c remote_internal.h \ remote_internal.c remote_internal.h \
../qemud/remote_protocol.c \ ../qemud/remote_protocol.c \
../qemud/remote_protocol.h \ ../qemud/remote_protocol.h
socketcompat.h
# Mock driver, covering domains, storage, networks, etc # Mock driver, covering domains, storage, networks, etc
TEST_DRIVER_SOURCES = \ TEST_DRIVER_SOURCES = \
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
#include <config.h> #include <config.h>
/* Windows socket compatibility functions. */ /* Windows socket compatibility functions. */
#include "socketcompat.h" #include <errno.h>
#include <sys/socket.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
/*
* socketcompat.h: Socket compatibility for Windows, making it slightly
* less painful to use.
*
* Use this header under the following circumstances:
* (a) Instead of including any of: <net/if.h>, <netinet/in.h>,
* <sys/socket.h>, <netdb.h>, <netinet/tcp.h>, AND
* (b) The file will be part of what is built on Windows (basically
* just remote client stuff).
*
* You need to use socket_errno() instead of errno to get socket
* errors.
*
* Copyright (C) 2008 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Richard W.M. Jones <rjones@redhat.com>
*/
#ifndef __SOCKETCOMPAT_H__
#define __SOCKETCOMPAT_H__
#include <config.h>
#include <errno.h>
#include <sys/socket.h>
static inline int
socket_errno (void)
{
return errno;
}
#ifndef HAVE_WINSOCK2_H /* Unix & Cygwin. */
# include <sys/un.h>
# include <net/if.h>
# include <netinet/in.h>
# include <netinet/tcp.h>
#endif /* HAVE_WINSOCK2_H */
#endif /* __WINSOCKWRAPPER_H__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册