Re: PATCH: dlls/winsock/socket.h portability fix

2005-11-21 Thread Alexandre Julliard
Gerald Pfeifer [EMAIL PROTECTED] writes:

 ChangeLog:
 On some systems like FreeBSD, EAI_NODATA is defined in lwres/netdb.h,
 so include this if present.

Why isn't it in netdb.h?  And if we get it from lwres shouldn't we
then link to liblwres?

-- 
Alexandre Julliard
[EMAIL PROTECTED]




Re: PATCH: dlls/winsock/socket.h portability fix

2005-11-21 Thread Alexandre Julliard
Gerald Pfeifer [EMAIL PROTECTED] writes:

   #if 0
   /* obsoleted */
   #define EAI_NODATA   7  /* no address associated with hostname */
   #endif

 I did some archeology, and for earlier versions of FreeBSD the definition 
 in netdb.h indeed was used, and in fact the reference to EAI_NODATA under
 /usr/include.

If it's being obsoleted then we should probably just #ifdef it out.

-- 
Alexandre Julliard
[EMAIL PROTECTED]




Re: PATCH: dlls/winsock/socket.h portability fix

2005-11-21 Thread Gerald Pfeifer
On Mon, 21 Nov 2005, Alexandre Julliard wrote:
 ChangeLog:
 On some systems like FreeBSD, EAI_NODATA is defined in lwres/netdb.h,
 so include this if present.
 Why isn't it in netdb.h?

On recent version of FreeBSD (5.3 and later, which are required to run 
Wine), /usr/include/netdb.h has the following snippet:

  #if 0
  /* obsoleted */
  #define EAI_NODATA   7  /* no address associated with hostname */
  #endif

I did some archeology, and for earlier versions of FreeBSD the definition 
in netdb.h indeed was used, and in fact the reference to EAI_NODATA under
/usr/include.

 And if we get it from lwres shouldn't we then link to liblwres?

One would indeed expect that, but according to my tests it's not needed.

Gerald




Re: PATCH: dlls/winsock/socket.h portability fix

2005-11-21 Thread Alexandre Julliard
Gerald Pfeifer [EMAIL PROTECTED] writes:

 On recent GNU/Linux systems like SUSE Linux 10.0 we still have it,
 so I didn't want to change the behavior there:

   % grep EAI_NODATA -r /usr/include/
   /usr/include/netdb.h:# define EAI_NODATA  -5/* No address 
 associated with NAME.  */

 I don't feel strongly either way, if you prefer yanking EAI_NODATA
 from Wine, I won't mind, but it seems to be still used there, so the 
 conservative change I proposed to unbreak FreeBSD may be preferrable.

I didn't mean remove it, just add a #ifdef EAI_NODATA so that we can
cope with both cases.

-- 
Alexandre Julliard
[EMAIL PROTECTED]




Re: PATCH: dlls/winsock/socket.h portability fix

2005-11-21 Thread Gerald Pfeifer
On Mon, 21 Nov 2005, Alexandre Julliard wrote:
 I did some archeology, and for earlier versions of FreeBSD the definition 
 in netdb.h indeed was used, and in fact the reference to EAI_NODATA under
 /usr/include.
 If it's being obsoleted then we should probably just #ifdef it out.

On recent GNU/Linux systems like SUSE Linux 10.0 we still have it,
so I didn't want to change the behavior there:

  % grep EAI_NODATA -r /usr/include/
  /usr/include/netdb.h:# define EAI_NODATA  -5/* No address 
associated with NAME.  */

I don't feel strongly either way, if you prefer yanking EAI_NODATA
from Wine, I won't mind, but it seems to be still used there, so the 
conservative change I proposed to unbreak FreeBSD may be preferrable.

Marcus, what's your opinion as the original author of the code in 
question?

Gerald