Re: Squid 2.5 CygWin and NT development

From: Guido Serassio <serassio@dont-contact.us>
Date: Mon, 16 Apr 2001 13:52:53 +0200

Hi Robert,

Il 12.40 16/04/2001 Robert Collins ha scritto:
>Hi Guido,
>
>Theres a branch cygwin on sourceforge where I was doing some updates to
>cygwin.
>I've just checked and it's got some useful changes in it for what you
>were doing: the autoconf script will configure gcc on cygwin with access
>to the WIN32 API(which is not the default in current gcc versions).
>
>It also has my win32 native async io fs module (which isn't actually
>needed anymore as I've extended cygwin to have full pthreads support.
>Gotta love opensource :]).
>
>If I can make some suggestions about coding to get the changes most
>easily acceptable into squid-head: (these are in addition to the squid
>programmers guidelines).
>
>1. use #ifdef SQUID_CYGWIN to surround cygwin specific code. Don't use
>#ifdef __CYGWIN__.

It's already my intention to use "_SQUID_CYGWIN_" or, where
possible, "_SQUID_CYGWIN_ || _SQUID_MSWIN_", hoping to make a work that be
useful too for the NT native port.

>2. try to leverage existing functions, or transparently extend them. If
>you have large chunks of code that are quite different to the existing
>code, you might consider adding a squid_win32 library to the lib
>directory. Kinkie and I did that for some of the common NTLM code.

This is already true in the NT 2.3Stable4 for the NT service code, but not
as a library.

>3. Where possible use "unix" functions or cygwin-API functions (I.E.
>dlopen() not LoadLibrary()). Also cygwin has a number of functions that
>extend the unix-style API onto win32, and you need to use those to run
>reliably on cygwin. using "native" calls should be done with care, so as
>not to conflict with cygwin's compatability code.

OK, when needed I eventually make a double branch code, _SQUID_CYGWIN_ and
_SQUID_MSWIN_.

>4. use win95 compatible functions. Cygwin is windows 95 compatible, and
>so is squid for cygwin. If you __need__ to write NT only code, make a
>configure option to turn on NT-only features. Only the execution as a
>server feature you've listed below should need NT, so I don't think this
>will be much of an issue. If it is, let me know. I suggest you look at
>sshd from cygwin for service manager integration - Corinna has solved
>many headaches with spawned processes and the like there.

I'm not sure that is a right choice to develope code with Windows 9x
compatibility in mind ...
The features limitations are very strong, and Microsoft is now ending the
evolution of this buggy platform with the new Windows XP.
I think that in April 2001 even the NT Domain based NTLM Authentication may
be quickly osbolete ...

>I'm happy to provide feedback/testing as you go. Once you're getting
>happy with the code, simply drop me a line and we can look at getting it
>some exposure and testing, prior to getting it merged into HEAD.

OK.

>lastly I'm not sure what you mean by native windows NT basic
>authentication. If you mean the module you sent me a beta of before,
>which talks to the LSA when given basic credentials, if you have that
>ready to roll the best place to add it is as a new basic helper - it
>should be able to go straight into HEAD unless there are issues with the
>code. Drop me a tarball if you like.

Yes, is that module.
I have found some problems on Squid 2.3 on the handling of the
domain\username Microsoft syntax. Now I will to make another some testing.

>Rob

Bye

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 Mon Apr 16 2001 - 05:52:59 MDT

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