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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b28f27d5b835c2e X-Google-Attributes: gid103376,public From: Samuel Tardieu Subject: Re: Pragma Import to C "Accept" function? Date: 1997/02/12 Message-ID: #1/1 X-Deja-AN: 218266247 Sender: tardieu@esmeralda.enst.fr References: <5ds893$qgf@bs33n.staffs.ac.uk> Mail-Copies-To: sam@ada.eu.org To: cm3bcawp@bs47c.staffs.ac.uk (Al Priest) Content-Type: text/plain; charset=iso-8859-1 Organization: TELECOM Paris Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1997-02-12T00:00:00+00:00 List-Id: >>>>> "Al" == Al Priest writes: Al> I'm looking for a "nice" way to interface to the C accept Al> function. Given it's clash with the reserved word accept, is there Al> a good way to interface to the function? Currently the only way I Al> can do it is by writing a C function to interface to the accept, Al> and then interfacing to that in my Ada program. I cannot see the point here. You can perfectly interface with C functions which have the same name than an Ada keyword. You do not *have to* give the same name than the C function, just use a third parameter to the pragma Import to give the external name. In your case, what you could do is: function C_Accept () return Interfaces.C.int; pragma Import (C, C_Accept, "accept"); Hope this helps. Sam -- Samuel Tardieu -- sam@ada.eu.org