<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>That's also a good idea too.<BR>
<BR>
Though I think maybe safer to say:<BR>
<BR>
<*NT386:callingconvention push*><BR><*NT386:callingconvention winapi*><BR><BR>
..bunch of decls ..<BR>
<BR>
<*NT386:callingconvention pop*><BR><BR>
> way, all EXTERNALs will look the same but you won't clutter up non- <BR> > Win32 with ugly WINAPI. <BR><BR>
Tony, is /everything/ Win32 ugly? :)<BR>
<BR>
The status of SQLHWND is less clear to me now, seems I have trouble with the basic find-in-files..<BR>
Even so -- it used like once, its type is almost the same, the Windef definition is now available, the headers are almost the same. I did notice the Win32 headers actually #ifdef:<BR>
<BR>
#if defined(WIN32) || defined(OS2)<BR>typedef HWND SQLHWND;<BR>#elif defined (UNIX)<BR>typedef Widget SQLHWND;<BR>#else<BR>/* placehold for future O/S GUI window handle definition */<BR>typedef SQLPOINTER SQLHWND;<BR>#endif<BR><BR>
Might be nice to have a limited form of #if in Modula-3.<BR>
I understand -- don't want to have to parse headers over and over.<BR>
Maybe only if on TARGET and nothing else?<BR>
Slippery slope.<BR>
<BR>
So far ODBC is the main place I've seen this and I'm just about over it.<BR>
The status of OpenGL here isn't clear, seems maybe the opposite -- __stdcall on NT386, __cdecl on NT386GNU.<BR>
<BR>
- Jay<BR><BR>
<HR id=stopSpelling>
<BR>
> CC: m3devel@elegosoft.com<BR>> From: hosking@cs.purdue.edu<BR>> Subject: Re: [M3devel] <*external winapi*> silently ignored on all platforms?<BR>> Date: Mon, 11 Feb 2008 11:26:50 -0500<BR>> To: jayk123@hotmail.com<BR>> <BR>> Why not simply default EXTERNAL on Win32 to WINAPI instead? That <BR>> way, all EXTERNALs will look the same but you won't clutter up non- <BR>> Win32 with ugly WINAPI.<BR>> <BR>> On Feb 11, 2008, at 5:13 AM, Jay wrote:<BR>> <BR>> > I know this won't be popular but...<BR>> ><BR>> > over in m3-db\odbc\src, there is POSIX and WIN32, and they are <BR>> > ALMOST identical.<BR>> ><BR>> > The differences are<BR>> ><BR>> > the UNUSED type SQLHWND is ADDRESS or HWND<BR>> > This should just be removed.<BR>> ><BR>> > In Win32 all the <*external*> pragmas have WINAPI.<BR>> > In Posix, they lack it.<BR>> ><BR>> > For this and other reasons, I suggest that all CM3 frontends accept <BR>> > but silently<BR>> > ignore the Win32/x86 calling conventions in <*external*> pragmas,<BR>> > similar to what the non-x86 Windows compilers do.<BR>> ><BR>> > The other reasons would be the "FARPROC" warning that I already <BR>> > cleared up otherwise.<BR>> ><BR>> > And anything else minor that comes up.<BR>> ><BR>> > I know this won't be popular but I REALLY REALLY REALLY believe is <BR>> > the right thing.<BR>> > It is a small safe change that will allow a little more Modula-3 <BR>> > source portability.<BR>> ><BR>> > A similar suggestion would be to change the default calling <BR>> > convention in Modula-3,<BR>> > it would very possibly reduce code size, but is very very very much <BR>> > a breaking<BR>> > change so probably can never happen.<BR>> > Better probably would be to a) add a switch for this b) extend <BR>> > the .m3exports<BR>> > or whatnot files to indicate what switch was used.<BR>> ><BR>> > A "blanket pragma" might also be good, so that the various *.i3 <BR>> > files can<BR>> > say just to assume __stdcall for the rest of the file instead of <BR>> > annotating each functions.<BR>> ><BR>> > - Jay<BR>> ><BR>> ><BR>> > Need to know the score, the latest news, or you need your HotmailŪ- <BR>> > get your "fix". Check it out.<BR>> <BR><BR><br /><hr />Need to know the score, the latest news, or you need your HotmailŪ-get your "fix". <a href='http://www.msnmobilefix.com/Default.aspx' target='_new'>Check it out.</a></body>
</html>