summaryrefslogtreecommitdiffstats
path: root/crypto/bio/bio.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-09-20 13:55:50 +0000
committerRichard Levitte <levitte@openssl.org>2000-09-20 13:55:50 +0000
commit645749ef98612340b11c4bf2ba856e1fa469912b (patch)
tree3a93d71b7f63b5b01f085c38211ce82af0778125 /crypto/bio/bio.h
parent9a0c0d3f7441515452caff3380b235bb15d33a5e (diff)
On VMS, stdout may very well lead to a file that is written to in a
record-oriented fashion. That means that every write() will write a separate record, which will be read separately by the programs trying to read from it. This can be very confusing. The solution is to put a BIO filter in the way that will buffer text until a linefeed is reached, and then write everything a line at a time, so every record written will be an actual line, not chunks of lines and not (usually doesn't happen, but I've seen it once) several lines in one record. Voila, BIO_f_linebuffer() is born. Since we're so close to release time, I'm making this VMS-only for now, just to make sure no code is needlessly broken by this. After the release, this BIO method will be enabled on all other platforms as well.
Diffstat (limited to 'crypto/bio/bio.h')
-rw-r--r--crypto/bio/bio.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/bio/bio.h b/crypto/bio/bio.h
index b7ab206777..97003b503c 100644
--- a/crypto/bio/bio.h
+++ b/crypto/bio/bio.h
@@ -91,6 +91,7 @@ extern "C" {
#define BIO_TYPE_NULL_FILTER (17|0x0200)
#define BIO_TYPE_BER (18|0x0200) /* BER -> bin filter */
#define BIO_TYPE_BIO (19|0x0400) /* (half a) BIO pair */
+#define BIO_TYPE_LINEBUFFER (20|0x0200) /* filter */
#define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */
#define BIO_TYPE_FILTER 0x0200
@@ -554,6 +555,9 @@ BIO_METHOD *BIO_s_bio(void);
BIO_METHOD *BIO_s_null(void);
BIO_METHOD *BIO_f_null(void);
BIO_METHOD *BIO_f_buffer(void);
+#ifdef VMS
+BIO_METHOD *BIO_f_linebuffer(void);
+#endif
BIO_METHOD *BIO_f_nbio_test(void);
/* BIO_METHOD *BIO_f_ber(void); */
@@ -640,6 +644,7 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args);
#define BIO_F_CONN_CTRL 127
#define BIO_F_CONN_STATE 115
#define BIO_F_FILE_CTRL 116
+#define BIO_F_LINEBUFFER_CTRL 129
#define BIO_F_MEM_READ 128
#define BIO_F_MEM_WRITE 117
#define BIO_F_SSL_NEW 118