[m-rev.] diff: avoid using __CYGWIN__ directly in stdlib
Julien Fischer
juliensf at csse.unimelb.edu.au
Tue Jan 4 16:58:10 AEDT 2011
Branches: main, 11.01
runtime/mercury_conf_param.h:
Define MR_CYGWIN if we using Cygwin.
library/io.m:
Avoid using the macro __CYGWIN__ directly and use
MR_CYGWIN instead.
Julien.
Index: library/io.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.451
diff -u -r1.451 io.m
--- library/io.m 3 Jan 2011 13:52:51 -0000 1.451
+++ library/io.m 4 Jan 2011 05:53:05 -0000
@@ -2681,7 +2681,7 @@
[will_not_call_mercury, promise_pure, thread_safe,
does_not_affect_liveness, no_sharing],
"
-#ifdef MR_WIN32
+#if defined(MR_WIN32)
SUCCESS_INDICATOR = MR_TRUE;
#else
SUCCESS_INDICATOR = MR_FALSE;
@@ -2695,7 +2695,7 @@
[will_not_call_mercury, promise_pure, thread_safe,
does_not_affect_liveness, no_sharing],
"
-#ifdef __CYGWIN__
+#if defined(MR_CYGWIN)
SUCCESS_INDICATOR = MR_TRUE;
#else
SUCCESS_INDICATOR = MR_FALSE;
@@ -3358,7 +3358,7 @@
#endif
int access_result;
- #if !defined(MR_WIN32) || defined(__CYGWIN__)
+ #if !defined(MR_WIN32) || defined(MR_CYGWIN)
/*
** Earlier versions of MSVCRT ignored flags it doesn't support,
** later versions return an error (e.g. on Vista).
Index: runtime/mercury_conf_param.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_conf_param.h,v
retrieving revision 1.116
diff -u -r1.116 mercury_conf_param.h
--- runtime/mercury_conf_param.h 13 Dec 2010 15:38:43 -0000 1.116
+++ runtime/mercury_conf_param.h 4 Jan 2011 05:53:06 -0000
@@ -1032,4 +1032,14 @@
/*---------------------------------------------------------------------------*/
+/*
+** Cygwin specific.
+*/
+
+#if defined(__CYGWIN__)
+ #define MR_CYGWIN
+#endif
+
+/*---------------------------------------------------------------------------*/
+
#endif /* MERCURY_CONF_PARAM_H */
--------------------------------------------------------------------------
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