Debian Codegraph @

debian/rust-vendor/aws-lc-sys/aws-lc/crypto/bio/errno.c

raw
1 // Copyright (C) 1995-1998 Eric Young ([email protected]) All rights reserved.
2 // SPDX-License-Identifier: Apache-2.0
3
4 #include <openssl/bio.h>
5
6 #include <errno.h>
7
8 #include "internal.h"
9
10
11 int bio_errno_should_retry(int return_value) {
12 if (return_value != -1) {
13 return 0;
14 }
15
16 return
17 #ifdef EWOULDBLOCK
18 errno == EWOULDBLOCK ||
19 #endif
20 #ifdef ENOTCONN
21 errno == ENOTCONN ||
22 #endif
23 #ifdef EINTR
24 errno == EINTR ||
25 #endif
26 #ifdef EAGAIN
27 errno == EAGAIN ||
28 #endif
29 #ifdef EPROTO
30 errno == EPROTO ||
31 #endif
32 #ifdef EINPROGRESS
33 errno == EINPROGRESS ||
34 #endif
35 #ifdef EALREADY
36 errno == EALREADY ||
37 #endif
38 0;
39 }