[PATCH:libXau 2/5] Check for configure's HAVE_UNISTD_H instead of X_NOT_POSIX

Alan Coopersmith alan.coopersmith at oracle.com
Sat Mar 30 14:32:38 PDT 2013


Drops fallback prototype of sleep() for non-POSIX, non-Windows systems

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 AuLock.c |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/AuLock.c b/AuLock.c
index 3ae7596..b9859f1 100644
--- a/AuLock.c
+++ b/AuLock.c
@@ -33,15 +33,12 @@ in this Software without prior written authorization from The Open Group.
 #include <errno.h>
 #include <time.h>
 #define Time_t time_t
-#ifndef X_NOT_POSIX
-#include <unistd.h>
-#else
-#ifndef WIN32
-extern unsigned	sleep ();
-#else
-#include <X11/Xwindows.h>
-#define link rename
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
 #endif
+#ifdef WIN32
+# include <X11/Xwindows.h>
+# define link rename
 #endif
 
 int
-- 
1.7.9.2



More information about the xorg-devel mailing list