[Gpa-commits] r1001 - in trunk: . src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jun 9 16:54:23 CEST 2009
Author: werner
Date: 2009-06-09 16:54:22 +0200 (Tue, 09 Jun 2009)
New Revision: 1001
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/src/ChangeLog
trunk/src/gpgmeedit.c
trunk/src/gpgmetools.c
Log:
Fix syntax error.
Use new gpgme fucntion if available.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-08 08:41:49 UTC (rev 1000)
+++ trunk/ChangeLog 2009-06-09 14:54:22 UTC (rev 1001)
@@ -1,3 +1,7 @@
+2009-06-09 Werner Koch <wk at g10code.com>
+
+ * configure.ac: test for gpgme-io_write.
+
2009-03-30 Moritz <moritz at gnu.org>
* configure.ac: Typo fix: change _save_CFLAGS to _save_cflags.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-08 08:41:49 UTC (rev 1000)
+++ trunk/configure.ac 2009-06-09 14:54:22 UTC (rev 1001)
@@ -233,6 +233,7 @@
LIBS="$LIBS $GPGME_LIBS"
CFLAGS="$CFLAGS $GPGME_CFLAGS"
AC_CHECK_FUNCS([gpgme_op_assuan_transact])
+AC_CHECK_FUNCS([gpgme_io_write])
# Fixme: We should write a test based on gpgme_subkey_t
# We might even want to put such a test into gpgme.m4.
AC_CHECK_MEMBERS([struct _gpgme_subkey.card_number],,,[#include <gpgme.h>])
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2009-06-08 08:41:49 UTC (rev 1000)
+++ trunk/src/ChangeLog 2009-06-09 14:54:22 UTC (rev 1001)
@@ -1,3 +1,13 @@
+2009-06-09 Werner Koch <wk at g10code.com>
+
+ * gpgmeedit.c (edit_fnc): Use gpgme_io_write.
+ (gpgme_io_write) [!HAVE_GPGME_IO_WRITE]: Define replacement.
+
+2009-06-08 Werner Koch <wk at g10code.com>
+
+ * gpgmetools.c (dump_data_to_clipboard): Use size_t for LEN.
+ (get_gpg_connect_agent_path) [G_OS_WIN32]: s/#if/#ifdef/.
+
2009-05-30 Moritz <moritz at gnu.org>
* fileman.c (DND_TARGET_URI_LIST): Change constant from 0 to 1.
Modified: trunk/src/gpgmeedit.c
===================================================================
--- trunk/src/gpgmeedit.c 2009-06-08 08:41:49 UTC (rev 1000)
+++ trunk/src/gpgmeedit.c 2009-06-09 14:54:22 UTC (rev 1001)
@@ -23,11 +23,15 @@
#endif
#include <assert.h>
+#include <unistd.h>
#include "gpgmeedit.h"
#include "passwddlg.h"
-#include <unistd.h>
+/* Let older versions of gpgme work on Unix. */
+#ifndef HAVE_GPGME_IO_WRITE
+#define gpgme_io_write write
+#endif
/* The edit callback for all the edit operations is edit_fnc(). Each
@@ -216,6 +220,7 @@
|| status == GPGME_STATUS_USERID_HINT
|| status == GPGME_STATUS_SIGEXPIRED
|| status == GPGME_STATUS_KEYEXPIRED
+ || status == GPGME_STATUS_BACKUP_KEY_CREATED
|| status == GPGME_STATUS_PROGRESS)
{
return parms->err;
@@ -258,8 +263,8 @@
if (result)
{
if (*result)
- write (fd, result, strlen (result));
- write (fd, "\n", 1);
+ gpgme_io_write (fd, result, strlen (result));
+ gpgme_io_write (fd, "\n", 1);
}
}
else
Modified: trunk/src/gpgmetools.c
===================================================================
--- trunk/src/gpgmetools.c 2009-06-08 08:41:49 UTC (rev 1000)
+++ trunk/src/gpgmetools.c 2009-06-09 14:54:22 UTC (rev 1001)
@@ -326,7 +326,7 @@
char buffer[128];
int nread;
gchar *text = NULL;
- gint len = 0;
+ size_t len = 0;
nread = gpgme_data_seek (data, 0, SEEK_SET);
if (nread == -1)
@@ -350,7 +350,7 @@
dos_to_unix (text, &len);
#endif
- gtk_clipboard_set_text (clipboard, text, len);
+ gtk_clipboard_set_text (clipboard, text, (int)len);
g_free (text);
return;
}
@@ -527,7 +527,7 @@
if (!gpgconf)
return NULL;
-#if G_OS_WIN32
+#ifdef G_OS_WIN32
# define NEWNAME "gpg-connect-agent.exe"
#else
# define NEWNAME "gpg-connect-agent"
@@ -535,7 +535,7 @@
fname = g_malloc (strlen (gpgconf) + strlen (NEWNAME) + 1);
strcpy (fname, gpgconf);
-#if G_OS_WIN32
+#ifdef G_OS_WIN32
for (p=fname; *p; p++)
if (*p == '\\')
*p = '/';
More information about the Gpa-commits
mailing list