Another new build problem on nt branch

From: Guido Serassio <serassio@dont-contact.us>
Date: Tue, 11 Mar 2003 12:42:56 +0100

Hi,

I have found a new build problem trying to build the nt branch:

comm.cc:57:18: macro "connect" requires 3 arguments, but only 1 given
comm.cc:57: variable or field `connect' declared void
comm.cc:1272:17: macro "connect" requires 3 arguments, but only 1 given
cc1plus.exe: warnings being treated as errors
comm.cc: In function `void commConnectDnsHandle(const ipcache_addrs*, void*)':
comm.cc:1272: warning: statement with no effect
comm.cc:1405:17: macro "connect" requires 3 arguments, but only 1 given
comm.cc: In static member function `static void
ConnectStateData::Connect(int, void*)':
comm.cc:1405: warning: statement with no effect
comm.cc:1420:27: macro "connect" requires 3 arguments, but only 1 given
comm.cc: At global scope:
comm.cc:1421: syntax error before `{' token
comm.cc:1429: invalid use of member `ConnectStateData::fd'
comm.cc:1429: invalid use of `this' at top level
comm.cc:1429: ISO C++ forbids declaration of `commSetSelect' with no type
comm.cc:1429: `int commSetSelect' redeclared as different kind of symbol
protos.h:151: previous declaration of `void commSetSelect(int, unsigned
int, void (*)(int, void*), void*, long int)'
comm.cc:1429: initializer list being treated as compound expression
comm.cc:1430: parse error before `break'
comm.cc:1434: ISO C++ forbids declaration of `callCallback' with no type
comm.cc:1434: initializer list being treated as compound expression
comm.cc:1435: parse error before `break'
comm.cc:1439: invalid use of member `ConnectStateData::host'
comm.cc:1439: invalid use of member `ConnectStateData::S'
comm.cc:1439: ISO C++ forbids declaration of `ipcacheMarkBadAddr' with no type
comm.cc:1439: `int ipcacheMarkBadAddr' redeclared as different kind of symbol
protos.h:511: previous declaration of `void ipcacheMarkBadAddr(const
char*, in_addr)'
comm.cc:1439: initializer list being treated as compound expression
comm.cc:1441: parse error before `if'
comm.cc:1446: invalid use of member `ConnectStateData::host'
comm.cc:1446: invalid use of `this' at top level
comm.cc:1446: ISO C++ forbids declaration of `ipcache_nbgethostbyname' with
no type
comm.cc:1446: `int ipcache_nbgethostbyname' redeclared as different kind of
symbol
protos.h:501: previous declaration of `void ipcache_nbgethostbyname(const
char*, void (*)(const ipcache_addrs*, void*), void*)'
comm.cc:1446: initializer list being treated as compound expression
comm.cc:1447: parse error before `}' token
comm.cc:1460: confused by earlier errors, bailing out

I think that this comes from the redefinition of socket functions like the
following:

inline
int squid_connect(int s, const struct sockaddr * n, int l)
{
     if (::connect(_get_osfhandle(s),n,l) == SOCKET_ERROR) {
         if (WSAEMFILE == (errno = WSAGetLastError()))
             errno = EMFILE;
         return -1;
     }
     else
         return 0;
}
#define connect(s,n,l) squid_connect(s,n,l)

Any ideas about ?

Regards

Guido

-
=======================================================
Serassio Guido
Via Albenga, 11/4 10134 - Torino - ITALY
E-mail: guido.serassio@serassio.it
WWW: http://www.serassio.it
Received on Tue Mar 11 2003 - 04:43:16 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:32 MST