ecore_con: improve portability.

This commit is contained in:
Cedric Bail 2013-03-15 09:12:05 +01:00
parent 6b4ba5cead
commit 1959898724
5 changed files with 64 additions and 12 deletions

View File

@ -1786,12 +1786,19 @@ EFL_EVAL_PKGS([ECORE])
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([sys/socket.h])
AC_CHECK_HEADERS([ \
arpa/inet.h \
langinfo.h \
features.h \
net/if.h \
netinet/in.h \
netinet/tcp.h \
sys/prctl.h \
sys/resource.h \
sys/timerfd.h \
sys/un.h \
])
### Checks for types

View File

@ -9,11 +9,26 @@
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_TCP_H
# include <netinet/tcp.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
#ifdef HAVE_SYSTEMD
# include <systemd/sd-daemon.h>

View File

@ -11,8 +11,14 @@
#include <string.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
#include <ares.h>

View File

@ -10,12 +10,29 @@
#include <unistd.h>
#include <fcntl.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_TCP_H
# include <netinet/tcp.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#include <sys/socket.h>
#endif
#ifdef HAVE_NET_IF_H
# include <net/if.h>
#endif
#ifdef HAVE_WS2TCPIP_H
# include <ws2tcpip.h>
@ -30,6 +47,10 @@
#include "Ecore_Con.h"
#include "ecore_con_private.h"
#if defined(_WIN32) && !defined(IF_NAMESIZE)
#define IF_NAMESIZE 16
#endif
/* http://tools.ietf.org/html/rfc1928
o X'00' NO AUTHENTICATION REQUIRED
o X'01' GSSAPI

View File

@ -4,7 +4,10 @@
#include <string.h>
#include <sys/types.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_WINSOCK2_H
# include <winsock2.h>