comp.lang.ada
 help / color / mirror / Atom feed
From: "chris.danx" <spamoff.danx@ntlworld.com>
Subject: C code to Ada
Date: Mon, 20 Jan 2003 18:44:23 +0000
Date: 2003-01-20T18:44:23+00:00	[thread overview]
Message-ID: <GqXW9.4012$7Z3.107109@newsfep1-gui.server.ntli.net> (raw)

Hi,

How do you map something like this to Ada (for a binding)?  It's 
probable that I'll only be working with GNAT on the Linux front (it's 
all there is), so a GNAT specific option although not ideal, is acceptable.


/* Open the shared object FILE and map it in; return a handle that can 
be passed to `dlsym' to get symbol values from it.  */

extern void *dlopen (__const char *__file, int __mode) __THROW;

I know rougly how to map the __file, and __mode params but am not sure 
how to deal with the void * or in this case the throw.  This is taken 
from dlfcn.h which is the header for dynamic library support in Linux. 
If anyone already has a (GMGPL) binding to this library and they'd like 
to share, please let me know, it'll save me making one.  In any event 
how do you translate this C code so it can be called from Ada?

After I get a wee thin binding working, I'm going to make it a little 
thicker and toss it into the open.


Cheers,
Chris
-- 
for personal replies change spamoff to chris




             reply	other threads:[~2003-01-20 18:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-20 18:44 chris.danx [this message]
2003-01-20 21:33 ` C code to Ada sk
2003-01-20 21:43   ` chris.danx
2003-01-20 22:56     ` James S. Rogers
2003-01-20 23:05       ` chris.danx
2003-01-21  2:17       ` Jeffrey Carter
2003-01-20 23:32     ` sk
2003-01-21  0:56       ` chris.danx
2003-01-21  1:26         ` sk
2003-01-21 15:49           ` Frank J. Lhota
2003-01-22  1:05           ` chris.danx
2003-01-21  2:27   ` Jeffrey Carter
2003-01-21  2:55     ` sk
2003-01-21 19:33       ` Jeffrey Carter
2003-01-21  6:18     ` Simon Wright
     [not found] ` <3E2C6B2B.5090600@noname.com>
2003-01-20 21:39   ` sk
2003-01-21  1:23 ` sk
2003-01-25 21:28   ` chris.danx
2003-01-26  2:16     ` sk
2003-01-26  3:04     ` sk
     [not found]     ` <3E33502D.7030503@noname.com>
2003-01-26  5:37       ` sk
2003-01-23  8:00 ` sk
2003-01-24 18:03   ` chris.danx
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox