[openssl] master update

Richard Levitte levitte at openssl.org
Mon Feb 18 20:10:45 UTC 2019


The branch master has been updated
       via  9b57e4a1ef356420367d843f1ba96037f88316b8 (commit)
      from  1ad2d9404dcd97372c0dc2709a598ee0f0a79620 (commit)


- Log -----------------------------------------------------------------
commit 9b57e4a1ef356420367d843f1ba96037f88316b8
Author: Corinna Vinschen <vinschen at redhat.com>
Date:   Fri Feb 15 12:24:47 2019 +0100

    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 at redhat.com>
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/8248)

-----------------------------------------------------------------------

Summary of changes:
 crypto/bio/bss_file.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c
index a2b8700..93ba006 100644
--- a/crypto/bio/bss_file.c
+++ b/crypto/bio/bss_file.c
@@ -253,9 +253,7 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr)
             }
 #  elif defined(OPENSSL_SYS_WIN32_CYGWIN)
             int fd = fileno((FILE *)ptr);
-            if (num & BIO_FP_TEXT)
-                setmode(fd, O_TEXT);
-            else
+            if (!(num & BIO_FP_TEXT))
                 setmode(fd, O_BINARY);
 #  endif
         }
@@ -279,11 +277,14 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr)
             ret = 0;
             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))
             OPENSSL_strlcat(p, "b", sizeof(p));
         else
             OPENSSL_strlcat(p, "t", sizeof(p));
+#  elif defined(OPENSSL_SYS_WIN32_CYGWIN)
+        if (!(num & BIO_FP_TEXT))
+            OPENSSL_strlcat(p, "b", sizeof(p));
 #  endif
         fp = openssl_fopen(ptr, p);
         if (fp == NULL) {


More information about the openssl-commits mailing list