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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.unit0.net!cyclone02.ams2.highwinds-media.com!voer-me.highwinds-media.com!peer02.am1!peering.am1!peer02.fr7!news.highwinds-media.com!post02.fr7!fx26.fr7.POSTED!not-for-mail From: Brian Drummond Subject: Re: Interface with C codes Newsgroups: comp.lang.ada References: <7dec5a01-4376-4f86-b4f3-b28948474828@googlegroups.com> <58556409-4da1-41a2-944b-4cf7aaaf0504@googlegroups.com> <85iojhdy87.fsf@stephe-leake.org> User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: NNTP-Posting-Host: 62.49.20.82 X-Complaints-To: abuse@demon.net X-Trace: 1413719186 62.49.20.82 (Sun, 19 Oct 2014 11:46:26 UTC) NNTP-Posting-Date: Sun, 19 Oct 2014 11:46:26 UTC Date: Sun, 19 Oct 2014 11:46:26 GMT X-Received-Body-CRC: 3978637231 X-Received-Bytes: 1827 Xref: news.eternal-september.org comp.lang.ada:22584 Date: 2014-10-19T11:46:26+00:00 List-Id: On Sat, 18 Oct 2014 21:33:03 -0700, Anh Vo wrote: > On Saturday, October 18, 2014 11:33:32 AM UTC-7, Stephen Leake wrote: >> Anh Vo writes: >> > On Friday, October 17, 2014 4:22:15 PM UTC-7, Anh Vo wrote: >> >> >> >> char * bootStringToStruct (char * bootString, BOOT_PARAMS * >> >> pBootParams); >> > >> > Should this one work? >> > >> > function Boot_String_To_Type ( >> > Boot_String : Interfaces.C.Strings.chars_ptr; >> > Boot_Params : Boot_Parameter_Type_Access) >> > return Interfaces.C.Strings.chars_ptr; >> > pragma Import (C, Boot_String_To_Type, "bootStringToStruct"); >> >> Looks good. but give -fdump-ada-spec a try. > > Yes, I tried and the result is below. (C++ snipped) Use gcc -fdump-ada-spec instead of g++ -fdump-ada-spec - Brian