[MLton-commit] r7186

Matthew Fluet fluet at mlton.org
Sat Jun 20 12:36:19 PDT 2009


Handle changes in Cygwin API in Cygwin 1.7(beta).
----------------------------------------------------------------------

U   mlton/trunk/runtime/platform/cygwin.c
U   mlton/trunk/runtime/platform/cygwin.h

----------------------------------------------------------------------

Modified: mlton/trunk/runtime/platform/cygwin.c
===================================================================
--- mlton/trunk/runtime/platform/cygwin.c	2009-06-20 19:28:28 UTC (rev 7185)
+++ mlton/trunk/runtime/platform/cygwin.c	2009-06-20 19:36:19 UTC (rev 7186)
@@ -112,7 +112,12 @@
 C_String_t Cygwin_toFullWindowsPath (NullString8_t path) {
         static char res[MAX_PATH];
 
+#if ((CYGWIN_VERSION_API_MAJOR > 0) || (CYGWIN_VERSION_API_MINOR > 181))
+        cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, 
+                          (char*)path, &res[0], MAX_PATH);
+#else
         cygwin_conv_to_full_win32_path ((char*)path, &res[0]);
+#endif
         return (C_String_t)&res[0];
 }
 

Modified: mlton/trunk/runtime/platform/cygwin.h
===================================================================
--- mlton/trunk/runtime/platform/cygwin.h	2009-06-20 19:28:28 UTC (rev 7185)
+++ mlton/trunk/runtime/platform/cygwin.h	2009-06-20 19:36:19 UTC (rev 7186)
@@ -29,6 +29,8 @@
 #include <utime.h>
 #include <windows.h>
 
+#include <cygwin/version.h>
+
 #define MLton_Platform_OS_host "cygwin"
 
 #define HAS_FEROUND FALSE
@@ -40,8 +42,10 @@
 #define HAS_SPAWN TRUE
 #define HAS_TIME_PROFILING FALSE
 
+#ifndef MSG_DONTWAIT
 /* This should not conflict with existing flags. */
 #define MSG_DONTWAIT 0x1000000
+#endif
 
 /* Cygwin does not handle IPv6. */
 #ifndef AF_INET6
@@ -60,6 +64,11 @@
 typedef unsigned int nfds_t;
 typedef long suseconds_t; // type of timeval.tv_usec in sys/time.h
 
+#ifndef MSG_WAITALL
 // Unimplemented on Cygwin
 #define MSG_WAITALL 0
+#endif
+#ifndef MSG_EOR
+// Unimplemented on Cygwin
 #define MSG_EOR 0
+#endif




More information about the MLton-commit mailing list