gpgme 0.3.8 - some more things

Stéphane Corthésy stephane@sente.ch
Thu Jul 25 16:12:02 2002


--Apple-Mail-1--92962562
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=ISO-8859-1;
	format=flowed

Hi,

In file gpgme/wait.c, there is a global variable named fdt_global;=20
shouldn't it be either prefixed with "gpgme_", as it is global and=20
exported in the library, or set as static, as it seems it is used only=20=

in file wait.c?

Here's a new version of the patch we use on MacOS X.

St=E9phane


--Apple-Mail-1--92962562
Content-Disposition: attachment;
	filename=gpgme.patch
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-mac-hide-extension=yes;
	x-unix-mode=0644;
	name="gpgme.patch"

diff -ur gpgme-0.3.8/gpgme/Makefile.in gpgme-0.3.8-new/gpgme/Makefile.in
--- gpgme-0.3.8/gpgme/Makefile.in	Tue Jun 25 20:37:02 2002
+++ gpgme-0.3.8-new/gpgme/Makefile.in	Thu Jul 25 11:54:03 2002
@@ -168,6 +168,7 @@
 	sema.h io.h \
 	${system_components} \
 	debug.c debug.h \
+	vasprintf.c \
 	gpgme.c version.c errors.c
 
 subdir = gpgme
@@ -193,7 +194,7 @@
 	decrypt-verify.lo verify.lo sign.lo passphrase.lo progress.lo \
 	key.lo keylist.lo trustlist.lo import.lo export.lo genkey.lo \
 	delete.lo rungpg.lo engine-gpgsm.lo engine.lo $(am__objects_1) \
-	debug.lo gpgme.lo version.lo errors.lo
+	debug.lo gpgme.lo version.lo errors.lo vasprintf.lo
 libgpgme_la_OBJECTS = $(am_libgpgme_la_OBJECTS)
 SCRIPTS = $(bin_SCRIPTS)
 
@@ -223,6 +224,7 @@
 @AMDEP_TRUE@	./$(DEPDIR)/recipient.Plo ./$(DEPDIR)/rungpg.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/sign.Plo ./$(DEPDIR)/signers.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/trustlist.Plo ./$(DEPDIR)/util.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/vasprintf.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/verify.Plo ./$(DEPDIR)/version.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/w32-io.Plo ./$(DEPDIR)/w32-sema.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/w32-util.Plo ./$(DEPDIR)/wait.Plo
