ifdef cleanup, 2 remove OPENSSL_NO_SETVBUF_IONBF
Use setbuf(fp, NULL) instead of setvbuf(). This removes some ifdef complexity because all of our platforms support setbuf. Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
@@ -396,10 +396,8 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (inf == NULL) {
|
||||
#ifndef OPENSSL_NO_SETVBUF_IONBF
|
||||
if (bufsize != NULL)
|
||||
setvbuf(stdin, (char *)NULL, _IONBF, 0);
|
||||
#endif /* ndef OPENSSL_NO_SETVBUF_IONBF */
|
||||
setbuf(stdin, NULL);
|
||||
BIO_set_fp(in, stdin, BIO_NOCLOSE);
|
||||
} else {
|
||||
if (BIO_read_filename(in, inf) <= 0) {
|
||||
@@ -442,10 +440,8 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
if (outf == NULL) {
|
||||
BIO_set_fp(out, stdout, BIO_NOCLOSE);
|
||||
#ifndef OPENSSL_NO_SETVBUF_IONBF
|
||||
if (bufsize != NULL)
|
||||
setvbuf(stdout, (char *)NULL, _IONBF, 0);
|
||||
#endif /* ndef OPENSSL_NO_SETVBUF_IONBF */
|
||||
setbuf(stdin, NULL); /* don't do buffered reads */
|
||||
#ifdef OPENSSL_SYS_VMS
|
||||
{
|
||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||
|
||||
Reference in New Issue
Block a user