summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-03-30 10:59:06 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-03-30 10:59:50 -0700
commit3038a87edce31ad2895431f7cfdc96a33fc70e02 (patch)
tree968d583c798877f55e2488b9abf80b2456016549
parent325f5282bc1d93b72b0b05037245cf130970fa38 (diff)
Check for configure's HAVE_UNISTD_H instead of X_NOT_POSIX
Drops fallback prototype of sleep() for non-POSIX, non-Windows systems Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--AuLock.c13
1 files 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