Revert "Work around Windows ftell() bug as per Microsoft engineering's suggestion"
This reverts commit 8300a8742b
.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25716)
This commit is contained in:
parent
a69288d04a
commit
ed3ce75457
1 changed files with 0 additions and 9 deletions
|
@ -235,15 +235,6 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||
_setmode(fd, _O_TEXT);
|
||||
else
|
||||
_setmode(fd, _O_BINARY);
|
||||
/*
|
||||
* Reports show that ftell() isn't trustable in text mode.
|
||||
* This has been confirmed as a bug in the Universal C RTL, see
|
||||
* https://developercommunity.visualstudio.com/content/problem/425878/fseek-ftell-fail-in-text-mode-for-unix-style-text.html
|
||||
* The suggested work-around from Microsoft engineering is to
|
||||
* turn off buffering until the bug is resolved.
|
||||
*/
|
||||
if ((num & BIO_FP_TEXT) != 0)
|
||||
setvbuf((FILE *)ptr, NULL, _IONBF, 0);
|
||||
# elif defined(OPENSSL_SYS_MSDOS)
|
||||
int fd = fileno((FILE *)ptr);
|
||||
/* Set correct text/binary mode */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue