[Lazarus] gethostbyname() on linux systems.

Brad Campbell brad at wasp.net.au
Tue Oct 20 03:06:56 CEST 2009


ik wrote:
> Please take a look at: ./fpc/packages/fcl-net/src/cnetdb.pp it's there :)
> 
> Ido
> http://ik.homelinux.org/
> 
> 
> On Mon, Oct 19, 2009 at 7:51 PM, David Touzeau <david at touzeau.eu> wrote:
> 
>     Dear coders
> 
>     i have googleized but nothing.
> 
>     i try to find examples or any information in order to get the same
>     gethostbyname() function on FPC compiled on Linux systems.
> 
>     Best regards

Not teaching you how to suck eggs, but I run up against this issue of finding fpc examples quite 
often. The best solution I have found is to keep a copy of the fpc source tree on my hard disk and 
grep for the function I want to use. More often than not someone has already used it somewhere in 
that pile of code.

brad at bklaptop2:/tracks/devel/fpc/fpc-src$ grep -ir gethostbyname *

<snip lots of output>

packages/libndsfpc/examples/dswifi/main9.pp:  // Find the IP address of the server, with gethostbyname
packages/libndsfpc/examples/dswifi/main9.pp:  myhost := gethostbyname('www.akkit.org');

Brad
-- 
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.




More information about the Lazarus mailing list