help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnutls] Re: Build gnutls on windows


From: Martin Lambers
Subject: Re: [Help-gnutls] Re: Build gnutls on windows
Date: Tue, 23 Aug 2005 22:19:36 +0200
User-agent: Mutt/1.5.6+20040907i

On Tue, 23. Aug 2005, 11:38:28 +0200, Simon Josefsson wrote:
> >> I'll try to fix getpass.  There is no reason for the tool to use mmap
> >> to read keys/certificates; a patch to fix this would be appreciated.
> >
> > The attached patch against src/cli.c uses only C89 functions. It works
> > for me. 
> 
> The patch look good!  To be able to use it, you'll have to assign
> copyright of your work to the FSF.  Is this OK with you?  I can send
> you the required form offline.

The copyright assignment process is started.

The patch unfortunately leaves '#include <sys/mman.h>' (line 30) in cli.c.
This line must be removed. A corrected patch is attached.

As a test, I changed gl/getpass.h and gl/getpass.c so that it compiles
on Win32 (and always returns NULL ;)
After that, a crossbuild with the Debian mingw32 package worked fine! So
a gnulib getpass module that works for MinGW is all that is missing for
a successful Win32 build.

I have one question, though: src/common.h defines socklen_t to int for
Win32. This is a redefinition since configure previously detected a
missing socklen_t and then defined it to be size_t in config.h.
I think the definition in src/common.h (line 11) should be removed, and
the configure script should always define socklen_t to int. The
'NOTE' section in the Linux connect(2) man page says that it was
historically an int, and Win32 and MacOS X still use int.

Last, I wrote a simple getpass() version for Win32 (attached). This
works completely different from the gnulib getpass module since 
- Windows has no /dev/tty concept
- Windows cannot switch terminal properties (AFAIK).
I have no idea how something like this could be properly integrated into
a gnulib module.

Regards,
Martin

Attachment: gnutls-cli-no_mmap.patch
Description: Text document

Attachment: win32-getpass.h
Description: Text Data

Attachment: win32-getpass.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]