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 d6dd99553..dfe85e515 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 {
@@ -336,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
@@ -421,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)
{
@@ -430,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;
}
@@ -492,7 +493,7 @@ TimerForce(OsTimerPtr timer)
}
-_X_EXPORT void
+void
TimerCancel(OsTimerPtr timer)
{
OsTimerPtr *prev;
@@ -509,7 +510,7 @@ TimerCancel(OsTimerPtr timer)
}
}
-_X_EXPORT void
+void
TimerFree(OsTimerPtr timer)
{
if (!timer)