include cleanup using iwyu

This commit is contained in:
Max Kellermann
2013-11-28 11:50:54 +01:00
parent 46bab7e4b9
commit f90abe9530
185 changed files with 114 additions and 338 deletions

View File

@@ -23,6 +23,7 @@
#include <assert.h>
#include <sys/epoll.h>
#include <unistd.h>
#include <stdint.h>
#include "check.h"

View File

@@ -27,6 +27,9 @@
#ifndef WIN32
#include <sys/socket.h>
#include <netdb.h>
#ifdef HAVE_TCP
#include <netinet/in.h>
#endif
#else
#include <ws2tcpip.h>
#include <winsock.h>

View File

@@ -27,8 +27,9 @@
struct sockaddr;
struct addrinfo;
class Error;
class Domain;
extern const class Domain resolver_domain;
extern const Domain resolver_domain;
/**
* Converts the specified socket address into a string in the form
@@ -42,7 +43,7 @@ extern const class Domain resolver_domain;
*/
gcc_malloc
char *
sockaddr_to_string(const struct sockaddr *sa, size_t length, Error &error);
sockaddr_to_string(const sockaddr *sa, size_t length, Error &error);
/**
* Resolve a specification in the form "host", "host:port",
@@ -54,7 +55,7 @@ sockaddr_to_string(const struct sockaddr *sa, size_t length, Error &error);
* @return an #addrinfo linked list that must be freed with
* freeaddrinfo(), or NULL on error
*/
struct addrinfo *
addrinfo *
resolve_host_port(const char *host_port, unsigned default_port,
int flags, int socktype,
Error &error);

View File

@@ -20,7 +20,6 @@
#include "config.h"
#ifdef USE_SIGNALFD
#include "SignalFD.hxx"
#include "fd_util.h"
#include "FatalError.hxx"
#include <assert.h>

View File

@@ -21,7 +21,7 @@
#define MPD_SOCKET_ERROR_HXX
#include "Compiler.h"
#include "util/Error.hxx"
#include "util/Error.hxx" // IWYU pragma: export
#ifdef WIN32
#include <winsock2.h>
@@ -31,11 +31,13 @@ typedef DWORD socket_error_t;
typedef int socket_error_t;
#endif
class Domain;
/**
* A #Domain for #Error for socket I/O errors. The code is an errno
* value (or WSAGetLastError() on Windows).
*/
extern const class Domain socket_domain;
extern const Domain socket_domain;
gcc_pure
static inline socket_error_t