Bruno Haible <[EMAIL PROTECTED]> writes:

> Simon Josefsson wrote:
>> For mingw, @GNULIB_GETHOSTNAME@ will be 0 since it has a gethostname (if
>> sys/socket.h is pulled in).
>
> Huh? GNULIB_GETHOSTNAME is set to 1 by the gl_MODULE_INDICATOR([gethostname])
> line, independently of platforms. It is 0 if the gethostname module is not
> used.

If we modify gethostname.m4 as I suggested, it will detect that mingw do
have a gethostname function, and consequently, the gethostname module is
not be needed.  In that case, though, unistd.h needs to declare the
function, since MinGW's unistd.h doesn't.  So the test in unistd.h needs
to be [EMAIL PROTECTED]@ to cover the mingw situation.

/Simon


Reply via email to