Eric Blake <ebl...@redhat.com> writes:

> On 03/22/2010 11:39 AM, Simon Josefsson wrote:
>> Eric Blake <ebl...@redhat.com> 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
>
> Typo on line 26.

Thanks, now it works.  Any reason not to push this?

/Simon


Reply via email to