comp.lang.ada
 help / color / mirror / Atom feed
From: "Nasser Abbasi" <nma@12000.org>
Subject: Re: C2Ada port to linux updated.
Date: Mon, 13 Aug 2007 23:36:54 -0700
Date: 2007-08-13T23:36:54-07:00	[thread overview]
Message-ID: <c4cwi.45594$xx1.41716@newsfe09.phx> (raw)
In-Reply-To: 1187066466.723133.18140@z24g2000prh.googlegroups.com


"Jerry" <lanceboyle@qwest.net> wrote in message 
news:1187066466.723133.18140@z24g2000prh.googlegroups.com...
> On Aug 13, 3:14 am, Nasser Abbasi <n...@12000.org> 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 <stdbool.h> 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 <stdbool.h> 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





  reply	other threads:[~2007-08-14  6:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13 10:14 C2Ada port to linux updated Nasser Abbasi
2007-08-14  4:41 ` Jerry
2007-08-14  6:36   ` Nasser Abbasi [this message]
2007-08-14 23:47     ` Keith Thompson
2007-08-15  0:01       ` Keith Thompson
2007-08-15  2:14         ` Nasser Abbasi
2007-08-15  6:40           ` Keith Thompson
2007-08-14 21:05   ` Chip Orange
2007-08-14 23:16     ` Markus E.L. 2
2007-08-24 20:11       ` Chip Orange
2007-08-15  1:15     ` Jeffrey Creem
2007-08-15  9:44       ` Nasser Abbasi
2007-08-16  2:15         ` Jeffrey Creem
2007-08-17  2:15         ` Jeffrey Creem
2007-08-19 23:00           ` Jerry
2007-08-20 12:15             ` Jeffrey Creem
2007-08-15  6:35     ` Martin Krischik
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox