diff options
author | Rob Percival <robpercival@google.com> | 2016-02-12 15:12:37 +0000 |
---|---|---|
committer | Ben Laurie <ben@links.org> | 2016-02-13 10:22:54 +0000 |
commit | e634b448c3113545ff5f9a70e74a0ce694a00e77 (patch) | |
tree | 3a2ee48ff95eed9674d16cda8f22860d9d378cff /crypto/bio | |
parent | ce3d25d3e5a7e82fd59fd30dff7acc39baed8b5e (diff) | |
download | openssl-e634b448c3113545ff5f9a70e74a0ce694a00e77.zip openssl-e634b448c3113545ff5f9a70e74a0ce694a00e77.tar.gz openssl-e634b448c3113545ff5f9a70e74a0ce694a00e77.tar.bz2 |
Defines OSSL_SSIZE_MAX
Removes SSIZE_MAX definition from bss_bio.c and changes that file to use
OSSL_SSIZE_MAX.
No need to account for OPENSSL_SYS_VXWORKS, since that never actually
gets defined anywhere. It must be a historical artifact.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Ben Laurie <ben@openssl.org>
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/bss_bio.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/crypto/bio/bss_bio.c b/crypto/bio/bss_bio.c index 743a158..4caa233 100644 --- a/crypto/bio/bss_bio.c +++ b/crypto/bio/bss_bio.c @@ -71,14 +71,6 @@ #include "e_os.h" -/* VxWorks defines SSIZE_MAX with an empty value causing compile errors */ -#if defined(OPENSSL_SYS_VXWORKS) -# undef SSIZE_MAX -#endif -#ifndef SSIZE_MAX -# define SSIZE_MAX INT_MAX -#endif - static int bio_new(BIO *bio); static int bio_free(BIO *bio); static int bio_read(BIO *bio, char *buf, int size); @@ -294,8 +286,8 @@ static ossl_ssize_t bio_nread(BIO *bio, char **buf, size_t num_) struct bio_bio_st *b, *peer_b; ossl_ssize_t num, available; - if (num_ > SSIZE_MAX) - num = SSIZE_MAX; + if (num_ > OSSL_SSIZE_MAX) + num = OSSL_SSIZE_MAX; else num = (ossl_ssize_t) num_; @@ -450,8 +442,8 @@ static ossl_ssize_t bio_nwrite(BIO *bio, char **buf, size_t num_) struct bio_bio_st *b; ossl_ssize_t num, space; - if (num_ > SSIZE_MAX) - num = SSIZE_MAX; + if (num_ > OSSL_SSIZE_MAX) + num = OSSL_SSIZE_MAX; else num = (ossl_ssize_t) num_; |