# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../sylpheed/gpgme-update.patch.disabled # Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 1998 - 2003 Clifford Wolf # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- Written by Rene Rebe to make sylpheed compile with recent gpgme, since noone seems to care about this ... --- sylpheed-0.9.0/src/rfc2015.c.orig 2003-08-03 02:15:15.000000000 +0200 +++ sylpheed-0.9.0/src/rfc2015.c 2003-08-03 02:28:09.000000000 +0200 @@ -340,7 +340,7 @@ goto leave; } - err = gpgme_op_verify (ctx, sig, text, &status); + err = gpgme_op_verify (ctx, sig, text, NULL, &status); if (err) { debug_print ("gpgme_op_verify failed: %s\n", gpgme_strerror (err)); goto leave; @@ -395,11 +395,11 @@ if (err) debug_print ("gpgme_data_rewind failed: %s\n", gpgme_strerror (err)); - while (!(err = gpgme_data_read (data, buf, 100, &nread))) { + while ((nread = gpgme_data_read (data, buf, 100)) > 0) { fwrite ( buf, nread, 1, fp ); } - if (err != GPGME_EOF) + if (nread != GPGME_EOF) debug_print ("gpgme_data_read failed: %s\n", gpgme_strerror (err)); fclose (fp); @@ -666,11 +666,11 @@ if (err) debug_print ("gpgme_data_rewind failed: %s\n", gpgme_strerror (err)); - while (!(err = gpgme_data_read (plain, buf, sizeof(buf), &nread))) { + while ((nread = gpgme_data_read (plain, buf, sizeof(buf))) > 0) { fwrite (buf, nread, 1, dstfp); } - if (err != GPGME_EOF) { + if (nread != GPGME_EOF) { debug_print ("gpgme_data_read failed: %s\n", gpgme_strerror (err)); } @@ -885,10 +885,10 @@ debug_print ("gpgme_data_rewind failed: %s\n", gpgme_strerror (err)); goto failure; } - while (!(err = gpgme_data_read (header, buf, BUFFSIZE, &nread))) { + while ((nread = gpgme_data_read (header, buf, BUFFSIZE)) > 0) { fwrite (buf, nread, 1, fp); } - if (err != GPGME_EOF) { + if (nread != GPGME_EOF) { debug_print ("gpgme_data_read failed: %s\n", gpgme_strerror (err)); goto failure; } @@ -931,10 +931,10 @@ goto failure; } - while (!(err = gpgme_data_read (cipher, buf, BUFFSIZE, &nread))) { + while ((nread = gpgme_data_read (cipher, buf, BUFFSIZE)) > 0) { fwrite (buf, nread, 1, fp); } - if (err != GPGME_EOF) { + if (nread != GPGME_EOF) { debug_print ("** gpgme_data_read failed: %s\n", gpgme_strerror (err)); goto failure; } @@ -1204,10 +1204,10 @@ err = gpgme_data_rewind (header); if (err) debug_print ("gpgme_data_rewind failed: %s\n", gpgme_strerror (err)); - while (!(err = gpgme_data_read (header, buf, BUFFSIZE, &nread))) { + while ((nread = gpgme_data_read (header, buf, BUFFSIZE)) > 0) { fwrite (buf, nread, 1, fp); } - if (err != GPGME_EOF) { + if (nread != GPGME_EOF) { debug_print ("gpgme_data_read failed: %s\n", gpgme_strerror (err)); goto failure; } @@ -1236,10 +1236,10 @@ gpgme_strerror (err)); goto failure; } - while (!(err = gpgme_data_read (plain, buf, BUFFSIZE, &nread))) { + while ((nread = gpgme_data_read (plain, buf, BUFFSIZE)) > 0) { fwrite (buf, nread, 1, fp); } - if (err != GPGME_EOF) { + if (nread != GPGME_EOF) { debug_print ("gpgme_data_read failed: %s\n", gpgme_strerror (err)); goto failure; } @@ -1258,10 +1258,10 @@ goto failure; } - while (!(err = gpgme_data_read (sigdata, buf, BUFFSIZE, &nread))) { + while ((nread = gpgme_data_read (sigdata, buf, BUFFSIZE)) > 0) { fwrite (buf, nread, 1, fp); } - if (err != GPGME_EOF) { + if (nread != GPGME_EOF) { debug_print ("gpgme_data_read failed: %s\n", gpgme_strerror (err)); goto failure; } @@ -1356,10 +1356,10 @@ goto failure; } - while (!(err = gpgme_data_read(sigdata, buf, sizeof(buf), &nread))) { + while ((nread = gpgme_data_read(sigdata, buf, sizeof(buf))) > 0) { fwrite(buf, nread, 1, fp); } - if (err != GPGME_EOF) { + if (nread != GPGME_EOF) { debug_print("gpgme_data_read failed: %s\n", gpgme_strerror(err)); goto failure; } --- sylpheed-0.9.0/src/main.c.orig 2003-08-03 02:40:06.000000000 +0200 +++ sylpheed-0.9.0/src/main.c 2003-08-03 02:34:24.000000000 +0200 @@ -231,7 +231,7 @@ prefs_common_read_config(); #if USE_GPGME - if (gpgme_check_engine()) { /* Also does some gpgme init */ + /*if (gpgme_check_engine()) { */ /* Also does some gpgme init */ rfc2015_disable_all(); debug_print("gpgme_engine_version:\n%s\n", gpgme_get_engine_info()); @@ -246,7 +246,7 @@ if (val & G_ALERTDISABLE) prefs_common.gpg_warning = FALSE; } - } + /* } */ gpgme_register_idle(idle_function_for_gpgme); #endif