<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Posix defines a C source interface, not an ABI.<BR>The standard does not say enough to write portable .i3 files.<BR>Seriously.<BR>Look at the mess that was m3-libs/m3core/unix and compare it to today.<BR>Function names at the ABI level sometimes didn't match the source name.<BR>Structs had to be defined precisely.<BR>It was tedious, error-prone, not statically checked, and "very" unsafe.<BR>So many times I ported to a new system, only to find struct stat was wrong and my stack was getting corrupted. That problem is gone.<BR> <BR> <BR>We probably now transparently adapt to 64bit time_t. I'd have to check.<BR> <BR> <BR>Or the stuff we had for signal handling. Another mess. All clean and portable today. Tony fixed some of that, for the same reasons.<BR> <BR>When we get cooperative suspend, the portability will increase much further.<BR>And the setjmp buffer size thing. I should get to that soonish.<BR> <BR> <BR>Things are much better for 64bit systems now, as they have been widely ported to and are in widespread use.<BR> <BR> <BR> - Jay <BR><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Subject: Re: [M3devel] thread local storage, but in C pieces of runtime... (jay, tony?)<br>From: dragisha@m3w.org<br>Date: Fri, 10 May 2013 19:04:12 +0200<br>CC: mika@async.caltech.edu; m3devel@elegosoft.com<br>To: jay.krell@cornell.edu<br><br>We are talking POSIX here. There are same chances for #define to change behavior of your C as are to change binding through EXTERNAL.<div><br></div><div>In 90s, when I did port of pm3 to LINUX_ALPHA, most problems I met were in C code, due to it's non-portability to RISC, 64bit, big-endian machine.</div><div><br><div>
<span class="ecxApple-style-span" style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2;"><span class="ecxApple-style-span" style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2;"><div style="-ms-word-wrap: break-word;"><span class="ecxApple-style-span" style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2;"><div style="-ms-word-wrap: break-word;"><div>--</div></div></span></div></span><span class="ecxApple-style-span" style="font-family: Helvetica;">Dragiša Durić</span><span class="ecxApple-style-span" style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2;"><div style="-ms-word-wrap: break-word;"><span class="ecxApple-style-span" style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2;"><div style="-ms-word-wrap: break-word;"><div><a href="mailto:dragisha@m3w.org">dragisha@m3w.org</a></div><div><br></div></div></span></div></span></span><br class="ecxApple-interchange-newline">
</div>
<br><div><div>On May 10, 2013, at 6:56 PM, Jay K wrote:</div><br class="ecxApple-interchange-newline"><blockquote><span class="ecxApple-style-span" style="text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2;"><span class="ecxApple-style-span" style="font-family: Calibri; font-size: 16px;">It is in C for portability. Like everything else.<br> <br> <br>Otherwise you have to duplicate the C headers in Modula-3, and they end up being system specific because there are too many ways to turn the portable C source interface into non-portable ABI -- #defines, #pragmas, etc.</span></span></blockquote></div><br></div></div> </div></body>
</html>