aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-10 14:56:29 +0200
committermarha <marha@users.sourceforge.net>2012-07-10 14:56:29 +0200
commitd137057fd13e83ec15ab416c7fe774741da06047 (patch)
treef4b38caa4f3ecb983f00e84f4f4d8d66699ecbc5 /xorg-server/os
parentc29d91cfd8df084f16d0d2dfa82c3a86f7719a73 (diff)
downloadvcxsrv-d137057fd13e83ec15ab416c7fe774741da06047.tar.gz
vcxsrv-d137057fd13e83ec15ab416c7fe774741da06047.tar.bz2
vcxsrv-d137057fd13e83ec15ab416c7fe774741da06047.zip
fontconfig mesa xserver git update 10 Jul 2012
Diffstat (limited to 'xorg-server/os')
-rw-r--r--xorg-server/os/connection.c2
-rw-r--r--xorg-server/os/io.c12
-rw-r--r--xorg-server/os/osinit.c1
-rw-r--r--xorg-server/os/utils.c18
4 files changed, 24 insertions, 9 deletions
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.