[PATCH] - New WIN32 hosts file code - REWORKED

From: Guido Serassio <serassio@dont-contact.us>
Date: Sun, 26 Aug 2001 12:02:45 +0200

Hi,

After the Robert's comments, I have reworked the WIN32 host file code, now
is more simple and clear.

So, this is the new code for hosts file handling on Windows platforms, plus
a new enhancement on GetOSVersion().

I introduced a new default value for hosts_file option on squid.conf:
$SYSNETDBHOSTS.

When hosts_file has this value, the host file is automatically searched on
the default OS location:

- Un*X: /etc/hosts
- Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts (%SystemRoot%
value install default is c:\winnt)
- Windows 9x/Me: %windir%\hosts (%windir% value is usually c:\windows)
- Cygwin: /etc/hosts and, if not found here, Windows default

The code was tested successfully on Cygwin and Linux Alpha.

I think that now can go on HEAD, but comments are welcome.

Guido

-
=======================================================
Serassio Guido
Via Albenga, 11/4 10134 - Torino - ITALY
Tel. : +39.011.610749
E-mail: serassio@interfree.it
         serassio@libero.it
WWW: http://www.serassio.it

Received on Sun Aug 26 2001 - 04:21:51 MDT

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