Commit 0cbc8922 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Remove unused TLI ("STREAMSCONN") code

parent b5bfd3a4
......@@ -375,9 +375,6 @@ XCOMM the platform-specific parameters - edit site.def to change
#ifndef HasSockets
#define HasSockets YES
#endif
#ifndef HasStreams
#define HasStreams !HasSockets
#endif
#ifndef HasPoll
#if SystemV || SystemV4
#define HasPoll YES
......
......@@ -77,7 +77,6 @@ Imake.tmpl provides defaults for the following variables:
HasShm boolean for System V shared memory
HasSockets boolean for system has BSD sockets
HasStrcasecmp boolean for system implements str[n]casecmp
HasStreams use STREAMS I/O interface?
HasSymLinks boolean for system has symbolic links
HasTestCenter boolean for system has TestCenter
HasVarDirectory boolean for system has /var
......
......@@ -334,8 +334,7 @@ XORGRELSTRING = XorgManVersionString
* NOTE: IPv6Flags could be tacked on to either ConnectionFlags or
* ExtraConnectionDefs. Here, we choose the later in order to
* maximise exposure of the IPv6 code (a number of <OS>.def files
* contain ConnectionFlags overrides). Mind you, this might not
* the right thing to do when HasStreams is asserted.
* contain ConnectionFlags overrides).
*/
#ifndef BuildIPv6 /* If the OS also #define's AF_INET6 */
#define BuildIPv6 YES
......@@ -356,12 +355,8 @@ XORGRELSTRING = XorgManVersionString
#define IPv6SocketsAlsoIPv4 YES
#endif
#ifndef ConnectionFlags
#if HasStreams
#define ConnectionFlags -DSTREAMSCONN
#else
#define ConnectionFlags -DTCPCONN -DUNIXCONN
#endif
#endif
#if HasStickyDirBit
STICKY_DEFINES = -DHAS_STICKY_DIR_BIT
#endif
......
......@@ -846,13 +846,6 @@ _XSendClientPrefix(
}
#ifdef STREAMSCONN
#ifdef SVR4
#include <tiuser.h>
#else
#undef HASXDMAUTH
#endif
#endif
#ifdef SECURE_RPC
#include <rpc/rpc.h>
......
......@@ -13,7 +13,6 @@ HEADERS = \
Xtranslcl.c \
Xtransos2.c \
Xtranssock.c \
Xtranstli.c \
Xtransutil.c \
transport.c
......
......@@ -81,11 +81,6 @@ from The Open Group.
static
Xtransport_table Xtransports[] = {
#if defined(STREAMSCONN)
{ &TRANS(TLITCPFuncs), TRANS_TLI_TCP_INDEX },
{ &TRANS(TLIINETFuncs), TRANS_TLI_INET_INDEX },
{ &TRANS(TLITLIFuncs), TRANS_TLI_TLI_INDEX },
#endif /* STREAMSCONN */
#if defined(TCPCONN)
{ &TRANS(SocketTCPFuncs), TRANS_SOCKET_TCP_INDEX },
#if defined(IPv6) && defined(AF_INET6)
......
......@@ -93,7 +93,7 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
switch( *familyp )
{
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
case AF_INET:
{
/*
......@@ -156,7 +156,7 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
break;
}
#endif /* IPv6 */
#endif /* defined(TCPCONN) || defined(STREAMSCONN) */
#endif /* defined(TCPCONN) */
#if defined(UNIXCONN) || defined(LOCALCONN) || defined(OS2PIPECONN)
......@@ -242,7 +242,7 @@ TRANS(GetMyNetworkId) (XtransConnInfo ciptr)
switch (family)
{
#if defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN) || defined(OS2PIPECONN)
#if defined(UNIXCONN) || defined(LOCALCONN) || defined(OS2PIPECONN)
case AF_UNIX:
{
struct sockaddr_un *saddr = (struct sockaddr_un *) addr;
......@@ -252,9 +252,9 @@ TRANS(GetMyNetworkId) (XtransConnInfo ciptr)
hostnamebuf, saddr->sun_path);
break;
}
#endif /* defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN) || defined(OS2PIPECONN) */
#endif /* defined(UNIXCONN) || defined(LOCALCONN) || defined(OS2PIPECONN) */
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
case AF_INET:
#if defined(IPv6) && defined(AF_INET6)
case AF_INET6:
......@@ -281,7 +281,7 @@ TRANS(GetMyNetworkId) (XtransConnInfo ciptr)
sprintf (networkId, "%s/%s:%s", transName, hostnamebuf, portnumbuf);
break;
}
#endif /* defined(TCPCONN) || defined(STREAMSCONN) */
#endif /* defined(TCPCONN) */
default:
......@@ -332,16 +332,16 @@ TRANS(GetPeerNetworkId) (XtransConnInfo ciptr)
switch (family)
{
case AF_UNSPEC:
#if defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN) || defined(OS2PIPECONN)
#if defined(UNIXCONN) || defined(LOCALCONN) || defined(OS2PIPECONN)
case AF_UNIX:
{
if (gethostname (addrbuf, sizeof (addrbuf)) == 0)
addr = addrbuf;
break;
}
#endif /* defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN) || defined(OS2PIPECONN) */
#endif /* defined(UNIXCONN) || defined(LOCALCONN) || defined(OS2PIPECONN) */
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
case AF_INET:
#if defined(IPv6) && defined(AF_INET6)
case AF_INET6:
......@@ -401,7 +401,7 @@ TRANS(GetPeerNetworkId) (XtransConnInfo ciptr)
break;
}
#endif /* defined(TCPCONN) || defined(STREAMSCONN) */
#endif /* defined(TCPCONN) */
default:
......
......@@ -70,8 +70,5 @@ from The Open Group.
#if defined(TCPCONN) || defined(UNIXCONN)
#include "Xtranssock.c"
#endif
#ifdef STREAMSCONN
#include "Xtranstli.c"
#endif
#include "Xtrans.c"
#include "Xtransutil.c"
......@@ -84,9 +84,9 @@ SOFTWARE.
#include <sys/ioctl.h>
#include <ctype.h>
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(ISC) || defined(__SCO__)
#if defined(TCPCONN) || defined(ISC) || defined(__SCO__)
#include <netinet/in.h>
#endif /* TCPCONN || STREAMSCONN || ISC || __SCO__ */
#endif /* TCPCONN || ISC || __SCO__ */
#ifdef HAS_GETPEERUCRED
# include <ucred.h>
......@@ -525,7 +525,7 @@ DefineSelf (int fd)
void
DefineSelf (int fd)
{
#if !defined(TCPCONN) && !defined(STREAMSCONN) && !defined(UNIXCONN) && !defined(MNX_TCPCONN)
#if !defined(TCPCONN) && !defined(UNIXCONN) && !defined(MNX_TCPCONN)
return;
#else
register int n;
......@@ -668,7 +668,7 @@ DefineLocalHost:
selfhosts = host;
}
}
#endif /* !TCPCONN && !STREAMSCONN && !UNIXCONN && !MNX_TCPCONN */
#endif /* !TCPCONN && !UNIXCONN && !MNX_TCPCONN */
}
#else
......@@ -1110,13 +1110,13 @@ ResetHosts (char *display)
FILE *fd;
char *ptr;
int i, hostlen;
#if ((defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)) && \
#if ((defined(TCPCONN) || defined(MNX_TCPCONN)) && \
(!defined(IPv6) || !defined(AF_INET6)))
union {
struct sockaddr sa;
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
#if defined(TCPCONN) || defined(MNX_TCPCONN)
struct sockaddr_in in;
#endif /* TCPCONN || STREAMSCONN */
#endif /* TCPCONN */
} saddr;
#endif
int family = 0;
......@@ -1166,7 +1166,7 @@ ResetHosts (char *display)
NewHost(family, "", 0, FALSE);
LocalHostRequested = TRUE; /* Fix for XFree86 bug #156 */
}
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
#if defined(TCPCONN) || defined(MNX_TCPCONN)
else if (!strncmp("inet:", lhostname, 5))
{
family = FamilyInternet;
......@@ -1211,7 +1211,7 @@ ResetHosts (char *display)
}
else
#endif /* SECURE_RPC */
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
#if defined(TCPCONN) || defined(MNX_TCPCONN)
{
#if defined(IPv6) && defined(AF_INET6)
if ( (family == FamilyInternet) || (family == FamilyInternet6) ||
......@@ -1261,7 +1261,7 @@ ResetHosts (char *display)
}
#endif /* IPv6 */
}
#endif /* TCPCONN || STREAMSCONN */
#endif /* TCPCONN */
family = FamilyWild;
}
fclose (fd);
......@@ -1642,7 +1642,7 @@ CheckAddr (
switch (family)
{
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
#if defined(TCPCONN) || defined(MNX_TCPCONN)
case FamilyInternet:
if (length == sizeof (struct in_addr))
len = length;
......@@ -1735,7 +1735,7 @@ ConvertAddr (
case AF_UNIX:
#endif
return FamilyLocal;
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
#if defined(TCPCONN) || defined(MNX_TCPCONN)
case AF_INET:
#ifdef WIN32
if (16777343 == *(long*)&((struct sockaddr_in *) saddr)->sin_addr)
......
......@@ -112,7 +112,7 @@ SOFTWARE.
extern __const__ int _nfiles;
#endif
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
# include <netinet/in.h>
# include <arpa/inet.h>
# if !defined(hpux)
......@@ -601,7 +601,7 @@ AuthAudit (ClientPtr client, Bool letin,
#endif
strcpy(out, "local host");
break;
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
#if defined(TCPCONN) || defined(MNX_TCPCONN)
case AF_INET:
sprintf(out, "IP %s",
inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr));
......
......@@ -131,7 +131,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include <stdlib.h> /* for malloc() */
#if defined(TCPCONN) || defined(STREAMSCONN)
#if defined(TCPCONN)
# ifndef WIN32
# include <netdb.h>
# endif
......@@ -1285,7 +1285,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;
......
......@@ -284,7 +284,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);
......
......@@ -54,11 +54,6 @@
#include <sys/ioctl.h>
#endif
#ifdef STREAMSCONN
#include <tiuser.h>
#include <netconfig.h>
#include <netdir.h>
#endif
#ifndef NX_TRANS_SOCKET
......@@ -1029,43 +1024,6 @@ XdmcpAddAuthorization (
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)
......@@ -1085,7 +1043,6 @@ get_xdmcp_sock(void)
FatalError("Xserver: failed to bind to -from address: %s\n", xdm_from);
}
}
#endif /* STREAMSCONN */
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment