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,bf856aff026ed05 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!out01b.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!in03.usenetserver.com!news.usenetserver.com!hwmnpeer01.phx!news.highwinds-media.com!hw-filter.phx!newsfe09.phx.POSTED!53ab2750!not-for-mail Reply-To: "Nasser Abbasi" From: "Nasser Abbasi" Newsgroups: comp.lang.ada References: <1187000082.276474.188160@g12g2000prg.googlegroups.com> <1187066466.723133.18140@z24g2000prh.googlegroups.com> Subject: Re: C2Ada port to linux updated. Organization: home X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Message-ID: Date: Mon, 13 Aug 2007 23:36:54 -0700 NNTP-Posting-Host: 68.5.76.154 X-Complaints-To: admin@cox.net X-Trace: newsfe09.phx 1187073416 68.5.76.154 (Mon, 13 Aug 2007 23:36:56 MST) NNTP-Posting-Date: Mon, 13 Aug 2007 23:36:56 MST Xref: g2news2.google.com comp.lang.ada:1436 Date: 2007-08-13T23:36:54-07:00 List-Id: "Jerry" wrote in message news:1187066466.723133.18140@z24g2000prh.googlegroups.com... > On Aug 13, 3:14 am, Nasser Abbasi wrote: >> -- I've send this few hrs ago but it does not seem to have went >> through, trying again. Sorry if this post shows twice. >> >> I've just updated c2ada so that it now builds now on linux 2.6.20. The >> updated source code and instructions how to build are here >> >> http://12000.org/my_notes/ada/c2ada_port/index.htm >> >> There is example of how to run it and the ada files generated. >> >> This tool seems useful in translating C header files. >> >> Nasser > > Awsome, Nasser! > > About a year ago I looked into this but it was "beyond my skill set" > to repair. (Love that phrase.) What I do remember is that there were > multiple versions (all non-working) and that many of the web links to > it had gone stale. Is it possible to make this available on some well- > known Ada site, or at least the above link? > > Jerry > hi Jerry; It took me a day to make it compile/run on Linux. The main problem was with using _Bool. They added _Bool data type in C99, for some reason ( I am no gcc expert), the current gcc 4.1 compiler does not have and it does not know about _Bool, and _Bool is used in many places in the code. I know I compiled this code ok many years ago, I guess old gcc knew about this or something like this. Now there seem to be few C standards and variations, it is confusing. The new gcc does not have and it does not know about _Bool. So my only choice, and out of desperation, was to change everything from _Bool to bool, and with few other tweaks, it now compiles and runs. If it compiles and runs, then I assumed these changes did not hurt the code too much :) The code needs more support and maintainance than I can afford now. I had a short break between my school courses so I decided to do this now. Any one is welcome to take the code and make it better. It is free source code. I have no idea how good one would consider the quality of the Ada code this tool generates, from adahome http://www.adahome.com/Resources/Tools/Non-Commercial.html it says: "This tool, released by Intermetrics, is based on cbind (Ada-to-C binding generator), a tool previously made public by Rational Software Corporation. C2ada is capable of generating thin Ada bindings, by translating C header files into Ada package specifications, and in addition is capable of translating C functions and statements into Ada package bodies. C2ada will do about 80% to 90% of the work of producing a thin binding or a translation, but the last 10% to 20% of the work must still be done manually. The program is free, includes source code, has no warranty, and is released to the Ada community in the hope that it will be useful. Intermetrics has used C2ada to produce Microsoft Windows, X Windows, and GCCS bindings" I'll try to send email for some known ada sites if they want to add a link to this linux port. Nasser