Nuke more defines - we have setvbuf() and _IONBF.
authorjsing <jsing@openbsd.org>
Sat, 3 May 2014 16:03:54 +0000 (16:03 +0000)
committerjsing <jsing@openbsd.org>
Sat, 3 May 2014 16:03:54 +0000 (16:03 +0000)
ok deraadt@

lib/libssl/src/apps/apps.c
lib/libssl/src/apps/enc.c

index 259981e..5e6b94f 100644 (file)
@@ -615,11 +615,7 @@ load_cert(BIO * err, const char *file, int format, const char *pass, ENGINE * e,
                goto end;
        }
        if (file == NULL) {
-#ifdef _IONBF
-#ifndef OPENSSL_NO_SETVBUF_IONBF
                setvbuf(stdin, NULL, _IONBF, 0);
-#endif                         /* ndef OPENSSL_NO_SETVBUF_IONBF */
-#endif
                BIO_set_fp(cert, stdin, BIO_NOCLOSE);
        } else {
                if (BIO_read_filename(cert, file) <= 0) {
@@ -709,11 +705,7 @@ load_key(BIO * err, const char *file, int format, int maybe_stdin,
                goto end;
        }
        if (file == NULL && maybe_stdin) {
-#ifdef _IONBF
-#ifndef OPENSSL_NO_SETVBUF_IONBF
                setvbuf(stdin, NULL, _IONBF, 0);
-#endif                         /* ndef OPENSSL_NO_SETVBUF_IONBF */
-#endif
                BIO_set_fp(key, stdin, BIO_NOCLOSE);
        } else if (BIO_read_filename(key, file) <= 0) {
                BIO_printf(err, "Error opening %s %s\n",
@@ -789,11 +781,7 @@ load_pubkey(BIO * err, const char *file, int format, int maybe_stdin,
                goto end;
        }
        if (file == NULL && maybe_stdin) {
-#ifdef _IONBF
-#ifndef OPENSSL_NO_SETVBUF_IONBF
                setvbuf(stdin, NULL, _IONBF, 0);
-#endif                         /* ndef OPENSSL_NO_SETVBUF_IONBF */
-#endif
                BIO_set_fp(key, stdin, BIO_NOCLOSE);
        } else if (BIO_read_filename(key, file) <= 0) {
                BIO_printf(err, "Error opening %s %s\n", key_descrip, file);
index eb98662..cda196a 100644 (file)
@@ -363,10 +363,8 @@ enc_main(int argc, char **argv)
                BIO_set_callback_arg(out, (char *) bio_err);
        }
        if (inf == NULL) {
-#ifndef OPENSSL_NO_SETVBUF_IONBF
                if (bufsize != NULL)
                        setvbuf(stdin, (char *) NULL, _IONBF, 0);
-#endif                         /* ndef OPENSSL_NO_SETVBUF_IONBF */
                BIO_set_fp(in, stdin, BIO_NOCLOSE);
        } else {
                if (BIO_read_filename(in, inf) <= 0) {
@@ -412,10 +410,8 @@ enc_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 */
        } else {
                if (BIO_write_filename(out, outf) <= 0) {
                        perror(outf);