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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,32d4b7099c3e0137 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-25 19:46:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!freenix!enst.fr!not-for-mail From: sk Newsgroups: comp.lang.ada Subject: Re: C code to Ada Date: Sat, 25 Jan 2003 20:16:28 -0600 Organization: ENST, France Message-ID: References: Reply-To: "comp.lang.ada mail to news gateway" NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1043552798 32826 137.194.161.2 (26 Jan 2003 03:46:38 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Sun, 26 Jan 2003 03:46:38 +0000 (UTC) To: "comp.lang.ada mail to news gateway" Return-Path: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020828 X-Accept-Language: en-us, en X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1 Precedence: list List-Id: comp.lang.ada mail to news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:33430 Date: 2003-01-25T20:16:28-06:00 > I am waiting to finish the adainit & adafinal calls and > write an example before I email you sk). Now I'm in the > process of writing nice tidy calls to adainit & adafinal adainit and final are part of the Gnat building process and are automatically bound and linked by gnatmake (or gcc -> gnatbind -> gnatlink). The "-n" option tells the gnat binder to make them available to the "outside" world. They are still only accessible as "system addresses" from the "dlsym" call (I suppose you could wrap that but I am not sure of the necessity). The thing that you need to look at for adainit and adafinal is closely associating them with the "init" and "fini" functions which the dynamic/linker/loader automatically calls upon the loading and unloading of a dynamic library. See the library howto. I have not gone this far, but I was planning to explore the possibilities > system.address_to_access_conversion? Looks like a good idea but I haven't explored it. The name itself suggests that it is ideal. > Unchecked_Conversion, which works *here* even > if it's a bit risky. There are times when the use of Unchecked_Conversion is dubious, there are times when it isn't. Others will probably tell you differently, but if the "dlsym" returns system.addresses (or void *) to everything that is available (variables, functions or procedures), then Unchecked_Conversion is probably one of the best solutions. If you look at a "Simon Wright" post in this thread, you will see that the permutations of trying to provide a binding for every possiblity is unmanageable. -- -- -- Merge vertically for real address -- ------------------------------------ -- s n p @ t . o -- k i e k c c m ------------------------------------