win32 related patches

Nikos Mavrogiannopoulos n.mavrogiannopoulos at gmail.com
Fri Aug 22 09:50:43 PDT 2014


On Fri, Aug 22, 2014 at 5:04 PM, David Woodhouse <dwmw2 at infradead.org> wrote:
> On Fri, 2014-08-22 at 11:00 +0200, Nikos Mavrogiannopoulos wrote:
>> The attached patches fix some issues in windows. Of them patch-0002 is
>> not critical, but switches to windows types to avoid casts from the
>> caller.
> Thanks. Can you say *what* valid input inet_addr() fails on? Other than
> "255.255.255.255" which is handled as a special case?

It failed both for IP address 192.168.1.0 and 255.255.255.0 on my
windows 7 installation. I didn't bother to debug that issue, so I just
used pton.

> Elsewhere in the code we do assume that inet_pton() exists, so you could
> just use 'return inet_pton(AF_INET, cp, addr)' unconditionally rather
> than having the separate version for win32.

It could, it just seemed faster to replace aton. The issue was in
script.c, causing "Discard bad split include".

> For the last patch, we now end up running 'cmd /c cscript ...' should we
> just use 'cscript.exe' there instead of 'cmd.exe'?

I don't think createprocess() can handle scripts, that's the reason I
got through cmd.exe. Anyway that patch is now quite improved.

> Please could I also have the patches with Signed-off-by: tags as
> described in http://www.infradead.org/openconnect/contribute.html

I forget it all the time.

regards,
Nikos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-use-inet_pton-in-windows-to-simulate-inet_aton.patch
Type: text/x-diff
Size: 1110 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20140822/f76bbf4c/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-use-windows-types-and-return-codes-for-socket-errors.patch
Type: text/x-diff
Size: 3196 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20140822/f76bbf4c/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-use-recv-and-closesocket-on-the-cmd_fd-on-windows.patch
Type: text/x-diff
Size: 1530 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20140822/f76bbf4c/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-use-CreateProcess-instead-of-system-to-run-scripts.patch
Type: text/x-diff
Size: 2744 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20140822/f76bbf4c/attachment-0007.bin>


More information about the openconnect-devel mailing list