[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gethostname
From: |
Bruno Haible |
Subject: |
Re: gethostname |
Date: |
Wed, 13 Aug 2008 03:45:56 +0200 |
User-agent: |
KMail/1.5.4 |
Simon Josefsson wrote:
> I think MinGW actually does have a gethostname, but you need to
> link to -lws2_32 to see it. Yup. I actually have a local tree of
> gnulib that implements this test. Patch below, but it is ancient and
> there were likely some reason this was never installed.
There are 2 reasons for not committing it as-is:
1) The spec of gethostname() in Windows is different from the one in Unix,
see [1]. In particular, it does not set errno, and requires prior use of
WSAStartup().
2) It requires the introduction of a Makefile variable LIBGETHOSTNAME.
See also the discussion that started in [2].
Bruno
[1] http://msdn.microsoft.com/en-us/library/ms738527(VS.85).aspx
[2] http://lists.gnu.org/archive/html/bug-gnulib/2008-01/msg00199.html
- Re: gethostname, (continued)
- Re: gethostname, Bruno Haible, 2008/08/12
- Re: gethostname, Ben Pfaff, 2008/08/12
- Re: gethostname, Bruno Haible, 2008/08/13
- Re: gethostname, Simon Josefsson, 2008/08/13
- Re: gethostname, Eric Blake, 2008/08/13
- Re: gethostname, Simon Josefsson, 2008/08/12
- Re: gethostname, Sam Steingold, 2008/08/12
- Re: gethostname, Simon Josefsson, 2008/08/12
- Re: gethostname, Ben Pfaff, 2008/08/12
- Re: gethostname, Matthew Woehlke, 2008/08/12
- Re: gethostname,
Bruno Haible <=