[m-rev.] diff: fix compiltation error with MSVC

Julien Fischer juliensf at csse.unimelb.edu.au
Sat Sep 10 03:41:03 AEST 2011


Branches: main, 11.07

Fix a bug in one of my recent changes for MSVC.

library/io.m:
 	#include windows.h before attempting to use things
 	defined in it.

Julien.

Index: library/io.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.465
diff -u -r1.465 io.m
--- library/io.m	4 Sep 2011 15:39:15 -0000	1.465
+++ library/io.m	9 Sep 2011 17:35:56 -0000
@@ -5674,6 +5674,10 @@
    #include <sys/wait.h>     /* for WIFEXITED, WEXITSTATUS, etc. */
  #endif

+#ifdef MR_WIN32
+  #include <windows.h>
+#endif
+
  #if defined(MR_MSVC)
      typedef SSIZE_T ML_ssize_t;
  #else
@@ -10498,8 +10502,6 @@
  */
  #ifdef MR_WIN32

-#include <windows.h>
-
  #define ML_maybe_make_win32_err_msg(was_error, error, msg, alloc_id,        \\
          error_msg)                                                          \\
      do {                                                                    \\

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list