From: Simon Josefsson Date: Fri, 28 Aug 2009 13:22:03 +0000 (+0200) Subject: Fix use of deprecated types, for now and the future. X-Git-Tag: gnutls_2_9_4~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eff570b8fdba308c2d4dc2ea397f397d2968edbe;p=thirdparty%2Fgnutls.git Fix use of deprecated types, for now and the future. --- diff --git a/configure.ac b/configure.ac index 21bc441b08..b18f64407c 100644 --- a/configure.ac +++ b/configure.ac @@ -240,6 +240,8 @@ export WSTACK_CFLAGS export WARN_CFLAGS export use_cxx +AC_DEFINE([GNUTLS_COMPAT_H], 1, [Make sure we don't use old features in code.]) + AC_CONFIG_SUBDIRS([lib]) AC_CONFIG_SUBDIRS([libextra]) diff --git a/lib/configure.ac b/lib/configure.ac index 68b509d2d4..c21acde5a7 100644 --- a/lib/configure.ac +++ b/lib/configure.ac @@ -93,6 +93,8 @@ AC_SUBST([WARN_CFLAGS]) AC_PROG_CXX AM_CONDITIONAL(ENABLE_CXX, test "$use_cxx" != "no") +AC_DEFINE([GNUTLS_COMPAT_H], 1, [Make sure we don't use old features in code.]) + AC_CONFIG_FILES([ Makefile gnutls.pc diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index 840084e0bb..7c10fbbc67 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -314,7 +314,7 @@ _gnutls_negotiate_version (gnutls_session_t session, } int -_gnutls_user_hello_func (gnutls_session session, +_gnutls_user_hello_func (gnutls_session_t session, gnutls_protocol_t adv_version) { int ret; diff --git a/lib/gnutls_handshake.h b/lib/gnutls_handshake.h index 5cff279add..f1b1bd66cc 100644 --- a/lib/gnutls_handshake.h +++ b/lib/gnutls_handshake.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation + * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation * * Author: Nikos Mavrogiannopoulos * @@ -50,8 +50,10 @@ int _gnutls_find_pk_algos_in_ciphersuites (opaque * data, int datalen); int _gnutls_server_select_suite (gnutls_session_t session, opaque * data, int datalen); -int _gnutls_negotiate_version( gnutls_session_t session, gnutls_protocol_t adv_version); -int _gnutls_user_hello_func( gnutls_session, gnutls_protocol_t adv_version); +int _gnutls_negotiate_version (gnutls_session_t session, + gnutls_protocol_t adv_version); +int _gnutls_user_hello_func (gnutls_session_t session, + gnutls_protocol_t adv_version); #define STATE session->internals.handshake_state /* This returns true if we have got there diff --git a/lib/gnutls_str.h b/lib/gnutls_str.h index 8b4910e908..cf5b2f742d 100644 --- a/lib/gnutls_str.h +++ b/lib/gnutls_str.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation + * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation * * Author: Nikos Mavrogiannopoulos * @@ -53,7 +53,7 @@ int _gnutls_string_append_data (gnutls_string *, const void *data, size_t data_size); void _gnutls_string_get_data( gnutls_string *, void*, size_t *size); -void _gnutls_string_get_datum( gnutls_string *, gnutls_datum*, size_t max_size); +void _gnutls_string_get_datum( gnutls_string *, gnutls_datum_t *, size_t max_size); #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ diff --git a/lib/opencdk/Makefile.am b/lib/opencdk/Makefile.am index dbf536a6cc..67d94db6c1 100644 --- a/lib/opencdk/Makefile.am +++ b/lib/opencdk/Makefile.am @@ -21,10 +21,10 @@ # MA 02110-1301, USA AM_CPPFLAGS = \ - -I$(srcdir)/../gl \ - -I$(builddir)/../gl \ - -I$(srcdir)/../includes \ - -I$(builddir)/../includes \ + -I$(srcdir)/../gl \ + -I$(builddir)/../gl \ + -I$(srcdir)/../includes \ + -I$(builddir)/../includes \ -I$(srcdir)/.. if ENABLE_MINITASN1 diff --git a/lib/x509/privkey_pkcs8.c b/lib/x509/privkey_pkcs8.c index cd676e841c..faeb298db6 100644 --- a/lib/x509/privkey_pkcs8.c +++ b/lib/x509/privkey_pkcs8.c @@ -126,7 +126,7 @@ check_schema (const char *oid) * an ASN.1 INTEGER of the x value. */ inline static int -_encode_privkey (gnutls_x509_privkey pkey, gnutls_datum_t * raw) +_encode_privkey (gnutls_x509_privkey_t pkey, gnutls_datum_t * raw) { size_t size = 0; opaque *data = NULL; @@ -853,7 +853,7 @@ error: /* Decodes an RSA privateKey from a PKCS8 structure. */ static int -_decode_pkcs8_rsa_key (ASN1_TYPE pkcs8_asn, gnutls_x509_privkey pkey) +_decode_pkcs8_rsa_key (ASN1_TYPE pkcs8_asn, gnutls_x509_privkey_t pkey) { int ret; gnutls_datum_t tmp; @@ -883,7 +883,7 @@ error: /* Decodes an DSA privateKey and params from a PKCS8 structure. */ static int -_decode_pkcs8_dsa_key (ASN1_TYPE pkcs8_asn, gnutls_x509_privkey pkey) +_decode_pkcs8_dsa_key (ASN1_TYPE pkcs8_asn, gnutls_x509_privkey_t pkey) { int ret; gnutls_datum_t tmp; diff --git a/libextra/configure.ac b/libextra/configure.ac index 837c68ff01..c3f594b345 100644 --- a/libextra/configure.ac +++ b/libextra/configure.ac @@ -50,6 +50,8 @@ AC_SUBST([WERROR_CFLAGS]) AC_SUBST([WSTACK_CFLAGS]) AC_SUBST([WARN_CFLAGS]) +AC_DEFINE([GNUTLS_COMPAT_H], 1, [Make sure we don't use old features in code.]) + AC_CONFIG_FILES([ Makefile gnutls-extra.pc