Re: Cannot compile Squid3 fake_auth on Windows

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Wed, 09 Jul 2008 00:45:42 +0200

On tis, 2008-07-08 at 22:25 +0200, Guido Serassio wrote:
> HI Amos,
>
> I'm trying to maintain up-to-date the Windows support even if it
> doesn't run, so I have found a little build problem.
>
> This change broke fake_auth on Windows:
> http://www.squid-cache.org/Versions/v3/HEAD/changesets/b8894.patch
>
> strtok_r() is not available on Windows. In the past there was an own
> implementation of strtok_r(), but it was removed in favour of our
> strwordtok():
> http://www.squid-cache.org/Versions/v3/HEAD/changesets/11355.patch
>
> Any suggestion on how to replace the strtok_r() usage ?

There is no need to strtok_r here..

       strtok(user, '\\');
       p = strtok(NULL, '\\');

and also as an extra safeguard:

        if (!p)
                p = user;

Regards
Henrik

Received on Tue Jul 08 2008 - 22:45:51 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 09 2008 - 12:00:04 MDT