bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sockets


From: Brian Dessent
Subject: Re: sockets
Date: Thu, 24 Jan 2008 07:29:28 -0800

Simon Josefsson wrote:

> continue to work under cygwin.  Btw, could you quote the part from
> config.log which explains _why_ the m4 macro fails under cygwin?  It
> isn't clear from the M4 check that it would fail under cygwin, but maybe
> it is just my lack of knowledge with cygwin.  Still, if it is obscure,
> we might add a comment.

It fails because gl_HEADER_SYS_SOCKET sets HAVE_WINSOCK2_H=0 if
ac_cv_header_sys_socket_h = yes, and so winsock2.h is never included in
the AC_TRY_LINK in gl_SOCKETS:

configure:4791: checking if we need to call WSAStartup in winsock2.h and
-lws2_32
configure:4827: gcc -o conftest.exe -g -O2   conftest.c  -lws2_32 >&5
conftest.c: In function `main':
conftest.c:30: error: `WORD' undeclared (first use in this function)
conftest.c:30: error: (Each undeclared identifier is reported only once
conftest.c:30: error: for each function it appears in.)
conftest.c:30: error: parse error before "wVersionRequested"
conftest.c:31: error: `WSADATA' undeclared (first use in this function)
conftest.c:32: error: `wVersionRequested' undeclared (first use in this
function)
conftest.c:32: error: `wsaData' undeclared (first use in this function)
configure:4833: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "dummy"
| #define PACKAGE_TARNAME "dummy"
| #define PACKAGE_VERSION "0"
| #define PACKAGE_STRING "dummy 0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "dummy"
| #define VERSION "0"
| #define HAVE_INCLUDE_NEXT 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_SOCKET_H 1
| /* end confdefs.h.  */
| 
| #ifdef HAVE_WINSOCK2_H
| # include <winsock2.h>
| #endif
| int
| main ()
| {
| 
|       WORD wVersionRequested = MAKEWORD(1, 1);
|       WSADATA wsaData;
|       int err = WSAStartup(wVersionRequested, &wsaData);
|       WSACleanup ();
|   ;
|   return 0;
| }

Brian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]