summaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics/sleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/intrinsics/sleep.c')
-rw-r--r--libgfortran/intrinsics/sleep.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libgfortran/intrinsics/sleep.c b/libgfortran/intrinsics/sleep.c
index 05edc3f54b7..a9f579cb69d 100644
--- a/libgfortran/intrinsics/sleep.c
+++ b/libgfortran/intrinsics/sleep.c
@@ -39,6 +39,13 @@ Boston, MA 02110-1301, USA. */
#include <unistd.h>
#endif
+#ifdef __MINGW32__
+# include <windows.h>
+# undef sleep
+# define sleep(x) Sleep(1000*(x))
+# define HAVE_SLEEP
+#endif
+
/* SUBROUTINE SLEEP(SECONDS)
INTEGER, INTENT(IN) :: SECONDS