<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<HR id=stopSpelling>
From: Tony<BR>To: jay<BR><BR>
<DIV>I would have thought of CygWin as a POSIX platform that just happens to have Windows underneath. Did we go round this roundabout before?</DIV>
<DIV><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV style="WORD-WRAP: break-word"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV><BR></DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV></SPAN></DIV>
<DIV>
<BLOCKQUOTE><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>It's more complicated than that.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>It isn't just one bit.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>There's a few factors, that people care more and less about.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR> GUI library -- Win32 or X</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR> thread library -- pthreads or Win32 (or user threads) </DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR> file system path representation -- forward slashes or backward slashes<BR> This seems to be what people care most about -- to see forward slashes.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR> C compiler -- Visual C++ cl or Cygwin/GNU gcc</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR> linker -- Visual C++ link or Cygwin/GNU ld </DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR> C runtime -- msvcr*.dll or cygwin1.dll </DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR> integrated backend or not <BR> The integrated backend is way faster, but doesn't yet support 64bit LONGINT.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR> which debugger/symbol format -- gdb/stabs or windbg/VisuaStudio/CodeView/pdb</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>Many of these factors are independent of each other, but not entirely.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>Compiler/linker directly lead to which debugger you can use, since<BR> they each use different formats.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>Well, you can use either debugger, but..without symbols..at least for some modules.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>The Cygwin C runtime and Visual C++ linker disagree<BR>on the name of __ImageBase, so you can't link to the Cygwin C runtime with the<BR>Visual C++ linker. This is probably fixable at least in one combination with<BR>an alias (ability to link Cygwin C runtime with Visual C++ linker; I don't<BR>know if Cygwin/GNU ld understands aliases).</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>I have also found that Cygwin produces incorrect<BR>import .libs, perhaps their linker somehow accepts them.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> </DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Cygwin can program the Win32 GUI, but there is an issue with passing 8 byte structs by value to __stdcall functions, the function name isn't mangled correctly and linking fails.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>It is a bit of a combinatorial explosion.<BR>As the system stands, you can control each bit in the config file, and<BR>multiple combinations might work, though I don't run any combinatorial tests.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>Three combinations are "identified" (named, spoken of) and have had some development testing.<BR>NT386, NT386MINGNU (which I think should be called I386_MINGWIN), and NT386GNU (which I think should be called I386_CYGWIN).</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>Furthermore, you can imagine I386_INTERIX and I386_UWIN (I forget if that's the name).<BR>Interix and UWIN being two other very viable Posix layers on Windows.<BR>Interix has been renamed a few times. It is called "SFU" -- services for Unix, and I don't know,<BR>like SUA -- services for unix applications, and I think there's another name.<BR>It is a free download from Microsoft for x86 Windows < Vista, and is an optional component in Vista.<BR>It has its pluses and minuses..not now.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>Anyway, in conversation here, one of the main things that people DO NOT care about<BR>is which thread library is used.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>I believe it was asserted that PM3/NT386GNU did work, but that it might have used Win32 threads.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">And maybe never had any GUI?</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>I tried getting pthreads to work, but gave up debugging it.<BR>Perhaps a fresh go at debugging it would pan out..but I'm really not too interested..</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>I also have no interest in user threads. I believe they are never warranted, except<BR>on old systems that don't have kernel threads, like the hypothetical DJGPP port.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>I never brought up the issue of serial ports.<BR>I ASSUMED that almost nobody uses them, and anyone that does use them, doesn't<BR>care if they are implemented using Cygwin or Win32, as long as they work.<BR></DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">I ASSUME there is no interop issue, like getting an int fd from the serial port<BR>and passing it to select() or close, or getting a Win32 HANDLE and passing it<BR>to WaitForSingleObject, but I could be wrong here, certainly.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>I didn't look into if Cygwin is complete enough to implement them.<BR>I consider serial ports to be kind of out on the fringe..that it wouldn't be surprising if Cygwin didn't implement them..but I didn't look. Heck, I tried building minicom on some non-Linux system(s) recently and it failed miserably. I don't know if there is even much Posix portability option for serial port programming.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>Sure..I debug over a serial port, and lately have machines I can't get video<BR>out of (Itanium) or even seem to have no video hardware (Sun), so I use a serial console<BR>for initial install (recent achievement :) still haven't installed over network..), but that's still imho a big step away from writing code that uses the serial port.<BR>(And NetBSD doesn't support the local video on SGI O2, but I'm running OpenBSD there for now.)</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> </DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>Anyway, there are a few ways to look at this issue.<BR>More and less trivial.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>A trivial view is:<BR> Get the filtering to work. Build serial on all platforms but Cygwin.<BR> Or see if the Posix code will work.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> I'd be surprised if the intersection of Cygwin x Modula-3 x serial port programmers is not 0, but could be. I actually don't think anyone is using Cygwin x Modula-3.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>Another view is:<BR> Get the Win32 serial code to work on Cygwin.<BR> The code is already there, and buildable, but building in a system that also builds FilePosix.m3<BR> breaks Modula-3 rules, you end up with two implementations of the File interface.<BR> What you want, I think, is FilePosix.m3 to provide the File interface, and FileWin32.m3 to provide<BR> just its own specific FileWin32 interface.<BR> I think this is a simple transform of the code.</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>Anyway, not a big deal...my tone here...is rushed, not rude, sorry.<BR>Maybe I'll get the truncation I deserve. :)</DIV>
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR> - Jay</DIV></SPAN></BLOCKQUOTE></DIV></body>
</html>