[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCHv4] gethostname: fix build on mingw
From: |
Simon Josefsson |
Subject: |
Re: [PATCHv4] gethostname: fix build on mingw |
Date: |
Mon, 22 Mar 2010 18:39:41 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) |
Eric Blake <address@hidden> writes:
> Since commit 4e86671a, gethostname failed to compile on mingw.
> Gnulib's sys/socket.h includes winsock2.h, which then includes
> unistd.h prior to declaring gethostname. The fix is to ensure
> that our replacement unistd.h does not declare any replacements
> until we are sure that winsock2.h is completely included.
Testing the patch like this:
rm -rf m && gnulib-tool --create-testdir --dir m getsubopt gethostname && cd
m && ./configure --host=i586-mingw32msvc --build=i686-pc-linux-gnu && make check
results in:
make[3]: Entering directory `/home/jas/src/gnulib/m/gllib'
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT close-hook.o -MD
-MP -MF .deps/close-hook.Tpo -c -o close-hook.o close-hook.c
In file included from close-hook.c:24:
./unistd.h:27:6: error: token "@" is not valid in preprocessor expressions
./unistd.h:30:4: error: #error unexpected; report this to address@hidden
make[3]: *** [close-hook.o] Error 1
make[3]: Leaving directory `/home/jas/src/gnulib/m/gllib'
/Simon
- [PATCH] gethostname: fix build on mingw, Eric Blake, 2010/03/19
- Re: [PATCH] gethostname: fix build on mingw, Matthias Bolte, 2010/03/19
- Re: [PATCH] gethostname: fix build on mingw, Eric Blake, 2010/03/20
- Re: [PATCH] gethostname: fix build on mingw, Matthias Bolte, 2010/03/21
- Re: [PATCH] gethostname: fix build on mingw, Eric Blake, 2010/03/22
- [PATCHv4] gethostname: fix build on mingw, Eric Blake, 2010/03/22
- Re: [PATCHv4] gethostname: fix build on mingw,
Simon Josefsson <=
- Re: [PATCHv4] gethostname: fix build on mingw, Eric Blake, 2010/03/22
- Re: [PATCHv4] gethostname: fix build on mingw, Simon Josefsson, 2010/03/22
- Re: [PATCHv4] gethostname: fix build on mingw, Eric Blake, 2010/03/22
- Re: [PATCHv4] gethostname: fix build on mingw, Matthias Bolte, 2010/03/22
- Re: [PATCHv4] gethostname: fix build on mingw, Bruno Haible, 2010/03/22
- [PATCH] gethostname: further tweaks, Eric Blake, 2010/03/22
- Re: [PATCH] gethostname: fix build on mingw, Matthias Bolte, 2010/03/21