summaryrefslogtreecommitdiff
path: root/lib/system_override.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-04-11 00:01:05 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2011-04-11 00:01:05 +0200
commit875f93f0e849a25a5428cc11448246b3c35dc04d (patch)
tree307a0d4d847302bbe1b7f2693b9e12543945e417 /lib/system_override.c
parent9de39deefebcf28fafe301337a71f1f69e6b5a01 (diff)
downloadgnutls-875f93f0e849a25a5428cc11448246b3c35dc04d.tar.gz
gnutls_transport_set_global_errno() is no more.
Diffstat (limited to 'lib/system_override.c')
-rw-r--r--lib/system_override.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/lib/system_override.c b/lib/system_override.c
index e2a284c905..44aec97d0e 100644
--- a/lib/system_override.c
+++ b/lib/system_override.c
@@ -58,9 +58,6 @@
* variable that is used by GnuTLS (e.g., the application is linked to
* msvcr71.dll and gnutls is linked to msvcrt.dll).
*
- * If you don't have the @session variable easily accessible from the
- * push/pull function, and don't worry about thread conflicts, you can
- * also use gnutls_transport_set_global_errno().
**/
void
gnutls_transport_set_errno (gnutls_session_t session, int err)
@@ -69,49 +66,6 @@ gnutls_transport_set_errno (gnutls_session_t session, int err)
}
/**
- * gnutls_transport_set_global_errno:
- * @err: error value to store in global errno variable.
- *
- * Store @err in the global errno variable. Useful values for @err is
- * EAGAIN and EINTR, other values are treated will be treated as real
- * errors in the push/pull function.
- *
- * This function is useful in replacement push/pull functions set by
- * gnutls_transport_set_push_function and
- * gnutls_transport_set_pullpush_function under Windows, where the
- * replacement push/pull may not have access to the same @errno
- * variable that is used by GnuTLS (e.g., the application is linked to
- * msvcr71.dll and gnutls is linked to msvcrt.dll).
- *
- * Whether this function is thread safe or not depends on whether the
- * global variable errno is thread safe, some system libraries make it
- * a thread-local variable. When feasible, using the guaranteed
- * thread-safe gnutls_transport_set_errno() may be better.
- **/
-void
-gnutls_transport_set_global_errno (int err)
-{
-#ifdef _WIN32
- /* Keep this in sync with system_errno */
- switch (err)
- {
- case EAGAIN:
- SetLastError (WSAEWOULDBLOCK);
- break;
- case EINTR:
- SetLastError (WSAEINTR);
- break;
- default:
- /* We don't care about anything else */
- SetLastError (NO_ERROR);
- break;
- }
-#else
- errno = err;
-#endif
-}
-
-/**
* gnutls_transport_set_pull_function:
* @session: is a #gnutls_session_t structure.
* @pull_func: a callback function similar to read()