bug-gnulib
[Top][All Lists]
Advanced

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

Re: (x)gethostname


From: Simon Josefsson
Subject: Re: (x)gethostname
Date: Fri, 18 Jan 2008 12:02:38 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux)

Bruno Haible <address@hidden> 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 address@hidden@ to cover the mingw situation.

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]