NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: (Wine) Steam does not connect to internet (gethostbyname_r does not return ERANGE in NetBSD)



In article <DB5PR01MB18939F0F23532DE4A6AB36CBD5230%DB5PR01MB1893.eurprd01.prod.exchangelabs.com@localhost>,
Adrien Fernandes  <Adrien_Fernandes2%hotmail.com@localhost> wrote:
>> Here is the discussion on Wine bug list
>> https://bugs.winehq.org/show_bug.cgi?id=40865
>>
>> "In GNU/Linux we expect the function to return ERANGE in order to keep
>reallocating memory until the function is satisfied.
>> But in NetBSD it seems like they use a different approach of returning
>"non-zero" and setting locerr to ENOBUFS.
>> I could not find the man for this function in NetBSD. What version of
>NetBSD are you using?"
>> https://bugs.winehq.org/show_bug.cgi?id=40865#c4
>>
>> "I downloaded and installed it and gethostbyname_r is not documented
>anywhere, it is not even in header files.
>> Maybe it was introduced recently, can you open a sister bug with NetBSD
>and quote or link to this comment and comment 4
>> to check what they have to tell us about it please?
>>
>> If they just introduced the function and want it to be a drop-in
>replacement for the GNU/Linux function I guess they still have time
>> to change the function.
>>
>> I never used NetBSD so I may be very well doing something wrong too."
>> https://bugs.winehq.org/show_bug.cgi?id=40865#c6

gethostbyname_r()/gethostbyaddr_r() are not documented for a reason;
they are non-standard. There are at least 3 flavors out there last
time I checked, and portable code should not be using them. I
implemented them in NetBSD just to use them inside
getaddrinfo()/getnameinfo(). I chose not to hide them completely
and that was probably a bad decision seeing that some auto-configuration
schemes look for functions in libc and then try to use the functions
(even when they are no headers describing the functions; I'd really
like to know how do they deduce the arguments...) Why doesn't wine
use those instead (getaddrinfo()/getnameinfo())?

christos




Home | Main Index | Thread Index | Old Index