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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7972cb596f5c5a22 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 31 Oct 2006 21:28:39 -0600 From: "Steve" Newsgroups: comp.lang.ada References: <1162304266.131951.152900@e64g2000cwd.googlegroups.com> <1162316294.922457.113520@h48g2000cwc.googlegroups.com> Subject: Re: Porting Ada code to Linux Date: Tue, 31 Oct 2006 19:28:41 -0800 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-RFC2646: Format=Flowed; Original Message-ID: NNTP-Posting-Host: 24.20.111.245 X-Trace: sv3-TFau8sG4Z144qb5WEbnabFoEfPA/jSaiWT06NypChiAWF904xXxtEVsMcGUgxOjrikJ+lfPBvoVzCAU!V8oxVt8sZ4/fyvM0oCMccf2CwNsoNr8wu50CPp/GWVSsIf8/s9FUgga7YFVlJipM2rMxueKBDvDX!SwpaVaqyivELVw== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:7314 Date: 2006-10-31T19:28:41-08:00 List-Id: "Howard" wrote in message news:1162316294.922457.113520@h48g2000cwc.googlegroups.com... [snip] > We need to port this Ada code over, also. We have decided, given that > there is between 45 and 55 thousand lines of Ada code, with its > attendant complexity, to simply use the Ada code as is without > re-writing it into C++. This Ada code depends on some files, also > written in Ada, that then have some pragmas to a Visual C++ library, > "winbase.h"... > > The Ada libs are; > > Win32 > Win32-Utils > Win32-Winbase (pragmas to VCPP winbase.h lib) > Win32-Windef > Win32-Winnt > > Stdarg > Stdarg-Impl > Stdarg-Inst > Stdarg-Machine > My first response is: it is unfortunate that the Ada code was programmed with direct dependencies to these interface modules (apparently) scattered about the system. A better approach is to create a more generic binding to the system dependent interfaces to ease porting. Given that you are talking about tens of thousands of lines of code, I would suggest attempting to create such an interface module with the existing code. Remove all references to the existing Win32 and Stdarg stuff. The compiler will help by telling you where things need to be "fixed up". While this may sound like a daunting approach, in my experience this approach is not as bad as it sounds. It's a bit tedious, but really doesn't take that long. For example eliminating the "With" statements will immediatly identify things that need to be re-defined in an OS independent manner. The first compile may give you a LOT of errors, but often fixing one error fixes many. When a problem is identified, similar problems may often be corrected with a search and replace in an editor. Steve (The Duck) > These are all Ada packages, and these name represent specs, and bodies, > so named. > > So, we are going to have to compile the Ada code, then link it with the > new C++ code. We are using the Gnu-G++ compiler linker, and we will > need to be able to link in the Ada object files with our C++ files. We > have to find a way to replace, or port, the mentioned Ada libs. > > The "Winbase" dependancy on the Visual C++ files is problematic, at > best... > > So, again, any insight that can be provided would be greatly > appreciated. You can write me directly at > > Howard.Parrish@cisf.af.mil >