Re: Some info on Squid and MinGW

From: Guido Serassio <serassio@dont-contact.us>
Date: Mon, 16 Sep 2002 14:06:08 +0200

Hi Robert,

Il 13.12 16/09/2002 Robert Collins ha scritto:
>On Mon, 2002-09-16 at 20:54, Guido Serassio wrote:
> > Hi Robert,
> >
> > I'm working on Your MinGW/Squid patch, and I have some questions:
> >
> > - What is the correct compile procedure with Cygwin/MinGW ?
>
>I thought I posted that in my email.
>
>I use
>CC="gcc -mno-cygwin" srcpath/configure --enable-win32specific (or
>whatever the win32 flag is :}) and any other options you usually use.

Thanks, now is more clear.

>
> > - On a previous mail you wrote about _free_osfhnd:
> > > > The NT Native port of squid, build with Visual C uses this when
> linking
> > > > to MSVCRT. As a reference in 1999 XEmacs started using this call, but
> > > > they defined it locally rather than patching mingw from what I can
> tell.
> > Do you have some reference about, link , etc. ?
>
>I searched google. "Xemacs _free_osfhnd" brings it up.
>
> > - Why do You have moved getopt() from win32lib.c, the new it's a better
> > source or is only a organizational move ?
>
>Uh, I forget :]. I grabbed the cygwin getopt.c and getopt.h. I think it
>should be separate though, as it's not a win32-specific thing, just a
>broken libc thing.

Correct, like readdir.c, I will put it on port/win32/src.

>
> > A final consideration: looking at MinGW sources, it seems to me that
> the FD
> > handling with _free_osfhnd can't work using the MSVCRT.DLL, because the
> > function it's not exported from the DLL version of MSVCRT. So, I hope to
> > find some workaroud.
>
>Hmm. Well one step at a time :}.
>
>How much reorganisation do you think you would need to use WSASend etc
>on network FD's. If we provided calls fdIsSocket(int) and fdIsDisk(int)
>and fdIsPipe(int), would that help? I.e. lets separate disk and socket
>IO now.

The first work of Romeo Angelache and first CacheExpress build was based on
splitted FDs. The sources was filled of tons of #ifdef _SQUID_MSWIN_ and
very hard to maintain. Thanks to the use of a single Disk/Socket FD pool
now we are speaking about a working Squid nt branch based on HEAD, with
more the 90 % of Unix functionality.

To make some example: when Adrian has commited the commloops changes, after
a cvsmerge the nt branch was already functional, the same with external ACL
support.

I think that separate disk, socket and pipe I/O in HEAD is the better help
for the Windows port, and this should be made using a modularized
approach.

Regards

Guido

>Rob
>

-
=======================================================
Serassio Guido
Via Albenga, 11/4 10134 - Torino - ITALY
E-mail: guido.serassio@serassio.it
WWW: http://www.serassio.it
Received on Mon Sep 16 2002 - 06:06:59 MDT

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