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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,8f0fbe01a5c0ce8c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!cyclone1.gnilink.net!spamkiller.gnilink.net!gnilink.net!nwrddc01.gnilink.net.POSTED!7c706d3b!not-for-mail From: David Thompson Newsgroups: comp.lang.ada Subject: Re: Interfacing with C Organization: Poor Message-ID: References: <250d9b93-13bf-4375-8b35-a1b0a7f74d99@j12g2000vbl.googlegroups.com> <6i3cwvzndx7y.1j38k2uakyqyp$.dlg@40tude.net> X-Newsreader: Forte Agent 3.3/32.846 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 01 Jun 2009 08:24:42 GMT NNTP-Posting-Host: 70.17.60.229 X-Complaints-To: abuse@verizon.net X-Trace: nwrddc01.gnilink.net 1243844682 70.17.60.229 (Mon, 01 Jun 2009 04:24:42 EDT) NNTP-Posting-Date: Mon, 01 Jun 2009 04:24:42 EDT Xref: g2news2.google.com comp.lang.ada:6157 Date: 2009-06-01T08:24:42+00:00 List-Id: On Mon, 18 May 2009 13:58:35 +0200, "Dmitry A. Kazakov" wrote: > On Mon, 18 May 2009 04:29:44 -0700 (PDT), cedric wrote: > > SPSSXD_API bool IsBackendReady(); > with Interfaces.C; use Interfaces.C; > ... > function IsBackendReady return Int; -- C does not have Boolean > pragma Import (stdcall, IsBackendReady, "IsBackendReady"); > C99 does, but that name is optional; _Bool always exists, but bool is typedef'ed to it only if you #include . This was done to preserve C90 (or earlier) code, where it is fairly common to typedef bool to an integer or or enum type for documentation, even though it doesn't change the actual semantics (and machine code). So it would be necessary to determine which (or what) this code is using. Though in practice, all integer types up to at least int/u-int are often treated the same in the calling convention, so there's a fair chance declaring it as Int=int will work even if it's really something else including _Bool.