bug-gnulib
[Top][All Lists]
Advanced

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

Re: (x)gethostname


From: Bruno Haible
Subject: Re: (x)gethostname
Date: Fri, 18 Jan 2008 12:57:08 +0100
User-agent: KMail/1.5.4

Simon,

> 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.

Actually, the replacement function is not needed. But the piece of
configure.ac from modules/gethostname is expanded into configure in all
cases. And it sets GNULIB_GETHOSTNAME=1 unconditionally.

> 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 ...

Then it needs to be (@GNULIB_GETHOSTNAME@ && address@hidden@), and
your gethostname.m4 file needs to set a HAVE_DECL_GETHOSTNAME variable.

Anyway, it needs more prerequisite work regarding the modules 'sockets',
'errno', 'strerror'.

Bruno





reply via email to

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