os: xtrans: drop XSERV_t and x11_t defines
These are always enablde (x11_t is defined when XSERV_t is defined), so no need for the #ifdef's anymore. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
f6dd15f8d4
commit
c62c0f093f
|
@ -35,7 +35,6 @@
|
|||
#include "windisplay.h"
|
||||
#include "winmsg.h"
|
||||
|
||||
#define XSERV_t
|
||||
#include "os/Xtrans.h"
|
||||
|
||||
/*
|
||||
|
|
21
os/Xtrans.h
21
os/Xtrans.h
|
@ -68,27 +68,10 @@ from The Open Group.
|
|||
* Set the functions names according to where this code is being compiled.
|
||||
*/
|
||||
|
||||
#ifdef X11_t
|
||||
#define TRANS(func) _X11Trans##func
|
||||
#ifdef XTRANSDEBUG
|
||||
static const char *__xtransname = "_X11Trans";
|
||||
#endif
|
||||
#endif /* X11_t */
|
||||
|
||||
#ifdef XSERV_t
|
||||
#define TRANS(func) _XSERVTrans##func
|
||||
#ifdef XTRANSDEBUG
|
||||
static const char *__xtransname = "_XSERVTrans";
|
||||
#endif
|
||||
#define X11_t
|
||||
#endif /* XSERV_t */
|
||||
|
||||
#if !defined(TRANS)
|
||||
#define TRANS(func) _XTrans##func
|
||||
#ifdef XTRANSDEBUG
|
||||
static const char *__xtransname = "_XTrans";
|
||||
#endif
|
||||
#endif /* !TRANS */
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
|
@ -339,16 +322,12 @@ int TRANS(MakeAllCOTSServerListeners)(
|
|||
* Function Prototypes for Utility Functions.
|
||||
*/
|
||||
|
||||
#ifdef X11_t
|
||||
|
||||
int TRANS(ConvertAddress)(
|
||||
int *, /* familyp */
|
||||
int *, /* addrlenp */
|
||||
Xtransaddr ** /* addrp */
|
||||
);
|
||||
|
||||
#endif /* X11_t */
|
||||
|
||||
int
|
||||
TRANS(GetHostname) (
|
||||
char * /* buf */,
|
||||
|
|
|
@ -98,9 +98,7 @@ from The Open Group.
|
|||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef X11_t
|
||||
#define X_TCP_PORT 6000
|
||||
#endif
|
||||
|
||||
#if XTRANS_SEND_FDS
|
||||
|
||||
|
|
|
@ -202,22 +202,12 @@ TRANS(FillAddrInfo)(XtransConnInfo ciptr,
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef X11_t
|
||||
#define X_STREAMS_DIR "/dev/X"
|
||||
#else
|
||||
#define X_STREAMS_DIR "/tmp/.X11-pipe"
|
||||
#endif
|
||||
|
||||
#define DEV_PTMX "/dev/ptmx"
|
||||
|
||||
#if defined(X11_t)
|
||||
|
||||
#define NAMEDNODENAME "/tmp/.X11-pipe/X"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LOCAL_TRANS_NAMED
|
||||
|
||||
/* NAMED */
|
||||
|
@ -783,7 +773,6 @@ TRANS(LocalOpenClient)(int type, const char *protocol,
|
|||
}
|
||||
|
||||
|
||||
#if defined(X11_t)
|
||||
/*
|
||||
* X has a well known port, that is transport dependent. It is easier
|
||||
* to handle it here, than try and come up with a transport independent
|
||||
|
@ -793,7 +782,6 @@ TRANS(LocalOpenClient)(int type, const char *protocol,
|
|||
* from ConnectDisplay(). Since that is what we want for the local transports,
|
||||
* we don't have to do anything special.
|
||||
*/
|
||||
#endif /* X11_t */
|
||||
|
||||
if( (ciptr = calloc(1,sizeof(struct _XtransConnInfo))) == NULL )
|
||||
{
|
||||
|
@ -853,14 +841,12 @@ TRANS(LocalOpenServer)(int type, const char *protocol,
|
|||
|
||||
prmsg(2,"LocalOpenServer(%d,%s,%s)\n", type, protocol, port);
|
||||
|
||||
#if defined(X11_t)
|
||||
/*
|
||||
* For X11, the port will be in the format xserverN where N is the
|
||||
* display number. All of the local connections just need to know
|
||||
* the display number because they don't do any name resolution on
|
||||
* the port. This just truncates port to the display portion.
|
||||
*/
|
||||
#endif /* X11_t */
|
||||
|
||||
if( (ciptr = calloc(1,sizeof(struct _XtransConnInfo))) == NULL )
|
||||
{
|
||||
|
|
|
@ -226,10 +226,8 @@ is_numeric (const char *str)
|
|||
#ifdef UNIXCONN
|
||||
|
||||
|
||||
#if defined(X11_t)
|
||||
#define UNIX_PATH "/tmp/.X11-unix/X"
|
||||
#define UNIX_DIR "/tmp/.X11-unix"
|
||||
#endif /* X11_t */
|
||||
|
||||
#endif /* UNIXCONN */
|
||||
|
||||
|
@ -388,7 +386,7 @@ TRANS(SocketOpen) (int i, int type)
|
|||
Sockettrans2devtab[i].protocol);
|
||||
|
||||
#ifndef WIN32
|
||||
#if (defined(X11_t) && !defined(USE_POLL))
|
||||
#if !defined(USE_POLL)
|
||||
if (ciptr->fd >= sysconf(_SC_OPEN_MAX))
|
||||
{
|
||||
prmsg (2, "SocketOpen: socket() returned out of range fd %d\n",
|
||||
|
@ -816,13 +814,10 @@ TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, const char *port,
|
|||
#endif
|
||||
struct servent *servp;
|
||||
|
||||
#ifdef X11_t
|
||||
char portbuf[PORTBUFSIZE];
|
||||
#endif
|
||||
|
||||
prmsg (2, "SocketINETCreateListener(%s)\n", port);
|
||||
|
||||
#ifdef X11_t
|
||||
/*
|
||||
* X has a well known port, that is transport dependent. It is easier
|
||||
* to handle it here, than try and come up with a transport independent
|
||||
|
@ -839,7 +834,6 @@ TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, const char *port,
|
|||
snprintf (portbuf, sizeof(portbuf), "%lu", tmpport);
|
||||
port = portbuf;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (port && *port)
|
||||
{
|
||||
|
@ -1299,9 +1293,7 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr,
|
|||
_Xgethostbynameparams hparams;
|
||||
_Xgetservbynameparams sparams;
|
||||
#endif
|
||||
#ifdef X11_t
|
||||
char portbuf[PORTBUFSIZE];
|
||||
#endif
|
||||
|
||||
char hostnamebuf[256]; /* tmp space */
|
||||
|
||||
|
@ -1314,7 +1306,6 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr,
|
|||
host = hostnamebuf;
|
||||
}
|
||||
|
||||
#ifdef X11_t
|
||||
/*
|
||||
* X has a well known port, that is transport dependent. It is easier
|
||||
* to handle it here, than try and come up with a transport independent
|
||||
|
@ -1330,7 +1321,6 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr,
|
|||
snprintf (portbuf, sizeof(portbuf), "%lu", tmpport);
|
||||
port = portbuf;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETADDRINFO
|
||||
{
|
||||
|
|
|
@ -72,8 +72,6 @@ from The Open Group.
|
|||
#define HAVE_INET_NTOP
|
||||
#endif
|
||||
|
||||
#ifdef X11_t
|
||||
|
||||
/*
|
||||
* These values come from X.h and Xauth.h, and MUST match them. Some
|
||||
* of these values are also defined by the ChangeHost protocol message.
|
||||
|
@ -224,8 +222,6 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* X11_t */
|
||||
|
||||
#if defined(WIN32) && defined(TCPCONN)
|
||||
int
|
||||
TRANS(WSAStartup) (void)
|
||||
|
|
|
@ -84,7 +84,6 @@ SOFTWARE.
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#define XSERV_t
|
||||
#include "os/Xtrans.h"
|
||||
#include <X11/Xauth.h>
|
||||
#include <X11/X.h>
|
||||
|
|
|
@ -67,7 +67,6 @@ SOFTWARE.
|
|||
#endif
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xproto.h>
|
||||
#define XSERV_t
|
||||
#include "os/Xtrans.h"
|
||||
#include "os/Xtransint.h"
|
||||
#include <errno.h>
|
||||
|
|
1
os/io.c
1
os/io.c
|
@ -61,7 +61,6 @@ SOFTWARE.
|
|||
#include <X11/Xwinsock.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#define XSERV_t
|
||||
#include "os/Xtrans.h"
|
||||
#include <X11/Xmd.h>
|
||||
#include <errno.h>
|
||||
|
|
|
@ -62,7 +62,6 @@ OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#endif
|
||||
#include "misc.h"
|
||||
#include <X11/X.h>
|
||||
#define XSERV_t
|
||||
#include "os/Xtrans.h"
|
||||
|
||||
#include <libgen.h>
|
||||
|
|
|
@ -37,7 +37,6 @@ from The Open Group.
|
|||
|
||||
#include <stdio.h>
|
||||
#include <X11/X.h>
|
||||
#define XSERV_t
|
||||
|
||||
#include "os/auth.h"
|
||||
#include "os/Xtrans.h"
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
#ifdef WIN32
|
||||
#include <X11/Xwinsock.h>
|
||||
#define XSERV_t
|
||||
#include "os/Xtrans.h"
|
||||
#endif
|
||||
|
||||
|
@ -46,7 +45,6 @@
|
|||
#include "input.h"
|
||||
#include "dixstruct.h"
|
||||
|
||||
#define XSERV_t
|
||||
#include "os/Xtrans.h"
|
||||
|
||||
#ifdef XDMCP
|
||||
|
|
|
@ -2,5 +2,4 @@
|
|||
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
#define XSERV_t
|
||||
#include "os/transport.c"
|
||||
|
|
Loading…
Reference in New Issue