mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-31 11:30:56 +08:00
Cygwin: cleanup header including within network-releated files
* Rearrange includes and drop unneccessary ones. * Don't pull in cygwin/socket.h into sys/un.h just to get sa_family_t. Include sys/types.h and use __sa_family_t instead. * start including Windows headers using the w32api/ path prefix Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
d02f3a1238
commit
25ea6af172
@ -16,21 +16,15 @@ details. */
|
||||
#undef u_long
|
||||
#define u_long __ms_u_long
|
||||
#endif
|
||||
#include <ws2tcpip.h>
|
||||
#include <iphlpapi.h>
|
||||
#include <w32api/ws2tcpip.h>
|
||||
#include <w32api/iphlpapi.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <stdio.h>
|
||||
#include "cygerrno.h"
|
||||
#include "security.h"
|
||||
#include "path.h"
|
||||
#include "fhandler.h"
|
||||
#include "fhandler_virtual.h"
|
||||
#include "dtable.h"
|
||||
#include "cygheap.h"
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#define _COMPILING_NEWLIB
|
||||
#include <dirent.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
bool get_adapters_addresses (PIP_ADAPTER_ADDRESSES *pa0, ULONG family);
|
||||
|
||||
|
@ -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 <ntsecapi.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <mswsock.h>
|
||||
#include <iphlpapi.h>
|
||||
#include "cygerrno.h"
|
||||
#include "security.h"
|
||||
#include "path.h"
|
||||
#include "fhandler.h"
|
||||
#include "dtable.h"
|
||||
#include "cygheap.h"
|
||||
#include <sys/socket.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include "cygwin/version.h"
|
||||
#include "perprocess.h"
|
||||
#include "shared_info.h"
|
||||
#include "sigproc.h"
|
||||
#include "wininfo.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <cygwin/acl.h>
|
||||
#include "cygtls.h"
|
||||
#include <sys/un.h>
|
||||
#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 */
|
||||
|
@ -21,31 +21,21 @@
|
||||
#undef u_long
|
||||
#define u_long __ms_u_long
|
||||
#endif
|
||||
#include <ntsecapi.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <mswsock.h>
|
||||
#include <iphlpapi.h>
|
||||
#include <w32api/ws2tcpip.h>
|
||||
#include <w32api/mswsock.h>
|
||||
#include <unistd.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <cygwin/acl.h>
|
||||
#include "cygerrno.h"
|
||||
#include "security.h"
|
||||
#include "path.h"
|
||||
#include "fhandler.h"
|
||||
#include "dtable.h"
|
||||
#include "cygheap.h"
|
||||
#include <asm/byteorder.h>
|
||||
#include "cygwin/version.h"
|
||||
#include "perprocess.h"
|
||||
#include "shared_info.h"
|
||||
#include "sigproc.h"
|
||||
#include "wininfo.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <cygwin/acl.h>
|
||||
#include "cygtls.h"
|
||||
#include <sys/un.h>
|
||||
#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)
|
||||
|
@ -21,31 +21,23 @@
|
||||
#undef u_long
|
||||
#define u_long __ms_u_long
|
||||
#endif
|
||||
#include <ntsecapi.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <mswsock.h>
|
||||
#include <iphlpapi.h>
|
||||
#include <w32api/ntsecapi.h>
|
||||
#include <w32api/ws2tcpip.h>
|
||||
#include <w32api/mswsock.h>
|
||||
#include <unistd.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <cygwin/acl.h>
|
||||
#include "cygerrno.h"
|
||||
#include "security.h"
|
||||
#include "path.h"
|
||||
#include "fhandler.h"
|
||||
#include "dtable.h"
|
||||
#include "cygheap.h"
|
||||
#include <asm/byteorder.h>
|
||||
#include "cygwin/version.h"
|
||||
#include "perprocess.h"
|
||||
#include "shared_info.h"
|
||||
#include "sigproc.h"
|
||||
#include "wininfo.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <cygwin/acl.h>
|
||||
#include "cygtls.h"
|
||||
#include <sys/un.h>
|
||||
#include "ntdll.h"
|
||||
#include "miscfuncs.h"
|
||||
#include "tls_pbuf.h"
|
||||
|
||||
extern "C" {
|
||||
int sscanf (const char *, const char *, ...);
|
||||
|
@ -9,25 +9,20 @@
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <ntsecapi.h>
|
||||
#include "cygerrno.h"
|
||||
#include "security.h"
|
||||
#include "path.h"
|
||||
#include "fhandler.h"
|
||||
#include "dtable.h"
|
||||
#include "cygheap.h"
|
||||
#include <w32api/winioctl.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include "cygwin/version.h"
|
||||
#include "perprocess.h"
|
||||
#include "shared_info.h"
|
||||
#include "sigproc.h"
|
||||
#include "wininfo.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <cygwin/acl.h>
|
||||
#include "cygtls.h"
|
||||
#include <sys/un.h>
|
||||
#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"
|
||||
|
@ -9,14 +9,15 @@ details. */
|
||||
#ifndef _SYS_UN_H
|
||||
#define _SYS_UN_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <string.h> /* for strlen */
|
||||
#include <cygwin/socket.h>
|
||||
|
||||
|
||||
/* 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 */
|
||||
};
|
||||
|
||||
|
@ -19,35 +19,21 @@ details. */
|
||||
#undef u_long
|
||||
#define u_long __ms_u_long
|
||||
#endif
|
||||
#include <ws2tcpip.h>
|
||||
#include <mswsock.h>
|
||||
#include <iphlpapi.h>
|
||||
#include "miscfuncs.h"
|
||||
#include <ctype.h>
|
||||
#include <wchar.h>
|
||||
#include <stdlib.h>
|
||||
#include <w32api/ws2tcpip.h>
|
||||
#include <w32api/mswsock.h>
|
||||
#include <w32api/iphlpapi.h>
|
||||
#define gethostname cygwin_gethostname
|
||||
#include <unistd.h>
|
||||
#undef gethostname
|
||||
#include <ifaddrs.h>
|
||||
#include <netdb.h>
|
||||
#include <cygwin/in.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <assert.h>
|
||||
#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 : "<null!>", dst);
|
||||
return dst;
|
||||
|
@ -15,6 +15,7 @@ details. */
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include "cygerrno.h"
|
||||
#include "security.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user