comp.lang.ada
 help / color / mirror / Atom feed
* C code to Ada
@ 2003-01-20 18:44 chris.danx
  2003-01-20 21:33 ` sk
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: chris.danx @ 2003-01-20 18:44 UTC (permalink / 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




^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2003-01-26  5:37 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-20 18:44 C code to Ada chris.danx
2003-01-20 21:33 ` 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

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