X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fbio%2Fbss_bio.c;h=4caa2331ffd4b289d52b5a1cafb2fc4b9c91945e;hp=144cde93a3e1bde217cf024ea5829842dee5fd41;hb=e634b448c3113545ff5f9a70e74a0ce694a00e77;hpb=31384753c770b2d77dd9d54a19145d25498cf859 diff --git a/crypto/bio/bss_bio.c b/crypto/bio/bss_bio.c index 144cde93a3..4caa2331ff 100644 --- a/crypto/bio/bss_bio.c +++ b/crypto/bio/bss_bio.c @@ -1,4 +1,3 @@ -/* crypto/bio/bss_bio.c */ /* ==================================================================== * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved. * @@ -61,20 +60,6 @@ * See ssl/ssltest.c for some hints on how this can be used. */ -/* BIO_DEBUG implies BIO_PAIR_DEBUG */ -#ifdef BIO_DEBUG -# ifndef BIO_PAIR_DEBUG -# define BIO_PAIR_DEBUG -# endif -#endif - -/* disable assert() unless BIO_PAIR_DEBUG has been defined */ -#ifndef BIO_PAIR_DEBUG -# ifndef NDEBUG -# define NDEBUG -# endif -#endif - #include #include #include @@ -86,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); @@ -309,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_; @@ -465,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_;