os: drop conditional build on TCPCONN define
This symbol is always defined for aeons, at least since meson transition, and there doesn't seem any desire to ever switch it off again, so we can drop the #ifdef's. Note that the symbol still needs to be defined for xtrans, but doing so in os/meson.build should be enough. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
94979681c0
commit
d6eceee960
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
16
os/access.c
16
os/access.c
|
@ -105,9 +105,7 @@ SOFTWARE.
|
|||
#include <pwd.h>
|
||||
#endif
|
||||
|
||||
#if defined(TCPCONN)
|
||||
#include <netinet/in.h>
|
||||
#endif /* TCPCONN */
|
||||
|
||||
#ifdef HAVE_GETPEERUCRED
|
||||
#include <ucred.h>
|
||||
|
@ -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;
|
||||
|
|
|
@ -84,7 +84,6 @@ SOFTWARE.
|
|||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
|
||||
#if defined(TCPCONN)
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#ifdef CSRG_BASED
|
||||
|
@ -92,9 +91,8 @@ SOFTWARE.
|
|||
#endif
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#include <sys/uio.h>
|
||||
#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));
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
|
|
|
@ -99,11 +99,9 @@ __stdcall unsigned long GetTickCount(void);
|
|||
#include <stdarg.h>
|
||||
#include <stdlib.h> /* for malloc() */
|
||||
|
||||
#if defined(TCPCONN)
|
||||
#ifndef WIN32
|
||||
#include <netdb.h>
|
||||
#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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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))) {
|
||||
|
|
Loading…
Reference in New Issue