• Paul Eggert's avatar
    Get the Gnutls code compiling on Fedora 30 · 49a8c850
    Paul Eggert authored
    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.
    49a8c850
process.c 245 KB