diff options
author | marha <marha@users.sourceforge.net> | 2012-11-29 07:56:51 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-11-29 07:56:51 +0100 |
commit | d2d73da59e64acdc4718e4e6790a69d967bee875 (patch) | |
tree | 5c0148abbbb1473bb80ddc7da286beae9c1f2c3d /xorg-server/os/utils.c | |
parent | 38eb7612c4b39dd69df4baf4450ba512e888effa (diff) | |
download | vcxsrv-d2d73da59e64acdc4718e4e6790a69d967bee875.tar.gz vcxsrv-d2d73da59e64acdc4718e4e6790a69d967bee875.tar.bz2 vcxsrv-d2d73da59e64acdc4718e4e6790a69d967bee875.zip |
fontconfig xserver mesa git update 29 nov 2012
xserver: 1712a45422a63f11b2146541279616fcfda09ec6
fontconfig: faea1cac85ac3b0fd6a983e1c0adeb68e115e06c
mesa: c1023608002c985b9d72edc64732cd666de2a206
Diffstat (limited to 'xorg-server/os/utils.c')
-rw-r--r-- | xorg-server/os/utils.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c index 3c520add5..6f75c1704 100644 --- a/xorg-server/os/utils.c +++ b/xorg-server/os/utils.c @@ -71,6 +71,7 @@ __stdcall unsigned long GetTickCount(void); #if !defined(WIN32) || !defined(__MINGW32__) #include <sys/time.h> #include <sys/resource.h> +# define SMART_SCHEDULE_POSSIBLE #endif #include "misc.h" #include <X11/X.h> @@ -212,6 +213,9 @@ sig_atomic_t inSignalContext = FALSE; OsSigHandlerPtr OsSignal(int sig, OsSigHandlerPtr handler) { +#if defined(WIN32) && !defined(__CYGWIN__) + return signal(sig, handler); +#else struct sigaction act, oact; sigemptyset(&act.sa_mask); @@ -222,6 +226,7 @@ OsSignal(int sig, OsSigHandlerPtr handler) if (sigaction(sig, &act, &oact)) perror("sigaction"); return oact.sa_handler; +#endif } /* @@ -894,6 +899,7 @@ ProcessCommandLine(int argc, char *argv[]) i = skip - 1; } #endif +#ifdef SMART_SCHEDULE_POSSIBLE else if (strcmp(argv[i], "-dumbSched") == 0) { SmartScheduleDisable = TRUE; } @@ -912,6 +918,7 @@ ProcessCommandLine(int argc, char *argv[]) else UseMsg(); } +#endif else if (strcmp(argv[i], "-render") == 0) { if (++i < argc) { int policy = PictureParseCmapPolicy(argv[i]); @@ -1123,6 +1130,7 @@ XNFstrdup(const char *s) void SmartScheduleStopTimer(void) { +#ifdef SMART_SCHEDULE_POSSIBLE struct itimerval timer; if (SmartScheduleDisable) @@ -1132,11 +1140,13 @@ SmartScheduleStopTimer(void) timer.it_value.tv_sec = 0; timer.it_value.tv_usec = 0; (void) setitimer(ITIMER_REAL, &timer, 0); +#endif } void SmartScheduleStartTimer(void) { +#ifdef SMART_SCHEDULE_POSSIBLE struct itimerval timer; if (SmartScheduleDisable) @@ -1146,6 +1156,7 @@ SmartScheduleStartTimer(void) timer.it_value.tv_sec = 0; timer.it_value.tv_usec = SmartScheduleInterval * 1000; setitimer(ITIMER_REAL, &timer, 0); +#endif } static void @@ -1157,6 +1168,7 @@ SmartScheduleTimer(int sig) void SmartScheduleInit(void) { +#ifdef SMART_SCHEDULE_POSSIBLE struct sigaction act; if (SmartScheduleDisable) @@ -1172,6 +1184,7 @@ SmartScheduleInit(void) perror("sigaction for smart scheduler"); SmartScheduleDisable = TRUE; } +#endif } #ifdef SIG_BLOCK @@ -1227,10 +1240,10 @@ OsBlockSIGIO(void) sigprocmask(SIG_BLOCK, &set, &PreviousSigIOMask); ret = sigismember(&PreviousSigIOMask, SIGIO); return ret; - } else - return 1; + } #endif #endif + return 1; } void |