Re: [PATCH] gethostname: fix build on mingw

2010-03-22 Thread Eric Blake
On 03/21/2010 01:45 PM, Matthias Bolte wrote: > 2010/3/20 Eric Blake : >> 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. Therefore, unistd.h >> cannot replace gethostname u

Re: [PATCH] gethostname: fix build on mingw

2010-03-21 Thread Matthias Bolte
2010/3/20 Eric Blake : > 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.  Therefore, unistd.h > cannot replace gethostname until winsock2.h is complete, also > fixing things if

Re: [PATCH] gethostname: fix build on mingw

2010-03-21 Thread Matthias Bolte
2010/3/20 Eric Blake : > 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.  Therefore, unistd.h > cannot replace gethostname until winsock2.h is complete, also > fixing things if

Re: [PATCH] gethostname: fix build on mingw

2010-03-21 Thread Matthias Bolte
2010/3/20 Eric Blake : > On 03/19/2010 05:35 PM, Matthias Bolte wrote: >>> I believe this will solve the issue, but would appreciate some testing >>> by Matthias.  I also think that this is the same issue as: >>> http://lists.gnu.org/archive/html/bug-gnulib/2010-01/msg00183.html >>> >> >> I tested

[PATCH] gethostname: fix build on mingw

2010-03-20 Thread Eric Blake
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. Therefore, unistd.h cannot replace gethostname until winsock2.h is complete, also fixing things if a .c includes (or even ) prior

[PATCH] gethostname: fix build on mingw

2010-03-20 Thread Eric Blake
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. Therefore, unistd.h cannot replace gethostname until winsock2.h is complete, also fixing things if a .c includes (or even ) prior

Re: [PATCH] gethostname: fix build on mingw

2010-03-20 Thread Eric Blake
On 03/19/2010 05:35 PM, Matthias Bolte wrote: >> I believe this will solve the issue, but would appreciate some testing >> by Matthias. I also think that this is the same issue as: >> http://lists.gnu.org/archive/html/bug-gnulib/2010-01/msg00183.html >> > > I tested this patch and can confirm tha

Re: [PATCH] gethostname: fix build on mingw

2010-03-19 Thread Matthias Bolte
2010/3/20 Eric Blake : > 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.  Therefore, unistd.h > cannot replace gethostname until winsock2.h is complete. > > * lib/sys_socket.in

[PATCH] gethostname: fix build on mingw

2010-03-19 Thread Eric Blake
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. Therefore, unistd.h cannot replace gethostname until winsock2.h is complete. * lib/sys_socket.in.h (includes): Set witness when in