[PATCH:xset 3/3] Remove direct call to Solaris nanosleep system call

Alan Coopersmith alan.coopersmith at oracle.com
Fri Jul 15 18:34:21 PDT 2011


Attempted to workaround nanosleep() being only in POSIX realtime
extensions library, but both usleep() & nanosleep() are in libc now,
so not useful anymore, nor was it ever officially supported.

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 xset.c |   17 -----------------
 1 files changed, 0 insertions(+), 17 deletions(-)

diff --git a/xset.c b/xset.c
index cca592d..40fc7e1 100644
--- a/xset.c
+++ b/xset.c
@@ -78,11 +78,6 @@ in this Software without prior written authorization from The Open Group.
 #  endif
 #  undef BOOL
 # endif
-# ifndef HAVE_USLEEP
-#  if defined(SVR4) && defined(sun)
-#   include <sys/syscall.h>
-#  endif
-# endif
 #endif /* DPMSExtension */
 
 #ifdef XF86MISC
@@ -574,18 +569,6 @@ main(int argc, char *argv[])
 # define Usleep(us) usleep((us))
 #else
 #ifdef SVR4
-# ifdef sun
-/* Anything to avoid linking with -lposix4 */
-#  define Usleep(us) { \
-		struct ts { \
-			long	tv_sec; \
-			long	tv_nsec; \
-		} req; \
-		req.tv_sec = 0; \
-		req.tv_nsec = (us) * 1000;\
-		syscall(SYS_nanosleep, &req, NULL); \
-	}
-# endif
 # ifdef sgi
 #  define Usleep(us) sginap((us) / 1000)
 # endif
-- 
1.7.3.2



More information about the xorg-devel mailing list