From f79ebbd1212c2bc51dc4a86ca1a7c4a2bccdde82 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 28 Oct 2008 19:09:04 +0000 Subject: [PATCH] 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 for htonl. * src/remote_internal.c: Likewise, but do include . * qemud/remote_protocol.c: Regenererate. * qemud/remote_protocol.h: Regenererate. * src/Makefile.am (REMOTE_DRIVER_SOURCES): Remove socketcompat.h. --- ChangeLog | 13 +++++++++++++ qemud/qemud.h | 4 +--- qemud/remote_protocol.c | 2 +- qemud/remote_protocol.h | 2 +- qemud/remote_protocol.x | 4 ++-- src/Makefile.am | 3 +-- src/remote_internal.c | 3 ++- src/socketcompat.h | 42 ----------------------------------------- 8 files changed, 21 insertions(+), 52 deletions(-) delete mode 100644 src/socketcompat.h diff --git a/ChangeLog b/ChangeLog index 1ac85e564b..ee119e6c6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Tue Oct 28 19:17:20 +0100 2008 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 + for htonl. + * src/remote_internal.c: Likewise, but do include . + * 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 make generated qemud/*.[ch] files read-only diff --git a/qemud/qemud.h b/qemud/qemud.h index 83d65b6ee5..822ed939c1 100644 --- a/qemud/qemud.h +++ b/qemud/qemud.h @@ -1,7 +1,7 @@ /* * 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 * * This library is free software; you can redistribute it and/or @@ -27,8 +27,6 @@ #include -#include "socketcompat.h" - #include #include #include "gnutls_1_0_compat.h" diff --git a/qemud/remote_protocol.c b/qemud/remote_protocol.c index 5ef80e546a..e0edd254cb 100644 --- a/qemud/remote_protocol.c +++ b/qemud/remote_protocol.c @@ -6,7 +6,7 @@ #include "remote_protocol.h" #include #include "internal.h" -#include "socketcompat.h" +#include bool_t xdr_remote_nonnull_string (XDR *xdrs, remote_nonnull_string *objp) diff --git a/qemud/remote_protocol.h b/qemud/remote_protocol.h index e43514d28e..ec1beb4c01 100644 --- a/qemud/remote_protocol.h +++ b/qemud/remote_protocol.h @@ -15,7 +15,7 @@ extern "C" { #include #include "internal.h" -#include "socketcompat.h" +#include #define REMOTE_MESSAGE_MAX 262144 #define REMOTE_STRING_MAX 65536 diff --git a/qemud/remote_protocol.x b/qemud/remote_protocol.x index b7e41aadee..bef9711ff1 100644 --- a/qemud/remote_protocol.x +++ b/qemud/remote_protocol.x @@ -3,7 +3,7 @@ * remote_internal driver and libvirtd. This protocol is * 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 * modify it under the terms of the GNU Lesser General Public @@ -38,7 +38,7 @@ %#include %#include "internal.h" -%#include "socketcompat.h" +%#include /*----- Data types. -----*/ diff --git a/src/Makefile.am b/src/Makefile.am index e743f247db..8934c3c1d0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -74,8 +74,7 @@ REMOTE_DRIVER_SOURCES = \ gnutls_1_0_compat.h \ remote_internal.c remote_internal.h \ ../qemud/remote_protocol.c \ - ../qemud/remote_protocol.h \ - socketcompat.h + ../qemud/remote_protocol.h # Mock driver, covering domains, storage, networks, etc TEST_DRIVER_SOURCES = \ diff --git a/src/remote_internal.c b/src/remote_internal.c index e6dcfcfe06..5b82f99079 100644 --- a/src/remote_internal.c +++ b/src/remote_internal.c @@ -24,7 +24,8 @@ #include /* Windows socket compatibility functions. */ -#include "socketcompat.h" +#include +#include #include #include diff --git a/src/socketcompat.h b/src/socketcompat.h deleted file mode 100644 index a06fe36514..0000000000 --- a/src/socketcompat.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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: , , - * , , , 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 - */ - -#ifndef __SOCKETCOMPAT_H__ -#define __SOCKETCOMPAT_H__ - -#include - -#include -#include - -static inline int -socket_errno (void) -{ - return errno; -} - -#ifndef HAVE_WINSOCK2_H /* Unix & Cygwin. */ -# include -# include -# include -# include -#endif /* HAVE_WINSOCK2_H */ - -#endif /* __WINSOCKWRAPPER_H__ */