@@ -338,6 +340,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signers.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trustlist.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasprintf.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verify.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/w32-io.Plo@am__quote@
diff -ur gpgme-0.3.8/gpgme/ath-pth.c gpgme-0.3.8-new/gpgme/ath-pth.c
--- gpgme-0.3.8/gpgme/ath-pth.c	Sun Jun  2 21:19:25 2002
+++ gpgme-0.3.8-new/gpgme/ath-pth.c	Thu Jul 25 11:54:03 2002
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 
-#include <malloc.h>
+#include <stdlib.h>
 #include <errno.h>
 #include <pth.h>
 
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;
diff -ur gpgme-0.3.8/gpgme/debug.h gpgme-0.3.8-new/gpgme/debug.h
--- gpgme-0.3.8/gpgme/debug.h	Wed May  8 06:04:12 2002
+++ gpgme-0.3.8-new/gpgme/debug.h	Thu Jul 25 13:58:42 2002
@@ -51,7 +51,8 @@
 #define DEBUG_END(hlp, fmt, arg...) \
   _gpgme_debug_add (&(hlp), fmt , ##arg); \
   _gpgme_debug_end (&(hlp))
-#elsif 0
+#else
+#if 0
 /* Only works in C99.  */
 #define DEBUG0(fmt) \
   _gpgme_debug (1, "%s:%s: " fmt, __FILE__, XSTRINGIFY (__LINE__))
@@ -103,6 +104,7 @@
 #define DEBUG_END(hlp,fmt) \
   _gpgme_debug_add (&(hlp), fmt); \
   _gpgme_debug_end (&(hlp))
+#endif
 #endif
 
 #define DEBUG_ENABLED(hlp) (!!(hlp))
diff -ur gpgme-0.3.8/gpgme/encrypt-sign.c gpgme-0.3.8-new/gpgme/encrypt-sign.c
--- gpgme-0.3.8/gpgme/encrypt-sign.c	Tue Jun 11 15:25:23 2002
+++ gpgme-0.3.8-new/gpgme/encrypt-sign.c	Thu Jul 25 13:59:57 2002
@@ -34,7 +34,7 @@
 encrypt_sign_status_handler (GpgmeCtx ctx, GpgStatusCode code, char *args)
 {
   char *encrypt_info = 0;
-  int encrypt_info_len;
+  size_t encrypt_info_len;
 
   _gpgme_encrypt_status_handler (ctx, code, args);
 
diff -ur gpgme-0.3.8/gpgme/key.c gpgme-0.3.8-new/gpgme/key.c
--- gpgme-0.3.8/gpgme/key.c	Mon Jun 10 15:51:32 2002
+++ gpgme-0.3.8-new/gpgme/key.c	Thu Jul 25 14:01:25 2002
@@ -991,6 +991,7 @@
       break;
     case GPGME_ATTR_SIG_STATUS:
     case GPGME_ATTR_ERRTOK:
+	case GPGME_ATTR_SIG_SUMMARY:
       /* Not of any use here.  */
       break;
     }
diff -ur gpgme-0.3.8/gpgme/util.h gpgme-0.3.8-new/gpgme/util.h
--- gpgme-0.3.8/gpgme/util.h	Wed May  8 13:01:36 2002
+++ gpgme-0.3.8-new/gpgme/util.h	Thu Jul 25 11:54:03 2002
@@ -77,7 +77,7 @@
 #ifdef HAVE_CONFIG_H
 #if !HAVE_VASPRINTF
 #include <stdarg.h>
-int vasprintf (char **result, const char *format, va_list *args);
+int vasprintf (char **result, const char *format, va_list args);
 int asprintf (char **result, const char *format, ...);
 #endif
 
diff -ur gpgme-0.3.8/gpgme/wait.c gpgme-0.3.8-new/gpgme/wait.c
--- gpgme-0.3.8/gpgme/wait.c	Fri Jun 21 17:35:14 2002
+++ gpgme-0.3.8-new/gpgme/wait.c	Thu Jul 25 14:19:21 2002
@@ -35,7 +35,7 @@
 #include "io.h"
 #include "engine.h"
 
-struct fd_table fdt_global;
+static struct fd_table fdt_global;
 
 static GpgmeCtx *ctx_done_list;
 static int ctx_done_list_size;
diff -ur gpgme-0.3.8/tests/gpg/t-encrypt-sym.c gpgme-0.3.8-new/tests/gpg/t-encrypt-sym.c
--- gpgme-0.3.8/tests/gpg/t-encrypt-sym.c	Thu Jun 20 15:37:28 2002
+++ gpgme-0.3.8-new/tests/gpg/t-encrypt-sym.c	Thu Jul 25 14:12:43 2002
@@ -77,7 +77,7 @@
   const char *text = "Hallo Leute\n";
   char *text2;
   char *p;
-  int i;
+  size_t i;
 
   err = gpgme_check_engine ();
   fail_if_err (err);
diff -ur gpgme-0.3.8/tests/gpg/t-verify.c gpgme-0.3.8-new/tests/gpg/t-verify.c
--- gpgme-0.3.8/tests/gpg/t-verify.c	Fri May  3 15:15:51 2002
+++ gpgme-0.3.8-new/tests/gpg/t-verify.c	Thu Jul 25 14:14:15 2002
@@ -169,7 +169,8 @@
     GpgmeSigStat status;
     char *nota;
     int n = 0;
-    int i, j;
+	size_t i;
+    int j;
 
     err = gpgme_new (&ctx);
     fail_if_err (err);

--Apple-Mail-1--92962562--