GPGME CVS branched

Marcus Brinkmann marcus.brinkmann at ruhr-uni-bochum.de
Sat Dec 11 16:51:09 CET 2004


At Sat, 11 Dec 2004 15:49:52 +0100,
Michael Nottebrock <michaelnottebrock at gmx.net> wrote:
> 
> [1  <text/plain; iso-8859-1 (quoted-printable)>]
> On Saturday, 11. December 2004 14:42, Marcus Brinkmann wrote:
> > At Sat, 11 Dec 2004 13:04:43 +0100,
> >
> > Michael Nottebrock <michaelnottebrock at gmx.net> wrote:
> > > [1  <text/plain; iso-8859-1 (quoted-printable)>]
> > > On Tuesday, 7. December 2004 19:54, Marcus Brinkmann wrote:
> > >
> > > gpgme has recently been changed to use ttyname_r in gpgsm-engine.c.
> > > ttyname_r is not available on a lot of platforms, including FreeBSD - it
> > > would be nice if ttyname_r usage could be optionalised and checked for by
> > > configure.
> >
> > Please add ttyname_r to FreeBSD if at all possible.  It is POSIX by now.
> 
> It probably won't be added anymore to FreeBSD 4.x - I'm not sure what the 
> status of ttyname_r of 5.x is because the configure check thinks it exists, 
> but compilation issues a warning "implicit declaration of ttyname_r" (but 
> completes).

Are you saying that on BSD 5.x ttyname_r is found by configure, and
not replaced, so gpgme/ttyname_r.c is not linked in, but yet the
prototype is not defined in unistd.h?  Does compiling and linking the
test programs succeed?  (This will reveal if the ttyname_r reference
in gpgme can be resolved or not).  If this is the case, then BSD lacks
the prototype, but provides the function, and unistd.h needs to be
fixed (but it will work).

This reminds me, for systems missing it I added to util.h:

#ifndef HAVE_TTYNAME_R
int ttyname_r (int fd, char *buf, size_t buflen);
#endif

at the obvious place.  This should get rid of the warning on BSD 4.*
 
I have checked in the ttyname_r patch into HEAD and gpgme-1-0-branch.

> > I can put in a check and fall back to ttyname with a warning.  It's
> > what we do for getenv already.  Can you please test the patch below?
> > If it detects the lack of ttyname_r, issues a warning and compiles and
> > links in the replacement function, I will apply it.  Please let me
> > know.  
> 
> Yes, this works fine, thanks! One other thing: The included assuan bits have 
> several problems on FreeBSD, which have all been ironed out by now (we and 
> Werner actually ironed them out on gpa-devel, perhaps you remember)  - could 
> you consider updating the assuan import or perhaps just depend on the 
> separate libassuan distribution?

Note that this is only needed for gpgsm support.

I can look at the changes on gpa-devel, and incorporate them.  It
would be even better if you just do it and send a patch to me, so that
it is tested and really works for you.

There are some changes necessary in libassuan for GPGME to make it
usable as a third-party library (see assuan/README.1st).

I will have to update libassuan anyway, but if you need the BSD patch
right now, I can check it in, also for the 1.0.x branch (which I
otherwise likely wouldn't update anymore).

Thanks,
Marcus




More information about the Gnupg-devel mailing list