gpgme 0.3.8

Marcus Brinkmann Marcus.Brinkmann at ruhr-uni-bochum.de
Thu Jul 25 21:00:02 CEST 2002


On Sun, Jul 14, 2002 at 11:40:47AM +0200, Stéphane Corthésy wrote:
> I tried to compile gpgme 0.3.8 on MacOS X, but I failed to compile it 
> out-of-the-box :-(

I hope it works better now ;)
 
> Basically, there are no vasprintf() and asprintf() functions on MacOS X; 
> I tried using the replacement you provide (it was not part of 0.3.8 
> distro, but I found it in the repository), but it doesn't work: even the 
> test suite on vasprintf() fails:

I fixed and updated the replacement, can you please try the new version?  If
that doesn't work either, it might be because of using memcpy instead
va_copy.  If that is the case, we have a problem ;) [well, nothing critical,
but it would be nice to see it working now, as this is the version of
vasprintf used in libiberty, too]

I added a fix to the makefile that should make vasprintf part of the
distribution, and add it to the objects linked into the library, too, can
you please verify this?

BTW, it seems to me we shouldn't add vasprintf like this, because it will be
exported to applications, and that might collide with a private vasprintf
that is not compatible.  Well, hopefully nobody does that :)

> (Note that the prototype of vasprintf() in gpgme/util.h is wrong;

Indeed.

> There are also #include problems in gpgme/ath-pth.c and ath-pthread.c: 
> instead of #including <malloc.h> (which doesn't exist on MacOS X; we 
> have <sys/malloc.h>), I need to #include <stdlib.h>.

Fixed, thanks.
 
> During compilation there were also some #warnings which should be 
> corrected:

All of them fixed, thanks.

On Thu, Jul 25, 2002 at 04:12:41PM +0200, Stéphane Corthésy wrote:
> Here's a new version of the patch we use on MacOS X.


It seems you have problems with #pragma weak?  Is it not supported in your
configuration?  I will have to work on this, we can probably make the thread
support working on other platforms but GNU systems, but it won't be as
convenient.

diff -ur gpgme-0.3.8/gpgme/ath-pthread.c gpgme-0.3.8-new/gpgme/ath-pthread.c
--- gpgme-0.3.8/gpgme/ath-pthread.c	Thu Jul 25 14:22:32 2002
+++ gpgme-0.3.8-new/gpgme/ath-pthread.c	Thu Jul 25 11:54:03 2002
@@ -18,12 +18,13 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 
-#include <malloc.h>
+#include <stdlib.h>
 #include <errno.h>
 #include <pthread.h>
 
 #include "ath.h"
 
+#if 0
 /* Need to include pthread_create in our check, as the GNU C library
    has the pthread_mutex_* functions in their public interface.  */
 #pragma weak pthread_create
@@ -31,6 +32,7 @@
 #pragma weak pthread_mutex_destroy
 #pragma weak pthread_mutex_lock
 #pragma weak pthread_mutex_unlock
+#endif
 
 /* The lock we take while checking for lazy lock initialization.  */
 static pthread_mutex_t check_init_lock = PTHREAD_MUTEX_INITIALIZER;


Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    marcus at gnu.org
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann at ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/




More information about the Gnupg-devel mailing list