Fix non-blocking GnuTLS with slow connection
commit1a8d31123698ccf6f165e49fcfe16631d07a7aea
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 3 Aug 2016 08:54:20 +0000 (3 01:54 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 3 Aug 2016 08:55:49 +0000 (3 01:55 -0700)
treeb8570bf5d4ea0f92f8c516f3ffc70d2beb61783d
parent64edd14ca9cf6d1b957316a9a547e482c9ba811b
Fix non-blocking GnuTLS with slow connection

Although the problem is reported for OS X (Bug#23982), it seems to
be possible on other POSIXish platforms.
* src/gnutls.c (emacs_gnutls_nonblock_errno) [!WINDOWSNT]:
New function.
(emacs_gnutls_handshake) [!WINDOWSNT]:
Use it as the errno function, if non-blocking.
(Fgnutls_boot): Use GNUTLS_NONBLOCK if non-blocking.
src/gnutls.c