From d137057fd13e83ec15ab416c7fe774741da06047 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 10 Jul 2012 14:56:29 +0200 Subject: fontconfig mesa xserver git update 10 Jul 2012 --- xorg-server/os/connection.c | 2 +- xorg-server/os/io.c | 12 +++++++----- xorg-server/os/osinit.c | 1 + xorg-server/os/utils.c | 18 +++++++++++++++--- 4 files changed, 24 insertions(+), 9 deletions(-) (limited to 'xorg-server/os') diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c index 344147220..721ad65b3 100644 --- a/xorg-server/os/connection.c +++ b/xorg-server/os/connection.c @@ -892,7 +892,7 @@ ErrorConnMax(XtransConnInfo trans_conn) { int fd = _XSERVTransGetConnectionNumber(trans_conn); xConnSetupPrefix csp; - char pad[3]; + char pad[3] = { 0, 0, 0 }; struct iovec iov[3]; char byteOrder = 0; int whichbyte = 1; diff --git a/xorg-server/os/io.c b/xorg-server/os/io.c index b67a5f324..e44db3933 100644 --- a/xorg-server/os/io.c +++ b/xorg-server/os/io.c @@ -578,8 +578,6 @@ ResetCurrentRequest(ClientPtr client) } } -static const int padlength[4] = { 0, 3, 2, 1 }; - /******************** * FlushAllOutput() * Flush all clients with output. However, if some client still @@ -757,7 +755,7 @@ WriteToClient(ClientPtr who, int count, const void *__buf) oc->output = oco; } - padBytes = padlength[count & 3]; + padBytes = padding_for_int32(count); if (ReplyCallback) { ReplyInfoRec replyinfo; @@ -815,7 +813,11 @@ WriteToClient(ClientPtr who, int count, const void *__buf) NewOutputPending = TRUE; FD_SET(oc->fd, &OutputPending); memmove((char *) oco->buf + oco->count, buf, count); - oco->count += count + padBytes; + oco->count += count; + if (padBytes) { + memset(oco->buf + oco->count, '\0', padBytes); + oco->count += padBytes; + } return count; } @@ -846,7 +848,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount) if (!oco) return 0; written = 0; - padsize = padlength[extraCount & 3]; + padsize = padding_for_int32(extraCount); notWritten = oco->count + extraCount + padsize; todo = notWritten; while (notWritten) { diff --git a/xorg-server/os/osinit.c b/xorg-server/os/osinit.c index 6cc040178..2eb1f7a8f 100644 --- a/xorg-server/os/osinit.c +++ b/xorg-server/os/osinit.c @@ -288,6 +288,7 @@ OsInit(void) } TimerInit(); OsVendorInit(); + OsResetSignals(); /* * No log file by default. OsVendorInit() should call LogInit() with the * log file name if logging to a file is desired. diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c index 253793467..a6f6ef549 100644 --- a/xorg-server/os/utils.c +++ b/xorg-server/os/utils.c @@ -138,7 +138,6 @@ Bool noDPMSExtension = FALSE; #endif #ifdef GLXEXT Bool noGlxExtension = FALSE; -Bool noGlxVisualInit = FALSE; #endif #ifdef SCREENSAVER Bool noScreenSaverExtension = FALSE; @@ -757,8 +756,8 @@ ProcessCommandLine(int argc, char *argv[]) else if (strcmp(argv[i], "-nolisten") == 0) { if (++i < argc) { if (_XSERVTransNoListen(argv[i])) - FatalError("Failed to disable listen for %s transport", - argv[i]); + ErrorF("Failed to disable listen for %s transport", + argv[i]); } else UseMsg(); @@ -1243,6 +1242,19 @@ OsReleaseSignals(void) #endif } +void +OsResetSignals(void) +{ +#ifdef SIG_BLOCK + while (BlockedSignalCount > 0) + OsReleaseSignals(); +#ifdef SIGIO + while (sigio_blocked > 0) + OsReleaseSIGIO(); +#endif +#endif +} + /* * Pending signals may interfere with core dumping. Provide a * mechanism to block signals when aborting. -- cgit v1.2.3