* src/misc.c (spin): On WINDOWS32 use Sleep() instead of sleep()

This commit is contained in:
Ben Wijen 2019-10-30 07:33:39 +01:00 committed by Paul Smith
parent 69c5a2128b
commit 30cc10093b

View 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);
}
}