diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-04 18:56:01 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-08 17:05:41 -0800 |
commit | 50c8bd6121e5a4c679fb7c9762cf2dc591f0c3ef (patch) | |
tree | 10c404b01f30774e14cb2d13d105bfe9ddc6db3a | |
parent | ab917f59ba5d1d10db1bf45b632b61e64a2b31c4 (diff) |
Drop usleep fallbacks for ancient OS versions
Unix 98 requires usleep() so assume most supported non-Win32 platforms
have it and don't need old workarounds any more.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | xset.c | 27 |
2 files changed, 4 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac index 513b023..f7764bf 100644 --- a/configure.ac +++ b/configure.ac @@ -26,6 +26,7 @@ AC_INIT([xset], [1.2.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xset]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) +AC_USE_SYSTEM_EXTENSIONS # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) @@ -549,35 +549,14 @@ main(int argc, char *argv[]) * which case the Up transition may immediately * turn the display back on. * - * On OS/2, use _sleep2() */ #ifdef HAVE_USLEEP # define Usleep(us) usleep((us)) -#else -#ifdef SVR4 -# ifdef sgi -# define Usleep(us) sginap((us) / 1000) -# endif -#endif -#ifdef hpux -# ifdef _XPG4_EXTENDED -# define Usleep(us) usleep((us)) -# endif -#endif -#ifdef __UNIXOS2__ -# define Usleep(us) _sleep2((us / 1000 > 0) ? us / 1000 : 1) -#endif -#ifdef WIN32 +#elif defined(WIN32) # define Usleep(us) Sleep(us) -#endif -#ifndef Usleep -# if defined(SYSV) || defined(SVR4) -# define Usleep(us) sleep((us / 1000000 > 0) ? us / 1000000 : 1) -# else -# define Usleep(us) usleep((us)) -# endif -#endif +#else +# define Usleep(us) sleep((us / 1000000 > 0) ? us / 1000000 : 1) #endif /* HAVE_USLEEP */ if (strcmp(arg, "on") == 0) { |