diff --git a/winsup/cygwin/fhandler_procnet.cc b/winsup/cygwin/fhandler_procnet.cc index a81ddecf9..452f33c57 100644 --- a/winsup/cygwin/fhandler_procnet.cc +++ b/winsup/cygwin/fhandler_procnet.cc @@ -16,21 +16,15 @@ details. */ #undef u_long #define u_long __ms_u_long #endif -#include -#include +#include +#include +#include +#include #include "cygerrno.h" -#include "security.h" #include "path.h" #include "fhandler.h" #include "fhandler_virtual.h" #include "dtable.h" -#include "cygheap.h" -#include - -#define _COMPILING_NEWLIB -#include -#include -#include bool get_adapters_addresses (PIP_ADAPTER_ADDRESSES *pa0, ULONG family); diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index 5f00e6946..4ef4a755b 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -6,48 +6,18 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ -#define __INSIDE_CYGWIN_NET__ -#define USE_SYS_TYPES_FD_SET - #include "winsup.h" -#ifdef __x86_64__ -/* 2014-04-24: Current Mingw headers define sockaddr_in6 using u_long (8 byte) - because a redefinition for LP64 systems is missing. This leads to a wrong - definition and size of sockaddr_in6 when building with winsock headers. - This definition is also required to use the right u_long type in subsequent - function calls. */ -#undef u_long -#define u_long __ms_u_long -#endif -#include -#include -#include -#include -#include "cygerrno.h" -#include "security.h" -#include "path.h" -#include "fhandler.h" -#include "dtable.h" -#include "cygheap.h" +#include #include -#include "cygwin/version.h" -#include "perprocess.h" -#include "shared_info.h" -#include "sigproc.h" -#include "wininfo.h" #include #include #include #include -#include "cygtls.h" -#include -#include "ntdll.h" -#include "miscfuncs.h" +#include "cygerrno.h" +#include "path.h" +#include "fhandler.h" #include "tls_pbuf.h" -#define ASYNC_MASK (FD_READ|FD_WRITE|FD_OOB|FD_ACCEPT|FD_CONNECT) -#define EVENT_MASK (FD_READ|FD_WRITE|FD_OOB|FD_ACCEPT|FD_CONNECT|FD_CLOSE) - extern "C" { int sscanf (const char *, const char *, ...); } /* End of "C" section */ diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler_socket_inet.cc index b0dc6581c..a3aeccc82 100644 --- a/winsup/cygwin/fhandler_socket_inet.cc +++ b/winsup/cygwin/fhandler_socket_inet.cc @@ -21,31 +21,21 @@ #undef u_long #define u_long __ms_u_long #endif -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "cygerrno.h" -#include "security.h" #include "path.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" -#include -#include "cygwin/version.h" -#include "perprocess.h" #include "shared_info.h" -#include "sigproc.h" #include "wininfo.h" -#include -#include -#include -#include -#include "cygtls.h" -#include -#include "ntdll.h" -#include "miscfuncs.h" -#include "tls_pbuf.h" #define ASYNC_MASK (FD_READ|FD_WRITE|FD_OOB|FD_ACCEPT|FD_CONNECT) #define EVENT_MASK (FD_READ|FD_WRITE|FD_OOB|FD_ACCEPT|FD_CONNECT|FD_CLOSE) diff --git a/winsup/cygwin/fhandler_socket_local.cc b/winsup/cygwin/fhandler_socket_local.cc index ad2df6568..844cb9d11 100644 --- a/winsup/cygwin/fhandler_socket_local.cc +++ b/winsup/cygwin/fhandler_socket_local.cc @@ -21,31 +21,23 @@ #undef u_long #define u_long __ms_u_long #endif -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "cygerrno.h" -#include "security.h" #include "path.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" -#include -#include "cygwin/version.h" -#include "perprocess.h" -#include "shared_info.h" -#include "sigproc.h" #include "wininfo.h" -#include -#include -#include -#include -#include "cygtls.h" -#include #include "ntdll.h" -#include "miscfuncs.h" -#include "tls_pbuf.h" extern "C" { int sscanf (const char *, const char *, ...); diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler_socket_unix.cc index c539c00a1..ec4170ff5 100644 --- a/winsup/cygwin/fhandler_socket_unix.cc +++ b/winsup/cygwin/fhandler_socket_unix.cc @@ -9,25 +9,20 @@ details. */ #include "winsup.h" -#include -#include "cygerrno.h" -#include "security.h" -#include "path.h" -#include "fhandler.h" -#include "dtable.h" -#include "cygheap.h" +#include #include -#include "cygwin/version.h" -#include "perprocess.h" -#include "shared_info.h" -#include "sigproc.h" -#include "wininfo.h" #include +#include +#include #include #include #include -#include "cygtls.h" -#include +#include "cygerrno.h" +#include "path.h" +#include "fhandler.h" +#include "dtable.h" +#include "hires.h" +#include "shared_info.h" #include "ntdll.h" #include "miscfuncs.h" #include "tls_pbuf.h" diff --git a/winsup/cygwin/include/sys/un.h b/winsup/cygwin/include/sys/un.h index fa5ce278f..53be57b38 100644 --- a/winsup/cygwin/include/sys/un.h +++ b/winsup/cygwin/include/sys/un.h @@ -9,14 +9,15 @@ details. */ #ifndef _SYS_UN_H #define _SYS_UN_H +#include #include /* for strlen */ -#include + /* POSIX requires only at least 100 bytes */ #define UNIX_PATH_MAX 108 struct sockaddr_un { - sa_family_t sun_family; /* address family AF_LOCAL/AF_UNIX */ + __sa_family_t sun_family; /* address family AF_LOCAL/AF_UNIX */ char sun_path[UNIX_PATH_MAX]; /* 108 bytes of socket address */ }; diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 25f94d684..38a53f815 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -19,35 +19,21 @@ details. */ #undef u_long #define u_long __ms_u_long #endif -#include -#include -#include -#include "miscfuncs.h" -#include -#include -#include +#include +#include +#include #define gethostname cygwin_gethostname #include #undef gethostname +#include #include -#include #include -#include -#include "cygerrno.h" -#include "security.h" -#include "cygwin/version.h" #include "shared_info.h" -#include "perprocess.h" #include "path.h" #include "fhandler.h" #include "dtable.h" #include "cygheap.h" -#include "sigproc.h" -#include "registry.h" -#include "cygtls.h" -#include "ifaddrs.h" #include "tls_pbuf.h" -#include "ntdll.h" /* Unfortunately defined in Windows header files and arpa/nameser_compat.h. */ #undef NOERROR @@ -455,8 +441,6 @@ dup_ent (unionent *&dst, unionent *src, unionent::struct_type type) dp += DWORD_round (src->h_len); } } - /* Sanity check that we did our bookkeeping correctly. */ - assert ((dp - (char *) dst) == sz); } debug_printf ("duped %sent \"%s\", %p", entnames[type], dst ? dst->name : "", dst); return dst; diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc index 2f4e5e8c0..e753b60dd 100644 --- a/winsup/cygwin/syslog.cc +++ b/winsup/cygwin/syslog.cc @@ -15,6 +15,7 @@ details. */ #include #include #include +#include #include #include "cygerrno.h" #include "security.h"