re PR libfortran/23802 ([mingw32] sleep malfunction)
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>
Sat, 24 Sep 2005 08:55:37 +0000 (10:55 +0200)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sat, 24 Sep 2005 08:55:37 +0000 (08:55 +0000)
PR libfortran/23802
* intrinsics/sleep.c: Add correct sleep macro for MinGW.

From-SVN: r104599

libgfortran/ChangeLog
libgfortran/intrinsics/sleep.c

index 760d40b84f4d941f8b46c50a365f77bca517e896..9dd5da2156b02cf289232db37209b2d1549c5d17 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-24  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+
+       PR libfortran/23802
+       * intrinsics/sleep.c: Add correct sleep macro for MinGW.
+
 2005-09-24  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
        PR libfortran/23380
index 05edc3f54b76f82179becefb8eddb72e8ce9b236..a9f579cb69de35b28270afb02be3fe88c182b747 100644 (file)
@@ -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