[PATCH] - New WIN32 hosts file code

From: Guido Serassio <serassio@dont-contact.us>
Date: Sat, 25 Aug 2001 21:05:40 +0200

Hi,

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:
$SYSNETDB/hosts.

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 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 Sat Aug 25 2001 - 13:06:17 MDT

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