[SDL] New MinGW32 makefile

Ben Allfree benles at locl.net
Sat Apr 29 14:56:38 PDT 2000


Quoting Mattias Engdegård <f91-men at nada.kth.se>:

For the thread safe, we could use a Mutex, isn' it?

About the error case, I prefer it to return me a string 
with the name of the host that it hasn't resolved.

> >/* Resolve an ip address to a host name in canonical form.
> >   If the ip couldn't be resolved, this function returns NULL,
> >   otherwise a pointer to a static buffer containing the hostname
> >   is returned.  Note that this function is not thread-safe.
>
> No, you return a malloc (leaking memory) if the reverse lookup fail.
> Better return a pointer to static storage.
>
> It would be handy to have a thread-safe or (better) asynch version
> of this call, since that is tricky to do portably. If the platform
> supports getXbyY_r(), you can have it thread safe and run the lookup
> in a thread; otherwise, the usual procedure is to fork and pass the
> result in a pipe.
>
> (Why doesn't POSIX have an asynch DNS lookups? Even Windows and 
MacOS can
> do that!)
>
> 



More information about the SDL mailing list