just a suggestion, to make things more readable
- always use (in DLLs like winsock) the reentrant functions 
(get???by???_r)
- implement those in misc/port.c when not provided by C lib (this can be
 done using get???by??? and a crit sect around)

that would make the whole winsock more readable IMO

A+

>Hi,
>
>Here some crashes in Eudora and possibly Agent are caused by
>multi-threaded calls to gethostbyname(). This function (and some other
>socket calls) use static data to return their values which leads to
>the disaster.
>
>Other non-reentrant functions that return a pointer to static data
>gethostbyaddr, getproto* en getserv*.
>
>I solve this by critical sections around the calls and the use of the
>return data. In case of the gethost* calls I use in case of __linux__
>the non-portable functions gethostbyname_r and gethostbyaddr_r.

---------------     
Eric Pouech 
(http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", 
Vice President Dan Quayle

Reply via email to