aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/WaitFor.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/os/WaitFor.c')
-rw-r--r--xorg-server/os/WaitFor.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/xorg-server/os/WaitFor.c b/xorg-server/os/WaitFor.c
index 7235708f7..7199680cd 100644
--- a/xorg-server/os/WaitFor.c
+++ b/xorg-server/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,8 +111,7 @@ mffs(fd_mask mask)
}
#ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
#endif
struct _OsTimerRec {
@@ -342,7 +343,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
@@ -427,7 +428,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)
{
@@ -436,7 +437,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;
}
@@ -498,7 +499,7 @@ TimerForce(OsTimerPtr timer)
}
-_X_EXPORT void
+void
TimerCancel(OsTimerPtr timer)
{
OsTimerPtr *prev;
@@ -515,7 +516,7 @@ TimerCancel(OsTimerPtr timer)
}
}
-_X_EXPORT void
+void
TimerFree(OsTimerPtr timer)
{
if (!timer)