Re: Windows port merge - MS Visual C++ compatibility [PATCH]

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

Hi Robert,

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

>On Sat, 2003-03-08 at 22:08, Guido Serassio wrote:
> > Hi,
> >
> > This is the 6th of some splitted native Windows patches grouped by
> > functionality.
> >
> > Native Windows port enhancements:
> >
> > - C++ fixes for MS Visual C++ compatibility, See this old squid-dev thread
> > about:
> > http://www.squid-cache.org/mail-archive/squid-dev/200211/0249.html
>
> > - Some casting and prototypes fixes
>
> {
>- cbdataFree ((clientReplyContext *)address);
>+ clientReplyContext * tmp = (clientReplyContext *)address;
>+ cbdataFree (tmp);
> }
>
>This looks extraneous. What is the error that VS gives you? I'm
>stripping this one out of what I'll merge into HEAD.

If I remember good, it gives an "error C2105: '++' needs l-value" too.
In this moment I can't build the nt branch for the ACL problem.

> > - some little DNS sources changes for a better build process using MS
> > Visual Studio.
>
>Is there anyway we can avoid the whole file #ifdefs in VS ? I'm applying
>this anyway, but as we get more modular, this is going to
>become....annoying.

Now on MS Visual Studio I'm using a manually changed autoconf.h with a
monolitich workspace, I don't have better ideas, but if someone propose
something more simple, I'm happy too ...

>Can you enlarge on the TOS casts? They are going to affect all
>platforms, I need to know what they are meant to achieve (i.e. why the
>compilers implicit casting isn't enough).

MS Visual C++ is not happy without this cast, and from protos.h I can see:

SQUIDCEXTERN int comm_openex(int, int, struct in_addr, u_short, int,
unsigned char TOS, const char *);

so I don't see something of strange on casting TOS to unsigned char.

Regards

Guido

>Other than that, I'm merging them patches in now.
>
>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:30:33 MST

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