comp.lang.ada
 help / color / mirror / Atom feed
From: "Gisle Sælensminde" <gisle@apal.ii.uib.no>
Subject: Re: List of C function usable in Ada
Date: 17 Oct 2002 05:45:34 GMT
Date: 2002-10-17T05:45:34+00:00	[thread overview]
Message-ID: <slrnaqsjju.k3u.gisle@apal.ii.uib.no> (raw)
In-Reply-To: f2908eae4d963f96dd3839afeed468b0.110780@mygate.mailgate.org

Sim Con wrote:
>> Nowhere, I presume - or do you think each and every C program that has been 
>> written in this world exports its functions to a central documentation place.
>> 
>> Seriously, which C functions do you mean?
> 
> Well, i study pragma import just today ;P and i don't understand well
> how and where my compiler (adagide and gnat) takes the C function that i
> use (for example strlen, rename etc.).
> Can you explain me how can i insert other c functions and where the
> compiler has the standard one? Thanx again, sorry for my strange
> questions ;P

I think strlen and rename are part of libc, the standard C library.
On unix and unix-like systems the libc is usually linked to every
executable. GCC (which GNAT is based) was originally implemented 
for unix-like systems, and the ports to non-unix systems contains a
compatibility layer, since the gcc runtime need it. For GNAT
on Windows the mingw library are used. There is also cygwin, that 
unlike mingw tries to be a complete compatibility layer, and not just
the minimum needed to support gnu tools.                        
                                                         
For this reason, strlen etc will always be there. For more interesting
C functions, you must link with the library where they are located when   
building the Ada executable.

--
Gisle S�lensminde ( gisle@ii.uib.no )   

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going
to land, and it could be dangerous sitting under them as they fly
overhead. (from RFC 1925)



  parent reply	other threads:[~2002-10-17  5:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-15  9:47 List of C function usable in Ada Grein, Christoph
2002-10-15 10:29 ` Sim Con
2002-10-15 10:34   ` Preben Randhol
2002-10-15 12:20     ` Sim Con
2002-10-15 13:09       ` Preben Randhol
2002-10-17  5:45   ` Gisle Sælensminde [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-10-15 12:53 Grein, Christoph
2002-10-15 11:03 Grein, Christoph
2002-10-15  9:43 Sim Con
2002-10-15 10:58 ` Dale Stanbrough
2002-10-15 17:20 ` Mark Johnson
replies disabled

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