mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
cygwin: drop explicit O_TEXT
Cygwin binaries should not enforce text mode these days, just use text mode if the underlying mount point requests it CLA: trivial Signed-off-by: Corinna Vinschen <vinschen@redhat.com> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8248)
This commit is contained in:
parent
1ad2d9404d
commit
9b57e4a1ef
@ -253,9 +253,7 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
}
|
}
|
||||||
# elif defined(OPENSSL_SYS_WIN32_CYGWIN)
|
# elif defined(OPENSSL_SYS_WIN32_CYGWIN)
|
||||||
int fd = fileno((FILE *)ptr);
|
int fd = fileno((FILE *)ptr);
|
||||||
if (num & BIO_FP_TEXT)
|
if (!(num & BIO_FP_TEXT))
|
||||||
setmode(fd, O_TEXT);
|
|
||||||
else
|
|
||||||
setmode(fd, O_BINARY);
|
setmode(fd, O_BINARY);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
@ -279,11 +277,14 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
# if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32_CYGWIN)
|
# if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS)
|
||||||
if (!(num & BIO_FP_TEXT))
|
if (!(num & BIO_FP_TEXT))
|
||||||
OPENSSL_strlcat(p, "b", sizeof(p));
|
OPENSSL_strlcat(p, "b", sizeof(p));
|
||||||
else
|
else
|
||||||
OPENSSL_strlcat(p, "t", sizeof(p));
|
OPENSSL_strlcat(p, "t", sizeof(p));
|
||||||
|
# elif defined(OPENSSL_SYS_WIN32_CYGWIN)
|
||||||
|
if (!(num & BIO_FP_TEXT))
|
||||||
|
OPENSSL_strlcat(p, "b", sizeof(p));
|
||||||
# endif
|
# endif
|
||||||
fp = openssl_fopen(ptr, p);
|
fp = openssl_fopen(ptr, p);
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user