[Pkg-wmaker-commits] [wmbiff] 72/92: debian/patches: (fix_deprecated_gnutls_types.diff, fix_pointer_cast.diff) Fix compiler warnings.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Thu Aug 20 02:59:29 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmbiff.
commit f2ac5c0761c0144af9c0dbba3e72919b78bccbcc
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Wed Nov 5 20:53:04 2014 -0600
debian/patches: (fix_deprecated_gnutls_types.diff, fix_pointer_cast.diff) Fix compiler warnings.
---
debian/patches/fix_deprecated_gnutls_types.diff | 153 ++++++++++++++++++++++++
debian/patches/fix_pointer_cast.diff | 34 ++++++
debian/patches/series | 2 +
3 files changed, 189 insertions(+)
diff --git a/debian/patches/fix_deprecated_gnutls_types.diff b/debian/patches/fix_deprecated_gnutls_types.diff
new file mode 100644
index 0000000..0186d7a
--- /dev/null
+++ b/debian/patches/fix_deprecated_gnutls_types.diff
@@ -0,0 +1,153 @@
+Description: Fix deprecated gnutls types
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2014-11-05
+
+--- a/wmbiff/gnutls-common.h
++++ b/wmbiff/gnutls-common.h
+@@ -25,8 +25,8 @@
+
+ extern const char str_unknown[];
+
+-int print_info( gnutls_session state, const char* hostname);
+-void print_cert_info( gnutls_session state, const char* hostname);
++int print_info( gnutls_session_t state, const char* hostname);
++void print_cert_info( gnutls_session_t state, const char* hostname);
+ void print_list(void);
+
+ void parse_comp( char** comp, int ncomp, int* comp_priority);
+--- a/wmbiff/tlsComm.c
++++ b/wmbiff/tlsComm.c
+@@ -58,8 +58,8 @@
+ int sd;
+ char *name;
+ #ifdef USE_GNUTLS
+- gnutls_session tls_state;
+- gnutls_certificate_credentials xcred;
++ gnutls_session_t tls_state;
++ gnutls_certificate_credentials_t xcred;
+ #else
+ /*@null@ */ void *tls_state;
+ /*@null@ */ void *xcred;
+@@ -364,13 +364,13 @@
+ #define CERT_SEP "-----BEGIN"
+
+ /* this bit is based on read_ca_file() in gnutls */
+-static int tls_compare_certificates(const gnutls_datum * peercert)
++static int tls_compare_certificates(const gnutls_datum_t * peercert)
+ {
+- gnutls_datum cert;
++ gnutls_datum_t cert;
+ unsigned char *ptr;
+ FILE *fd1;
+ int ret;
+- gnutls_datum b64_data;
++ gnutls_datum_t b64_data;
+ unsigned char *b64_data_data;
+ struct stat filestat;
+
+@@ -427,9 +427,9 @@
+ {
+ int ret;
+ unsigned int certstat;
+- const gnutls_datum *cert_list;
++ const gnutls_datum_t *cert_list;
+ unsigned int cert_list_size = 0;
+- gnutls_x509_crt cert;
++ gnutls_x509_crt_t cert;
+
+ if (gnutls_auth_get_type(scs->tls_state) != GNUTLS_CRD_CERTIFICATE) {
+ bad_certificate(scs, "Unable to get certificate from peer.\n");
+@@ -598,7 +598,7 @@
+ gnutls_cred_set(scs->tls_state, GNUTLS_CRD_CERTIFICATE,
+ scs->xcred);
+ gnutls_transport_set_ptr(scs->tls_state,
+- (gnutls_transport_ptr) sd);
++ (gnutls_transport_ptr_t) sd);
+ do {
+ zok = gnutls_handshake(scs->tls_state);
+ }
+--- a/wmbiff/gnutls-common.c
++++ b/wmbiff/gnutls-common.c
+@@ -34,10 +34,10 @@
+
+ }
+
+-void print_x509_info(gnutls_session session, const char* hostname)
++void print_x509_info(gnutls_session_t session, const char* hostname)
+ {
+- gnutls_x509_crt crt;
+- const gnutls_datum *cert_list;
++ gnutls_x509_crt_t crt;
++ const gnutls_datum_t *cert_list;
+ unsigned int cert_list_size = 0;
+ int ret;
+ char digest[20];
+@@ -107,7 +107,7 @@
+
+ if (xml) {
+ #ifdef ENABLE_PKI
+- gnutls_datum xml_data;
++ gnutls_datum_t xml_data;
+
+ ret = gnutls_x509_crt_to_xml( crt, &xml_data, 0);
+ if (ret < 0) {
+@@ -200,7 +200,7 @@
+
+ #ifdef HAVE_LIBOPENCDK
+
+-void print_openpgp_info(gnutls_session session, const char* hostname)
++void print_openpgp_info(gnutls_session_t session, const char* hostname)
+ {
+
+ char digest[20];
+@@ -212,7 +212,7 @@
+ char name[256];
+ size_t name_len = sizeof(name);
+ gnutls_openpgp_key crt;
+- const gnutls_datum *cert_list;
++ const gnutls_datum_t *cert_list;
+ unsigned int cert_list_size = 0;
+ time_t expiret;
+ time_t activet;
+@@ -259,7 +259,7 @@
+ }
+
+ if (xml) {
+- gnutls_datum xml_data;
++ gnutls_datum_t xml_data;
+
+ ret = gnutls_openpgp_key_to_xml( crt, &xml_data, 0);
+ if (ret < 0) {
+@@ -332,7 +332,7 @@
+
+ #endif
+
+-void print_cert_vrfy(gnutls_session session)
++void print_cert_vrfy(gnutls_session_t session)
+ {
+
+ unsigned int status;
+@@ -369,11 +369,11 @@
+ }
+ }
+
+-int print_info(gnutls_session session, const char* hostname)
++int print_info(gnutls_session_t session, const char* hostname)
+ {
+ const char *tmp;
+- gnutls_credentials_type cred;
+- gnutls_kx_algorithm kx;
++ gnutls_credentials_type_t cred;
++ gnutls_kx_algorithm_t kx;
+
+
+ /* print the key exchange's algorithm name
+@@ -454,7 +454,7 @@
+ return 0;
+ }
+
+-void print_cert_info(gnutls_session session, const char* hostname)
++void print_cert_info(gnutls_session_t session, const char* hostname)
+ {
+
+ printf("- Certificate type: ");
diff --git a/debian/patches/fix_pointer_cast.diff b/debian/patches/fix_pointer_cast.diff
new file mode 100644
index 0000000..166119c
--- /dev/null
+++ b/debian/patches/fix_pointer_cast.diff
@@ -0,0 +1,34 @@
+Description: Fix cast to pointer from integer of different size warning.
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2014-11-05
+
+--- a/wmbiff/tlsComm.c
++++ b/wmbiff/tlsComm.c
+@@ -539,7 +539,7 @@
+ return;
+ }
+
+-struct connection_state *initialize_gnutls(int sd, char *name, Pop3 pc,
++struct connection_state *initialize_gnutls(intptr_t sd, char *name, Pop3 pc,
+ const char *remote_hostname)
+ {
+ static int gnutls_initialized;
+--- a/wmbiff/tlsComm.h
++++ b/wmbiff/tlsComm.h
+@@ -9,6 +9,7 @@
+ */
+
+ /* used to drill through per-mailbox debug keys */
++#include <stdint.h>
+ #include "Client.h"
+
+ /* opaque reference to the state associated with a
+@@ -19,7 +20,7 @@
+ /* take a socket descriptor and negotiate a TLS connection
+ over it */
+ /*@only@*/
+-struct connection_state *initialize_gnutls(int sd, /*@only@ */ char *name,
++struct connection_state *initialize_gnutls(intptr_t sd, /*@only@ */ char *name,
+ Pop3 pc, const char *hostname);
+
+ /* take a socket descriptor and bundle it into a connection
diff --git a/debian/patches/series b/debian/patches/series
index 1d47a1c..e141a48 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,5 @@
15_no_more_LZO.diff
update_autotools.diff
fix_manpage.diff
+fix_deprecated_gnutls_types.diff
+fix_pointer_cast.diff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git
More information about the Pkg-wmaker-commits
mailing list