summaryrefslogtreecommitdiff
path: root/xserver/os/WaitFor.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-07-27 19:02:39 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-07-27 19:02:39 +0000
commit269d40cbcc43b41f621ca6d91c182952f60ec48e (patch)
tree872f2fddd3f2207e57a28595e73886713ce4a77a /xserver/os/WaitFor.c
parent917a2249b787451cad3f9697872aeccfd0da3324 (diff)
Update to xserver 1.8. Tested by many. Ok oga@, todd@.
Diffstat (limited to 'xserver/os/WaitFor.c')
-rw-r--r--xserver/os/WaitFor.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/xserver/os/WaitFor.c b/xserver/os/WaitFor.c
index 8afc958ea..dfe85e515 100644
--- a/xserver/os/WaitFor.c
+++ b/xserver/os/WaitFor.c
@@ -92,6 +92,8 @@ SOFTWARE.
#define GetErrno() errno
#endif
+/* like ffs, but uses fd_mask instead of int as argument, so it works
+ when fd_mask is longer than an int, such as common 64-bit platforms */
/* modifications by raphael */
int
mffs(fd_mask mask)
@@ -109,12 +111,7 @@ mffs(fd_mask mask)
}
#ifdef DPMSExtension
-#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
#include <X11/extensions/dpmsconst.h>
-#else
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
-#endif
#endif
struct _OsTimerRec {
@@ -340,7 +337,7 @@ WaitForSomething(int *pClientsReady)
{
int client_priority, client_index;
- curclient = ffs (clientsReadable.fds_bits[i]) - 1;
+ curclient = mffs (clientsReadable.fds_bits[i]) - 1;
client_index = /* raphael: modified */
ConnectionTranslation[curclient + (i * (sizeof(fd_mask) * 8))];
#else
@@ -425,7 +422,7 @@ DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev)
TimerSet(timer, 0, newTime, timer->callback, timer->arg);
}
-_X_EXPORT OsTimerPtr
+OsTimerPtr
TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
OsTimerCallback func, pointer arg)
{
@@ -434,7 +431,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
if (!timer)
{
- timer = (OsTimerPtr)xalloc(sizeof(struct _OsTimerRec));
+ timer = xalloc(sizeof(struct _OsTimerRec));
if (!timer)
return NULL;
}
@@ -496,7 +493,7 @@ TimerForce(OsTimerPtr timer)
}
-_X_EXPORT void
+void
TimerCancel(OsTimerPtr timer)
{
OsTimerPtr *prev;
@@ -513,7 +510,7 @@ TimerCancel(OsTimerPtr timer)
}
}
-_X_EXPORT void
+void
TimerFree(OsTimerPtr timer)
{
if (!timer)