summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-05-20 10:20:14 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-05-20 10:20:14 +0930
commit99d28c3ef37aeffe7d8ec41e45a650ba248c6958 (patch)
treef64efb86b1bc5f0c864d6a4ad0d79291f96b1c15 /os
parentfc7e2566cc076c0d979f74871bc436df43401058 (diff)
parent0178b6a4abed0df3e90ba393709ed566105e7c2c (diff)
Merge branch 'master' into mpx
Conflicts: Xext/xprint.c (removed in master) config/hal.c dix/main.c hw/kdrive/ati/ati_cursor.c (removed in master) hw/kdrive/i810/i810_cursor.c (removed in master) hw/xprint/ddxInit.c (removed in master) xkb/ddxLoad.c
Diffstat (limited to 'os')
-rw-r--r--os/connection.c39
-rw-r--r--os/log.c22
-rw-r--r--os/utils.c13
-rw-r--r--os/xdmcp.c3
4 files changed, 44 insertions, 33 deletions
diff --git a/os/connection.c b/os/connection.c
index 396593698..316e347f2 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -1297,3 +1297,42 @@ MakeClientGrabPervious(ClientPtr client)
}
}
+#ifdef XQUARTZ
+/* Add a fd (from launchd) to our listeners */
+_X_EXPORT void ListenOnOpenFD(int fd) {
+ char port[20];
+ XtransConnInfo ciptr;
+
+ /* Sigh for inconsistencies. */
+ sprintf (port, ":%d", atoi(display));
+
+ /* Make our XtransConnInfo
+ * TRANS_SOCKET_LOCAL_INDEX = 5 from Xtrans.c
+ */
+ ciptr = _XSERVTransReopenCOTSServer(5, fd, port);
+ if(ciptr == NULL) {
+ ErrorF("Got NULL while trying to Reopen launchd port.\n");
+ return;
+ }
+
+ /* Allocate space to store it */
+ ListenTransFds = (int *) xrealloc(ListenTransFds, (ListenTransCount + 1) * sizeof (int));
+ ListenTransConns = (XtransConnInfo *) xrealloc(ListenTransConns, (ListenTransCount + 1) * sizeof (XtransConnInfo));
+
+ /* Store it */
+ ListenTransConns[ListenTransCount] = ciptr;
+ ListenTransFds[ListenTransCount] = fd;
+
+ FD_SET(fd, &WellKnownConnections);
+
+ /* It is always local
+ if (!_XSERVTransIsLocal(ciptr)) {
+ // DefineSelf (fd);
+ }
+ */
+
+ /* Increment the count */
+ ListenTransCount++;
+}
+
+#endif
diff --git a/os/log.c b/os/log.c
index 0860847ec..2a59a00b3 100644
--- a/os/log.c
+++ b/os/log.c
@@ -410,9 +410,7 @@ AbortServer(void)
exit (1);
}
-#ifndef AUDIT_PREFIX
-#define AUDIT_PREFIX "AUDIT: %s: %ld %s: "
-#endif
+#define AUDIT_PREFIX "AUDIT: %s: %ld: "
#ifndef AUDIT_TIMEOUT
#define AUDIT_TIMEOUT ((CARD32)(120 * 1000)) /* 2 mn */
#endif
@@ -444,15 +442,11 @@ AuditPrefix(void)
autime = ctime(&tm);
if ((s = strchr(autime, '\n')))
*s = '\0';
- if ((s = strrchr(argvGlobal[0], '/')))
- s++;
- else
- s = argvGlobal[0];
- len = strlen(AUDIT_PREFIX) + strlen(autime) + 10 + strlen(s) + 1;
+ len = strlen(AUDIT_PREFIX) + strlen(autime) + 10 + 1;
tmpBuf = malloc(len);
if (!tmpBuf)
return NULL;
- snprintf(tmpBuf, len, AUDIT_PREFIX, autime, (unsigned long)getpid(), s);
+ snprintf(tmpBuf, len, AUDIT_PREFIX, autime, (unsigned long)getpid());
return tmpBuf;
}
@@ -498,15 +492,6 @@ VAuditF(const char *f, va_list args)
prefix = AuditPrefix();
len = vsnprintf(buf, sizeof(buf), f, args);
-#if 1
- /* XXX Compressing duplicated messages is temporarily disabled to
- * work around bugzilla 964:
- * https://freedesktop.org/bugzilla/show_bug.cgi?id=964
- */
- ErrorF("%s%s", prefix != NULL ? prefix : "", buf);
- oldlen = -1;
- nrepeat = 0;
-#else
if (len == oldlen && strcmp(buf, oldbuf) == 0) {
/* Message already seen */
nrepeat++;
@@ -520,7 +505,6 @@ VAuditF(const char *f, va_list args)
nrepeat = 0;
auditTimer = TimerSet(auditTimer, 0, AUDIT_TIMEOUT, AuditFlush, NULL);
}
-#endif
if (prefix != NULL)
free(prefix);
}
diff --git a/os/utils.c b/os/utils.c
index 4bebeca9e..90342c64a 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -128,10 +128,6 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include "picture.h"
#endif
-#ifdef XPRINT
-#include "DiPrint.h"
-#endif
-
_X_EXPORT Bool noTestExtensions;
#ifdef BIGREQS
_X_EXPORT Bool noBigReqExtension = FALSE;
@@ -613,9 +609,6 @@ void UseMsg(void)
ErrorF("-render [default|mono|gray|color] set render color alloc policy\n");
#endif
ErrorF("-s # screen-saver timeout (minutes)\n");
-#ifdef XPRINT
- PrinterUseMsg();
-#endif
ErrorF("-su disable any save under support\n");
ErrorF("-t # mouse threshold (pixels)\n");
ErrorF("-terminate terminate at server reset\n");
@@ -1027,12 +1020,6 @@ ProcessCommandLine(int argc, char *argv[])
i = skip - 1;
}
#endif
-#ifdef XPRINT
- else if ((skip = PrinterOptions(argc, argv, i)) != i)
- {
- i = skip - 1;
- }
-#endif
#ifdef AIXV3
else if ( strcmp( argv[i], "-timeout") == 0)
{
diff --git a/os/xdmcp.c b/os/xdmcp.c
index 310f33bc0..d896c8ba3 100644
--- a/os/xdmcp.c
+++ b/os/xdmcp.c
@@ -44,6 +44,7 @@
#include "input.h"
#include "dixstruct.h"
#include "opaque.h"
+#include "site.h"
#if defined(DGUX)
#include <net/net_ioctl.h>
@@ -68,7 +69,7 @@
#define X_INCLUDE_NETDB_H
#include <X11/Xos_r.h>
-extern char *defaultDisplayClass;
+static char *defaultDisplayClass = COMPILEDDISPLAYCLASS;
static int xdmcpSocket, sessionSocket;
static xdmcp_states state;