[Help-gnutls] Re: Build gnutls on windows

Simon Josefsson jas at extundo.com
Tue Aug 23 23:58:29 CEST 2005

Martin Lambers <marlam at marlam.de> writes:

> 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.

Looks good.  I'll wait with installing this until the papers have

> 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.

Ok.  I have discovered more problems with getpass when cross-compiling
GnuTLS to a uClibc system.  It seems getpass will require some
work...  However, this shouldn't be too difficult.  getpass is
conceptually simple.

> 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.

Installed in CVS now.

> 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.

I will attempt to incorporate your ideas into the gnulib getpass


More information about the Gnutls-help mailing list