diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-08-27 15:56:14 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-08-27 15:56:14 -0700 |
commit | 44d9468edbbbb19d73c488345ceef1073d1df3a7 (patch) | |
tree | aa3b49e3edb7b78a42f59d51b9c111869c991a7c /xset.c | |
parent | ef35876a808a3cfbefecf59434118cb4d5cd3c3e (diff) |
Use autoconf to check for usleep before falling into twisty #ifdef maze
Diffstat (limited to 'xset.c')
-rw-r--r-- | xset.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -87,8 +87,10 @@ in this Software without prior written authorization from The Open Group. #endif #undef BOOL #endif -#if defined(SVR4) && defined(sun) -#include <sys/syscall.h> +#ifndef HAVE_USLEEP +# if defined(SVR4) && defined(sun) +# include <sys/syscall.h> +# endif #endif #endif /* DPMSExtension */ @@ -575,6 +577,9 @@ for (i = 1; i < argc; ) { * * On OS/2, use _sleep2() */ +#ifdef HAVE_USLEEP +# define Usleep(us) usleep((us)) +#else #ifdef SVR4 # ifdef sun /* Anything to avoid linking with -lposix4 */ @@ -610,6 +615,7 @@ for (i = 1; i < argc; ) { # define Usleep(us) usleep((us)) # endif #endif +#endif /* HAVE_USLEEP */ if (strcmp(arg, "on") == 0) { DPMSEnable(dpy); |