]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tty/lib_twait.c
ncurses 5.6 - patch 20080105
[ncurses.git] / ncurses / tty / lib_twait.c
index e18756c2fc3f468eec8620368775b0672883dea8..1e4546dec0c00517d6bef2e20fe8ce73386162c1 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -62,7 +62,7 @@
 # endif
 #endif
 
-MODULE_ID("$Id: lib_twait.c,v 1.52 2006/12/30 16:56:28 tom Exp $")
+MODULE_ID("$Id: lib_twait.c,v 1.54 2007/08/11 16:32:48 tom Exp $")
 
 #if HAVE_GETTIMEOFDAY
 # define PRECISE_GETTIME 1
@@ -152,7 +152,7 @@ _nc_timed_wait(int mode,
 {
     int fd;
     int count;
-    int result;
+    int result = 0;
     TimeType t0;
 
 #ifdef NCURSES_WGETCH_EVENTS
@@ -186,7 +186,7 @@ _nc_timed_wait(int mode,
     }
 #endif
 
-#if PRECISE_GETTIME
+#if PRECISE_GETTIME && HAVE_NANOSLEEP
   retry:
 #endif
     starttime = _nc_gettime(&t0, TRUE);