From 49a8c8506a8477fd27ba924f14aa196e0d0813f9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 23 Aug 2019 01:11:12 -0700 Subject: Get the Gnutls code compiling on Fedora 30 The recent changes caused the build to fail on Fedora 30 when built with --enable-gcc-warnings, among other things with diagnostics that gnutls_compression_get and gnutls_compression_get_name are deprecated (this started with GnuTLS 3.6). Fix this by refusing to call these obsolescent and now-dummy functions in GnuTLS 3.6 and later. However, this is just a temporary workaround to get the build working; a real fix is needed, as network-stream-tests fail. * src/gnutls.c (HAVE_GNUTLS_COMPRESSION_GET): New macro. (gnutls_compression_get, gnutls_compression_get_name): Define only if HAVE_GNUTLS_COMPRESSION_GET. (init_gnutls_functions): Load the two functions only if HAVE_GNUTLS_COMPRESSION_GET. (emacs_gnutls_certificate_export_pem): Use alloca instead of xmalloc. (Fgnutls_peer_status): Just return "NULL" if the functions are deprecated. (Fgnutls_format_certificate): Fix pointer signedness glitches. * src/process.c: Fix spacing. --- src/process.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'src/process.c') diff --git a/src/process.c b/src/process.c index 7097b7ace17..c3cc78afa28 100644 --- a/src/process.c +++ b/src/process.c @@ -4120,10 +4120,8 @@ usage: (make-network-process &rest ARGS) */) hints.ai_socktype = socktype; msg = network_lookup_address_info_1 (host, portstring, &hints, &res); - if (!EQ(msg, Qt)) - { - error ("%s", SSDATA (msg)); - } + if (!EQ (msg, Qt)) + error ("%s", SSDATA (msg)); for (lres = res; lres; lres = lres->ai_next) addrinfos = Fcons (conv_addrinfo_to_lisp (lres), addrinfos); @@ -4593,10 +4591,12 @@ network_lookup_address_info_1 (Lisp_Object host, const char *service, str = SSDATA (code_convert_string_norecord (build_string (str), Vlocale_coding_system, 0)); AUTO_STRING (format, "%s/%s %s"); - msg = CALLN (Fformat, format, host, build_string (service), build_string (str)); + msg = CALLN (Fformat, format, host, build_string (service), + build_string (str)); #else AUTO_STRING (format, "%s/%s getaddrinfo error %d"); - msg = CALLN (Fformat, format, host, build_string (service), make_number (ret)); + msg = CALLN (Fformat, format, host, build_string (service), + make_number (ret)); #endif } return msg; @@ -4634,18 +4634,14 @@ nil if none were found. Each address is a vector of integers. */) hints.ai_socktype = SOCK_DGRAM; msg = network_lookup_address_info_1 (name, NULL, &hints, &res); - if (!EQ(msg, Qt)) - { - message ("%s", SSDATA(msg)); - } + if (!EQ (msg, Qt)) + message ("%s", SSDATA(msg)); else { for (lres = res; lres; lres = lres->ai_next) - { - addresses = Fcons (conv_sockaddr_to_lisp - (lres->ai_addr, lres->ai_addrlen), - addresses); - } + addresses = Fcons (conv_sockaddr_to_lisp (lres->ai_addr, + lres->ai_addrlen), + addresses); addresses = Fnreverse (addresses); freeaddrinfo (res); -- cgit v1.2.1