Re: HEAD does not compile cleanly

From: Guido Serassio <serassio@dont-contact.us>
Date: Sat, 06 Apr 2002 22:24:02 +0100

Hi,

Il 21.52 06/04/2002 Henrik Nordstrom ha scritto:
>Anything touching st_size should be using size_t. There is also the
>related types off_t and ssize_t that can be used depending on the
>situation (off_t is the difference between two size_t, ssise_t is a
>signed size_t).

Opss, I have read a wrong line in MSDN about the stat structure definition.
Sure, it must be a size_t.

>Casting to int will only be mudding the problem even worse. And there
>is other problems in this family that should be addressed to make
>Squid deals with really big objects.
>
>Adding a matching conditional on S_ISREG for the sb related variable
>is fine. A bug where it is not (src/logfile.c). Now fixed in HEAD.
>

It's possible to commit the fix to s2_5 too ?

There is a similar problem in all store_dir_xxxx.c files regarding HAVE_FCHMOD.

Regards

Guido

>On Saturday 06 April 2002 18:53, Guido Serassio wrote:
>
> > This is the VC compiler output filtered of all WIN32 stuff when
> > compiling nt-2_5.
> > Line numbers are different respect s2_5 on some files (comm.c,
> > comm_select.c, main.c, store_dir_ufs.c and others).
> >
> > Looking the errors, I have made some consideration:
> >
> > - __int64 errors: In Windows stat.st_size is a int64 but Squid use
> > it as int (store_dir_ufs.c, store_io_ufs.c, errorpage.c, net_db.c)
> > - sb unreferenced errors: Windows doesn't have S_ISREG, so the sb
> > related variable is unreferenced (store_dir_ufs.c, logfile.c)
> >
> > If You like, I can build a patch for the previous (and eventually
> > others) errors:
> >
> > - an int cast when using stat.st_size as an int for the first
> > - a #ifdef S_ISREG - #endif encapsulation for the second
> >
> > Regards
> >
> > Guido

-
=======================================================
Serassio Guido
Via Albenga, 11/4 10134 - Torino - ITALY
E-mail: guido.serassio@serassio.it
WWW: http://www.serassio.it
Received on Sat Apr 06 2002 - 14:24:07 MST

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