/****************************************************************************
- * Copyright (c) 2013 Free Software Foundation, Inc. *
+ * Copyright (c) 2013,2014 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 *
/*
* Author: Thomas E. Dickey
*
- * $Id: dots_termcap.c,v 1.5 2013/06/09 00:09:46 tom Exp $
+ * $Id: dots_termcap.c,v 1.9 2014/09/25 09:00:56 tom Exp $
*
* A simple demo of the termcap interface.
*/
#define USE_TINFO
#include <test.priv.h>
+#if !defined(__MINGW32__)
+#include <sys/time.h>
+#endif
+
#if HAVE_TGETENT
#include <time.h>
if (interrupted) {
char tmp = (char) c;
- if (write(STDOUT_FILENO, &tmp, 1) == -1)
+ if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1)
rc = EOF;
} else {
rc = putc(c, stdout);
static void
my_napms(int ms)
{
-#if defined(__MINGW32__)
- Sleep(ms);
+#if defined(__MINGW32__) || !HAVE_GETTIMEOFDAY
+ Sleep((DWORD) ms);
#else
struct timeval data;
data.tv_sec = 0;