]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* src/misc.c (spin): On WINDOWS32 use Sleep() instead of sleep()
authorBen Wijen <ben@wijen.net>
Wed, 30 Oct 2019 06:33:39 +0000 (07:33 +0100)
committerPaul Smith <psmith@gnu.org>
Wed, 18 Dec 2019 14:05:40 +0000 (09:05 -0500)
src/misc.c

index 2b7cc12ab27261b77879e5f20b92b2df0746c7df..9ed555ba8f54107bace4321c0b065eadce22e888 100644 (file)
@@ -24,6 +24,7 @@ this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <stdarg.h>
 
 #ifdef WINDOWS32
+# include <windows.h>
 # include <io.h>
 #endif
 
@@ -431,7 +432,8 @@ free_ns_chain (struct nameseq *ns)
 
 #ifdef MAKE_MAINTAINER_MODE
 
-void spin(const char* type)
+void
+spin (const char* type)
 {
   char filenm[256];
   struct stat dummy;
@@ -442,7 +444,11 @@ void spin(const char* type)
     {
       fprintf (stderr, "SPIN on %s\n", filenm);
       do
+#ifdef WINDOWS32
+        Sleep (1000);
+#else
         sleep (1);
+#endif
       while (stat (filenm, &dummy) == 0);
     }
 }