[Gambas-devel] Gambas DNS resolution working in Windows, patch, new screenshot

Brandon Bergren bdragon at ...185...
Tue Feb 15 19:33:47 CET 2005


I got CDnsClient.c to work in Windows.

Here's a (hacky, please don't apply) patch.

Daniel: Why are you using reentrant functions inside a semaphore? Isn't it 
safe to use the non-reentrant ones there?
I can't use gethostbyname_r or gethostbyaddr_r on Cygwin. They don't exist 
and are nonportable. I didn't have any crashes with this patch, but it's a 
lazy hack.  Do you have a better idea how to handle this?

(BTW, there's a PD implementation of gethostbyname_r at
http://www.cygwin.com/ml/cygwin/2004-04/msg00532.html
)

Shouldn't we be using getaddrinfo and getnameinfo instead? Or are those 
too new to be implemented everywhere?

Sorry if these are stupid questions, I just had a crash course in libc 
resolver functions, and a lot of this is kinda new to me.

--Brandon

P.S.

Here's DnsClient Example in Windows:
http://bdragon.freeshell.org/projects/gambas/gambas_resolver.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: net_patch.diff
Type: application/octet-stream
Size: 2496 bytes
Desc: 
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20050215/6de174bf/attachment.obj>


More information about the Devel mailing list