diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-07-06 17:52:19 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-07-06 17:52:19 +0400 |
commit | db80f635c109c7b7d7ef4b96d6c7ebbd8a4429ba (patch) | |
tree | 7ff0f9525a2c366fd03956e046c6c5f9e1ddb4d9 /winsup/cygwin/libc | |
parent | dc45bfa0bf7fcb36a00388a629b56ea8e5fabda3 (diff) |
In terms of network related functionality, rely on Winsock definitions
as much as possible:
* dtable.cc: Drop including sys/socket.h.
* fhandler_procnet.cc: Change includes accordingly.
* fhandler_socket.cc: Ditto.
(fhandler_socket::listen): Avoid gcc error message initializing sin6.
(LPFN_WSARECVMSG): Only define when building against w32api headers.
* net.cc: Change includes accordingly. Define USE_SYS_TYPES_FD_SET
and __WSA_ERR_MACROS_DEFINED. Define _INC_NETIOAPI temporarily and
explain why.
(struct _IP_ADAPTER_UNICAST_ADDRESS_LH): Only define when building
against w32api headers.
(struct _IP_ADAPTER_ADDRESSES_LH): Ditto.
(SIO_GET_INTERFACE_LIST): Ditto.
(ws_freeaddrinfo): Rename from freeaddrinfo so as not to collide with
Winsock declaration. Change througout.
(ws_getaddrinfo): Ditto.
(ws_getnameinfo): Ditto.
* select.cc: Include netdb.h after defining USE_SYS_TYPES_FD_SET.
* syslog.cc: Drop including netinet/in.h. Define USE_SYS_TYPES_FD_SET
and include ws2tcpip.h.
* include/netdb.h (struct addrinfo): Don't define when building Cygwin.
* include/cygwin/if.h: Don't declare if_xxx functions when building
Cygwin.
* include/cygwin/in.h: Disable most definitions when building Cygwin.
* include/cygwin/socket.h: Disable sockaddr and sockaddr_storage
definitions when building Cygwin. Same for MCAST_INCLUDE/MCAST_EXCLUDE.
* libc/inet_addr.c: Don't define __INSIDE_CYGWIN__ nor
__INSIDE_CYGWIN_NET__.
* libc/inet_network.c: Ditto.
* libc/minires.h: Drop redundant inclusion of netdb.h. Define
__INSIDE_CYGWIN_NET__ only before including netdb.h and resolver
headers.
Diffstat (limited to 'winsup/cygwin/libc')
-rw-r--r-- | winsup/cygwin/libc/inet_addr.c | 3 | ||||
-rw-r--r-- | winsup/cygwin/libc/inet_network.c | 3 | ||||
-rw-r--r-- | winsup/cygwin/libc/minires.h | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/winsup/cygwin/libc/inet_addr.c b/winsup/cygwin/libc/inet_addr.c index 24028ad95..465e86ed3 100644 --- a/winsup/cygwin/libc/inet_addr.c +++ b/winsup/cygwin/libc/inet_addr.c @@ -72,8 +72,7 @@ static const char rcsid[] = "$Id$"; #ifndef __CYGWIN__ __FBSDID("$FreeBSD$"); #else -#define __INSIDE_CYGWIN__ -#define __INSIDE_CYGWIN_NET__ +#include "winsup.h" #endif #ifndef __CYGWIN__ diff --git a/winsup/cygwin/libc/inet_network.c b/winsup/cygwin/libc/inet_network.c index 52286f453..01e1a7682 100644 --- a/winsup/cygwin/libc/inet_network.c +++ b/winsup/cygwin/libc/inet_network.c @@ -34,8 +34,7 @@ static const char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93"; #ifndef __CYGWIN__ __FBSDID("$FreeBSD$"); #else -#define __INSIDE_CYGWIN__ -#define __INSIDE_CYGWIN_NET__ +#include "winsup.h" #endif #ifndef __CYGWIN__ diff --git a/winsup/cygwin/libc/minires.h b/winsup/cygwin/libc/minires.h index cda0b4c51..1750a4144 100644 --- a/winsup/cygwin/libc/minires.h +++ b/winsup/cygwin/libc/minires.h @@ -10,13 +10,10 @@ This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ -#define __INSIDE_CYGWIN_NET__ - #include "winsup.h" #include <string.h> #include <malloc.h> #include <stdlib.h> -#include <netdb.h> #include <ctype.h> #include <sys/time.h> #include <sys/socket.h> @@ -27,6 +24,7 @@ details. */ #include <stdio.h> #include <stdarg.h> #include <sys/unistd.h> +#define __INSIDE_CYGWIN_NET__ #include <netdb.h> #include <arpa/nameser.h> #include <resolv.h> |