mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-26 03:54:30 +00:00
os: xdmcp: add dummy functions when XDMCP not defined
instead of cluttering the code with #ifdef's, just define the non-existing functions as empty dummies when XDMCP is disabled. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -306,9 +306,7 @@ CreateWellKnownSockets(void)
|
||||
|
||||
InitParentProcess();
|
||||
|
||||
#ifdef XDMCP
|
||||
XdmcpInit();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -319,9 +319,7 @@ UseMsg(void)
|
||||
ErrorF("+extension name Enable extension\n");
|
||||
ErrorF("-extension name Disable extension\n");
|
||||
ListStaticExtensions();
|
||||
#ifdef XDMCP
|
||||
XdmcpUseMsg();
|
||||
#endif
|
||||
XkbUseMsg();
|
||||
ddxUseMsg();
|
||||
}
|
||||
@@ -712,11 +710,9 @@ ProcessCommandLine(int argc, char *argv[])
|
||||
else if (strncmp(argv[i], "tty", 3) == 0) {
|
||||
/* init supplies us with this useless information */
|
||||
}
|
||||
#ifdef XDMCP
|
||||
else if ((skip = XdmcpOptions(argc, argv, i)) != i) {
|
||||
i = skip - 1;
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(argv[i], "-dumbSched") == 0) {
|
||||
InputThreadEnable = FALSE;
|
||||
#ifdef HAVE_SETITIMER
|
||||
|
||||
11
os/xdmcp.h
11
os/xdmcp.h
@@ -11,6 +11,8 @@ typedef Bool (*AddAuthorFunc) (unsigned name_length, const char *name,
|
||||
unsigned data_length, char *data);
|
||||
|
||||
/* in xdmcp.c */
|
||||
#ifdef XDMCP
|
||||
|
||||
void XdmcpUseMsg(void);
|
||||
int XdmcpOptions(int argc, char **argv, int i);
|
||||
void XdmcpRegisterConnection(int type, const char *address, int addrlen);
|
||||
@@ -30,4 +32,13 @@ void XdmcpRegisterAuthentication(const char *name,
|
||||
struct sockaddr_in;
|
||||
void XdmcpRegisterBroadcastAddress(const struct sockaddr_in *addr);
|
||||
|
||||
#else
|
||||
|
||||
static inline void XdmcpUseMsg(void) {}
|
||||
static inline XdmcpOptions(int argc, char **argv, int i) { return i; }
|
||||
static inline void XdmcpInit(void) {}
|
||||
static inline XdmcpReset(void) {}
|
||||
|
||||
#endif /* XDMCP */
|
||||
|
||||
#endif /* _XSERVER_OS_XDMCP_H */
|
||||
|
||||
Reference in New Issue
Block a user