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 21:34:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!enst.fr!not-for-mail From: sk Newsgroups: comp.lang.ada Subject: Re: C code to Ada Date: Sat, 25 Jan 2003 23:37:03 -0600 Organization: ENST, France Message-ID: References: <3E33502D.7030503@noname.com> 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 1043559251 33309 137.194.161.2 (26 Jan 2003 05:34:11 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Sun, 26 Jan 2003 05:34:11 +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:33433 Date: 2003-01-25T23:37:03-06:00 I didn't explain very well and rereading leaves me confused so, AM := Ada main CM := "C" main ADL := Ada Dynamic Library CDL := C Dynamic Library GCC := gcc DLLI := Dynamic Linking Loading Interface AM -- part of the gnatmake creates adainit, adafinal if it wants to dynamically load, it "with Dynamic_Linking_Loading_Interface" and uses its functionality. CM -- needs to call adainit and adafinal if it calls an ADL, but not a CDL. ADL -- part of the gnatmake creates an externally callable adainit, adafinal for the *library* (gnatbind -n) CDL -- no intrinsic adainit adafinal GCC -- when building dynamic libraries recognizes or provides "init" and "fini" (cannot remember which). DLLI -- when loading an ADL, needs to consider the adainit,adafinal for the library. when loading a CDL, adainit and adafinal are not necessarily present. The Ada DLLI has its own adainit and adafinal which are incorporated into the Ada mains adainit and adafinal. These adainit and adafinal routines should not be wrapped and made available to the calling routines, gnatmake does this and they become part of the Ada main adainti and adafinal. Overall, wrapping "adainit" and "adafinal" is not part of the DLLI. Whether the functions need wrapping is entirely dependent upon the library being loaded, not the DLLI. Also, for DLLI, the "init" and "fini" are red-herrings (not deliberate) these are only issues for building a dynamic-library, not the loading of them thru DLLI. Hopefully this is better -- -- -- Merge vertically for real address -- ------------------------------------ -- s n p @ t . o -- k i e k c c m ------------------------------------