os: unifdef STREAMSCONN

Removed from xtrans in 2012, and never wired up in the modular build
anyway.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Adam Jackson 2016-02-08 17:36:03 -05:00
parent e43abdce96
commit b3e9c534e2
5 changed files with 13 additions and 58 deletions

View File

@ -106,7 +106,7 @@ SOFTWARE.
#include <pwd.h>
#endif
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
#include <netinet/in.h>
#endif /* TCPCONN || STREAMSCONN */
@ -426,7 +426,7 @@ ifioctl(int fd, int cmd, char *arg)
void
DefineSelf(int fd)
{
#if !defined(TCPCONN) && !defined(STREAMSCONN) && !defined(UNIXCONN)
#if !defined(TCPCONN) && !defined(UNIXCONN)
return;
#else
register int n;
@ -934,11 +934,10 @@ ResetHosts(const char *display)
char *ptr;
int i, hostlen;
#if (defined(TCPCONN) || defined(STREAMSCONN) ) && \
(!defined(IPv6) || !defined(AF_INET6))
#if defined(TCPCONN) && (!defined(IPv6) || !defined(AF_INET6))
union {
struct sockaddr sa;
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
struct sockaddr_in in;
#endif /* TCPCONN || STREAMSCONN */
} saddr;
@ -984,7 +983,7 @@ ResetHosts(const char *display)
NewHost(family, "", 0, FALSE);
LocalHostRequested = TRUE; /* Fix for XFree86 bug #156 */
}
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
else if (!strncmp("inet:", lhostname, 5)) {
family = FamilyInternet;
hostname = ohostname + 5;
@ -1023,7 +1022,7 @@ ResetHosts(const char *display)
}
else
#endif /* SECURE_RPC */
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
{
#if defined(IPv6) && defined(AF_INET6)
if ((family == FamilyInternet) || (family == FamilyInternet6) ||
@ -1441,7 +1440,7 @@ CheckAddr(int family, const void *pAddr, unsigned length)
int len;
switch (family) {
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
case FamilyInternet:
if (length == sizeof(struct in_addr))
len = length;
@ -1524,7 +1523,7 @@ ConvertAddr(register struct sockaddr *saddr, int *len, void **addr)
case AF_UNIX:
#endif
return FamilyLocal;
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
case AF_INET:
#ifdef WIN32
if (16777343 == *(long *) &((struct sockaddr_in *) saddr)->sin_addr)

View File

@ -82,7 +82,7 @@ SOFTWARE.
#ifndef WIN32
#include <sys/socket.h>
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
#include <netinet/in.h>
#include <arpa/inet.h>
#ifdef apollo
@ -554,7 +554,7 @@ AuthAudit(ClientPtr client, Bool letin,
#endif
strlcpy(addr, "local host", sizeof(addr));
break;
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
case AF_INET:
snprintf(addr, sizeof(addr), "IP %s",
inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr));

View File

@ -108,7 +108,7 @@ __stdcall unsigned long GetTickCount(void);
#include <stdlib.h> /* for malloc() */
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
#ifndef WIN32
#include <netdb.h>
#endif
@ -1069,7 +1069,7 @@ int
set_font_authorizations(char **authorizations, int *authlen, void *client)
{
#define AUTHORIZATION_NAME "hp-hostname-1"
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
static char *result = NULL;
static char *p = NULL;

View File

@ -277,7 +277,7 @@ 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) || defined(STREAMSCONN)
#if defined(TCPCONN)
if (family == FamilyInternet &&
memcmp((char *) addr, client->client, 4) != 0) {
free(client);

View File

@ -46,12 +46,6 @@
#include "opaque.h"
#include "site.h"
#ifdef STREAMSCONN
#include <tiuser.h>
#include <netconfig.h>
#include <netdir.h>
#endif
#define XSERV_t
#define TRANS_SERVER
#define TRANS_REOPEN
@ -912,43 +906,6 @@ XdmcpAddAuthorization(ARRAY8Ptr name, ARRAY8Ptr data)
static void
get_xdmcp_sock(void)
{
#ifdef STREAMSCONN
struct netconfig *nconf;
if ((xdmcpSocket = t_open("/dev/udp", O_RDWR, 0)) < 0) {
XdmcpWarning("t_open() of /dev/udp failed");
return;
}
if (t_bind(xdmcpSocket, NULL, NULL) < 0) {
XdmcpWarning("UDP socket creation failed");
t_error("t_bind(xdmcpSocket) failed");
t_close(xdmcpSocket);
return;
}
/*
* This part of the code looks contrived. It will actually fit in nicely
* when the CLTS part of Xtrans is implemented.
*/
if ((nconf = getnetconfigent("udp")) == NULL) {
XdmcpWarning("UDP socket creation failed: getnetconfigent()");
t_unbind(xdmcpSocket);
t_close(xdmcpSocket);
return;
}
if (netdir_options(nconf, ND_SET_BROADCAST, xdmcpSocket, NULL)) {
XdmcpWarning("UDP set broadcast option failed: netdir_options()");
freenetconfigent(nconf);
t_unbind(xdmcpSocket);
t_close(xdmcpSocket);
return;
}
freenetconfigent(nconf);
#else
int soopts = 1;
#if defined(IPv6) && defined(AF_INET6)
@ -969,7 +926,6 @@ get_xdmcp_sock(void)
xdm_from);
}
}
#endif /* STREAMSCONN */
}
static void