Re: Object naming conflict on nt branch

From: Guido Serassio <serassio@dont-contact.us>
Date: Mon, 10 Mar 2003 21:51:12 +0100

Hi Robert,

Il 12.25 09/03/2003 Robert Collins ha scritto:

>On Sun, 2003-03-09 at 21:33, Guido Serassio wrote:
> > Hi,
> >
> > I'have just discovered an object naming conflict on nt branch:
> >
> > Windows include file wtypes.h defines this:
> >
> > typedef struct _ACL
> > {
> > UCHAR AclRevision;
> > UCHAR Sbz1;
> > USHORT AclSize;
> > USHORT AceCount;
> > USHORT Sbz2;
> > } ACL;
> >
> > typedef ACL *PACL;
> >
> > that is conflicting with "ACL" used in Squid.
> >
> > This happens on all Windows build environments: Cygwin, MinGW and MS
> Visual
> > Studio.
>
>Dang. It's just *so hard* with MS polluting the namescape all the time.
>
>If we don't use the windows ACL type, just do this:
>
>#define ACL WindowsACL
>#include <windows.h>
>#undef ACL

I'm trying something like your suggestion, I don't include windows.h
explicity, and it seems to work better, but there is a new problem (now I'm
testing MinGW):

if g++ -DHAVE_CONFIG_H
-DDEFAULT_CONFIG_FILE=\"c:/MinGWsquid/etc/squid.conf\" -I. -I. -I../include
-I../port/win32/include -I. -I. -I../include -I../include -Werror -Wall
-g -O2 -mthreads -D_FILE_OFFSET_BITS=64 -MT ACLMaxUserIP.o -MD -MP -MF
".deps/ACLMaxUserIP.Tpo" \
   -c -o ACLMaxUserIP.o `test -f 'ACLMaxUserIP.cc' || echo
'./'`ACLMaxUserIP.cc; \
then mv ".deps/ACLMaxUserIP.Tpo" ".deps/ACLMaxUserIP.Po"; \
else rm -f ".deps/ACLMaxUserIP.Tpo"; exit 1; \
fi
ACLMaxUserIP.cc:51:77: macro "max" requires 2 arguments, but only 1 given
ACLMaxUserIP.cc: In constructor `ACLMaxUserIP::ACLMaxUserIP(const char*)':
ACLMaxUserIP.cc:52: parse error before `{' token
ACLMaxUserIP.cc:54:89: macro "max" requires 2 arguments, but only 1 given
ACLMaxUserIP.cc: In copy constructor `ACLMaxUserIP::ACLMaxUserIP(const
    ACLMaxUserIP&)':
ACLMaxUserIP.cc:54: parse error before `,' token
make[3]: *** [ACLMaxUserIP.o] Error 1
make[3]: Leaving directory `/c/work/mgw-3.0/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/c/work/mgw-3.0/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/c/work/mgw-3.0/src'
make: *** [all-recursive] Error 1

What is wrong ?

Regards

Guido

>Cheers,
>Rob
>--
>GPG key available at: <http://users.bigpond.net.au/robertc/keys.txt>.
>

-
=======================================================
Serassio Guido
Via Albenga, 11/4 10134 - Torino - ITALY
E-mail: guido.serassio@serassio.it
WWW: http://www.serassio.it
Received on Mon Mar 10 2003 - 13:51:44 MST

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