Re: HEAD does not compile cleanly

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 6 Apr 2002 22:52:10 +0200

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).

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.

Regards
Henrik

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
Received on Sat Apr 06 2002 - 13:59:55 MST

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