Re: [Squid-cvs] nt-2_5 squid/src/fs/aufs store_dir_aufs.c,1.23.6.1.4.15,1.23.6.1.4.16

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 20 May 2005 13:14:34 +0200 (CEST)

On Fri, 20 May 2005, Guido Serassio wrote:

> --- store_dir_aufs.c 27 Mar 2005 07:51:24 -0000 1.23.6.1.4.15
> +++ store_dir_aufs.c 20 May 2005 08:41:51 -0000 1.23.6.1.4.16
> @@ -1175,7 +1175,7 @@
> debug(50, 0) ("%s: %s\n", swaplog_path, xstrerror());
> fatal("Failed to open swap log for reading");
> }
> -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
> +#if defined(_SQUID_CYGWIN_)
> setmode(fileno(fp), O_BINARY);
> #endif
> memset(&clean_sb, '\0', sizeof(struct stat));

Are you sure about this? The file is binary..

Additionally isn't it better to fopen the file binary to begin with?

from
     fp = fopen(swaplog_path, "r");
to
     fp = fopen(swaplog_path, "rb");

the b flag is accepted by all systems I know of, including UNIX (ignored
there..).

Regards
Henrik
Received on Fri May 20 2005 - 05:14:37 MDT

This archive was generated by hypermail pre-2.1.9 : Tue May 31 2005 - 12:00:03 MDT