summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-24 08:55:37 +0000
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-24 08:55:37 +0000
commit8420f71f8ac1382f9da0766fc7b337734764f164 (patch)
treed934bead1e7178d9c72d114717c4697185a8b590 /libgfortran
parent17f41f1a85a2efa6cd89a601ca5f014e20840f74 (diff)
downloadgcc-8420f71f8ac1382f9da0766fc7b337734764f164.tar.gz
PR libfortran/23802
* intrinsics/sleep.c: Add correct sleep macro for MinGW. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104599 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog5
-rw-r--r--libgfortran/intrinsics/sleep.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 760d40b84f4..9dd5da2156b 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,5 +1,10 @@
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
* intrinsics/cpu_time.c (__cpu_time_1): Provide a MS Windows
version.
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