From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,39ade949adb6bf4 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: StdCall and pragma Import_Function Date: Sat, 20 Aug 2011 11:23:58 +0200 Organization: cbb software GmbH Message-ID: <11iimxhkp8uwk.f1fbqtfqtfdg.dlg@40tude.net> References: <332032a4-0acf-459d-a743-e90e823ca5af@glegroupsg2000goo.googlegroups.com> <118ybwhr53151$.fjqabmpo2k23$.dlg@40tude.net> <3feb634f-ca38-4f08-a6da-5299233f295e@glegroupsg2000goo.googlegroups.com> <11f8n1nxhs0hg$.16p4wm0m6u4nt.dlg@40tude.net> <1je5iuczb7anp.1vt48byg9dio7$.dlg@40tude.net> <4e4f6a7f$0$6541$9b4e6d93@newsspool4.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 7USNwsN+HLjFFtIrLSb7iQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:20694 Date: 2011-08-20T11:23:58+02:00 List-Id: On Sat, 20 Aug 2011 10:04:15 +0200, Georg Bauhaus wrote: > On 19.08.11 21:43, Dmitry A. Kazakov wrote: > it indeed uses StdCall convention. The corresponding output of dumpbin is: > >> BTW, you will have problems with making bindings to this mess portable. I >> had similar issues with poorly designed Glib. They too have the linkage >> names varying from platform to platform. I solved that by using GNU linker >> weak references and wrappers. Not nice, but they refused to fix the >> problem. > > Did you mention the text ".*Ada.*" when asking? .-> Of course not! (:-)) I just pointed out that some functions have one external name under Win32 and another under Linux. They "wisely" used #define to achieve this fantastic effect. I don't even asked them to fix the mess, only to add an alias name to either distribution. The answer was "won't do it". Having said that, I used Glib in order to do things the Ada standard library does wrong. Its directories (devices, file system) and OS calls packages are designed OS-dependent, which is unacceptable. Glib by all its drawbacks at least tries to make this right. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de