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,4372707fb9097c3c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-07 20:54:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!freenix!enst.fr!not-for-mail From: sk Newsgroups: comp.lang.ada Subject: Re: C code Date: Fri, 07 Feb 2003 22:59:20 -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 1044680089 48501 137.194.161.2 (8 Feb 2003 04:54:49 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Sat, 8 Feb 2003 04:54:49 +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-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.10; VAE: 6.18.0.2; VDF: 6.18.0.6; host: moe.ktc.com) 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:33906 Date: 2003-02-07T22:59:20-06:00 Hi, > So all I need to do is to detect whether the library is an Ada lib or > not and if it is call Adainit upon load and adafinal upon close? I guess you could, but I wouldn't. For the DLLI interface, leave it to the called library user to know whether the library containes "adainit" and "adafinal" because it was developed in Ada with GNAT. For an Ada library (GNAT developed since other compilers probably do things differently) to be useful and transparent to C callers, then one would try to associate the "adainit" and "adafinal" to the automatic "init" and "fini" functions. These functions are called by the dynamic-loader when you do a "dlopen()" In general, I would not try to put "adainit" and "adafinal" in the dlli package, let the user worry about it. -- -- -- Merge vertically for real address -- ------------------------------------ -- s n p @ t . o -- k i e k c c m ------------------------------------