diff --git a/include/meson.build b/include/meson.build index a93b097a7..73f8130d6 100644 --- a/include/meson.build +++ b/include/meson.build @@ -196,7 +196,6 @@ if conf_data.get('HAVE_GETPEEREID').to_int() == 0 and conf_data.get('HAVE_GETPEE endif endif -conf_data.set('TCPCONN', '1') conf_data.set('UNIXCONN', host_machine.system() != 'windows' ? '1' : false) conf_data.set('IPv6', build_ipv6 ? '1' : false) diff --git a/include/xorg-server.h.meson.in b/include/xorg-server.h.meson.in index a72f60ced..2ed5faa89 100644 --- a/include/xorg-server.h.meson.in +++ b/include/xorg-server.h.meson.in @@ -89,9 +89,6 @@ /* Define to 1 on systems derived from System V Release 4 */ #mesondefine SVR4 -/* Support TCP socket connections */ -#mesondefine TCPCONN - /* Support UNIX socket connections */ #mesondefine UNIXCONN diff --git a/os/access.c b/os/access.c index bacdee432..2ecdff753 100644 --- a/os/access.c +++ b/os/access.c @@ -105,9 +105,7 @@ SOFTWARE. #include #endif -#if defined(TCPCONN) #include -#endif /* TCPCONN */ #ifdef HAVE_GETPEERUCRED #include @@ -400,9 +398,6 @@ AccessUsingXdmcp(void) void DefineSelf(int fd) { -#if !defined(TCPCONN) && !defined(UNIXCONN) - return; -#else int len; caddr_t addr; int family; @@ -515,7 +510,6 @@ DefineSelf(int fd) selfhosts = host; } } -#endif /* !TCPCONN && !UNIXCONN */ } #else @@ -897,7 +891,7 @@ ResetHosts(const char *display) char *ptr; int i, hostlen; -#if defined(TCPCONN) && (!defined(IPv6)) +#if !defined(IPv6) union { struct sockaddr sa; struct sockaddr_in in; @@ -944,7 +938,6 @@ ResetHosts(const char *display) NewHost(family, "", 0, FALSE); LocalHostRequested = TRUE; /* Fix for XFree86 bug #156 */ } -#if defined(TCPCONN) else if (!strncmp("inet:", lhostname, 5)) { family = FamilyInternet; hostname = ohostname + 5; @@ -954,7 +947,6 @@ ResetHosts(const char *display) family = FamilyInternet6; hostname = ohostname + 6; } -#endif #endif else if (!strncmp("si:", lhostname, 3)) { family = FamilyServerInterpreted; @@ -969,7 +961,6 @@ ResetHosts(const char *display) } } else -#if defined(TCPCONN) { #if defined(IPv6) if ((family == FamilyInternet) || (family == FamilyInternet6) || @@ -1020,7 +1011,6 @@ ResetHosts(const char *display) } #endif /* IPv6 */ } -#endif /* TCPCONN */ family = FamilyWild; } fclose(fd); @@ -1442,7 +1432,6 @@ CheckAddr(int family, const void *pAddr, unsigned length) int len; switch (family) { -#if defined(TCPCONN) case FamilyInternet: if (length == sizeof(struct in_addr)) len = length; @@ -1456,7 +1445,6 @@ CheckAddr(int family, const void *pAddr, unsigned length) else len = -1; break; -#endif #endif case FamilyServerInterpreted: len = siCheckAddr(pAddr, length); @@ -1525,7 +1513,6 @@ ConvertAddr(register struct sockaddr *saddr, int *len, void **addr) case AF_UNIX: #endif return FamilyLocal; -#if defined(TCPCONN) case AF_INET: #ifdef WIN32 if (16777343 == *(long *) &((struct sockaddr_in *) saddr)->sin_addr) @@ -1550,7 +1537,6 @@ ConvertAddr(register struct sockaddr *saddr, int *len, void **addr) return FamilyInternet6; } } -#endif #endif default: return -1; diff --git a/os/connection.c b/os/connection.c index f7eb95b1e..9ed5f0948 100644 --- a/os/connection.c +++ b/os/connection.c @@ -84,7 +84,6 @@ SOFTWARE. #ifndef WIN32 #include -#if defined(TCPCONN) #include #include #ifdef CSRG_BASED @@ -92,9 +91,8 @@ SOFTWARE. #endif #include #include -#endif #include -#endif /* WIN32 */ +#endif /* !WIN32 */ #include "dix/dix_priv.h" #include "os/audit.h" @@ -391,7 +389,6 @@ AuthAudit(ClientPtr client, Bool letin, #endif strlcpy(addr, "local host", sizeof(addr)); break; -#if defined(TCPCONN) case AF_INET: snprintf(addr, sizeof(addr), "IP %s", inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr)); @@ -405,7 +402,6 @@ AuthAudit(ClientPtr client, Bool letin, snprintf(addr, sizeof(addr), "IP %s", ipaddr); } break; -#endif #endif default: strlcpy(addr, "unknown address", sizeof(addr)); diff --git a/os/meson.build b/os/meson.build index e12e2c9e7..45647ffce 100644 --- a/os/meson.build +++ b/os/meson.build @@ -94,6 +94,6 @@ libxserver_os = static_library('libxserver_os', os_dep, dependency('xau') ], - c_args: os_c_args, + c_args: [os_c_args, '-DTCPCONN'], link_with: libxlibc, ) diff --git a/os/utils.c b/os/utils.c index 6db344403..7378c8283 100644 --- a/os/utils.c +++ b/os/utils.c @@ -99,11 +99,9 @@ __stdcall unsigned long GetTickCount(void); #include #include /* for malloc() */ -#if defined(TCPCONN) #ifndef WIN32 #include #endif -#endif #include "dix/dix_priv.h" #include "dix/input_priv.h" @@ -881,7 +879,6 @@ int set_font_authorizations(char **authorizations, int *authlen, void *client) { #define AUTHORIZATION_NAME "hp-hostname-1" -#if defined(TCPCONN) static char *result = NULL; static char *p = NULL; @@ -939,9 +936,6 @@ set_font_authorizations(char **authorizations, int *authlen, void *client) *authlen = p - result; *authorizations = result; return 1; -#else /* TCPCONN */ - return 0; -#endif /* TCPCONN */ } void diff --git a/os/xdmauth.c b/os/xdmauth.c index 21b79e943..f5e5b9b8f 100644 --- a/os/xdmauth.c +++ b/os/xdmauth.c @@ -282,7 +282,6 @@ XdmAuthorizationValidate(unsigned char *plain, int length, if (_XSERVTransGetPeerAddr(((OsCommPtr) xclient->osPrivate)->trans_conn, &family, &addr_len, &addr) == 0 && _XSERVTransConvertAddress(&family, &addr_len, &addr) == 0) { -#if defined(TCPCONN) if (family == FamilyInternet && memcmp((char *) addr, client->client, 4) != 0) { free(client); @@ -293,7 +292,6 @@ XdmAuthorizationValidate(unsigned char *plain, int length, return NULL; } -#endif free(addr); } } diff --git a/os/xdmcp.c b/os/xdmcp.c index 7546d8309..0fba15a14 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -1408,7 +1408,7 @@ get_addr_by_name(const char *argtype, #ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgethostbynameparams hparams; #endif -#if defined(WIN32) && defined(TCPCONN) +#if defined(WIN32) _XSERVTransWSAStartup(); #endif if (!(hep = _XGethostbyname(namestr, hparams))) {