Re: Squid CygWin enhancement

From: Robert Collins <robert.collins@dont-contact.us>
Date: Fri, 27 Apr 2001 00:50:29 +1000

I tried the cygwin branch on a win98 machine today, and it didn't seem
to pickup the DNS from the registry.

I'm going to look into that this weekend.

I have a few questions/critiques about the code though (I don't have
time to get in and help you just now - so constructive criticism is all
I can offer):

1) in defines.h, you are defining _WIN_OS_WIN32S/9X/NT/2K - are these
constants tested against the OS? If so should we use the equivalents
from windows.h (or files that windows.h auto-includes) ?

2) You've broken parsing /etc/resolv.conf for cygwin. You should merge
in the registry and /etc/resolv.conf, not have only one work.

3) in tools.c you don't check that remove(to) succeeded. You should
check that.

4) in src/Makefile.in you are always adding win32.o - this should be
added conditionally (see how snmp.o is added). (Hint: in configure.in
AC_SUBST a value with win32.o if your target in a win32 platform).

5) win 32.c you've brought in some winsock2 stuff that shouldn't be
brought in just yet IMO. (reasoning: a) the cygwin port: cygwin cannot
combine fork() and direct use of win32 sockets - fork only copies the
fd's it knows about. b) for native NT, there is work going on in another
squid branch to allow different socket code to be plugged in similiarly
to the fs modules. The winsock2 code belongs there, not in a top level
file).

6) for the NT auth helper, you might want to look at libtool. (I'm using
libtool for the generic modules code I'm writing which will provide the
support for loading such modules as dll's. (You don't need to change
anything now - but you might like to know where the compatible method
for doing this is. libtool can build libraries for mingw32 - which if
you don't know is essentially gcc that builds non-cygwin; MSVCRT based
win32 applications). Also as a critique - the dll based version of that
authenticator seems to be single-threaded. If your dll loading routines
don't assign worker threads your squid process may block if NT delays
the lookup for any reason.

Other than that, great work!

Rob

----- Original Message -----
From: "Guido Serassio" <serassio@libero.it>
To: <squid-dev@squid-cache.org>
Sent: Wednesday, April 25, 2001 8:37 PM
Subject: Re: Squid CygWin enhancement

> Hi,
>
> Il 21.30 23/04/2001 Guido Serassio ha scritto:
> >Hi,
> >
> >My work on CygWin Squid implementation is going on.
> >
> >Now I'm finished the code section for reading internal DNS settings
from
> >Windows registry.
> >The code is organized to work on all WIN32 platforms: Windows 9X, Me,
NT
> >and 2000 with run-time platform identification, in static and DHCP IP
> >address assignment.
> >
> >At the moment I have successfully tested it only on Windows NT with
static
> >IP assignment. In the next days I hope to can test it on Windows
2000,
> >static and DHCP and Windows NT in DHCP mode.
> >
> >I don't have any testing platform running Windows 9x or Me, so if
there is
> >anybody that can test the code on this platforms I will be very
happy.
> >
> >Only after a successfully Windows 2000 test I will commit the sources
on
> >CygWin branch.
>
> The test on a Windows 2000 system with and without DHCP are OK.
>
> The updated sources are already committed.
>
> Guido
>
>
>
> -
> =======================================================
> Serassio Guido
> Via Albenga, 11/4 10134 -
Torino - ITALY
> Tel. : +39.011.610749
> E-mail: serassio@interfree.it
> serassio@libero.it
> WWW: http://serassio.interfree.it
>
>
Received on Thu Apr 26 2001 - 08:51:21 MDT

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