On Sat, Aug 8, 2009 at 3:14 AM, Bruno Haible<br...@clisp.org> wrote: > Sam Steingold wrote: >> In file included from >> /cygdrive/c/sds/dev/current/modules/syscalls/gllib/gethostname.c:83: >> /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h: In function >> `set_winsock_errno': >> /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:34: warning: >> implicit declaration of function `WSAGetLastError' >> /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:35: warning: >> implicit declaration of function `WSASetLastError' >> /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:40: error: >> `WSA_INVALID_HANDLE' undeclared (first use in this function) > > For comparison, when I do > ./gnulib-tool --create-testdir --dir=/tmp/testdir mktime strftime strptime > uname > and build the resulting testdir on mingw, the compilation of gethostname.c > works > fine, because the generated unistd.h contains these lines: > > #if 1 > /* Get all possible declarations of gethostname(). */ > # if 1 > # include <winsock2.h>
yes, this is what I now have in build/syscalls/gllib/unistd.h and I get the exact same error. I wonder what the #include_next does. I followed your instructions, so now I have unistd.h both in the above and in build/gllib/unistd.h the former comes first on the gcc -I list, but, apparently, #include next discards it and only the latter is actually used. -- Sam Steingold <http://sds.podval.org>