Make cygwin work in directories mounted with 'text' attribute.
[openssl.git] / crypto / bio / bss_file.c
index ad4b301..9372768 100644 (file)
@@ -279,8 +279,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
                        _setmode(fd,_O_BINARY);
 #elif defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_CLIB)
                int fd = fileno((FILE*)ptr);
-         /* Under CLib there are differences in file modes
-         */
+               /* Under CLib there are differences in file modes */
                if (num & BIO_FP_TEXT)
                        _setmode(fd,O_TEXT);
                else
@@ -301,7 +300,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
                        else
                                _setmode(fd,_O_BINARY);
                        }
-#elif defined(OPENSSL_SYS_OS2)
+#elif defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_WIN32_CYGWIN)
                int fd = fileno((FILE*)ptr);
                if (num & BIO_FP_TEXT)
                        setmode(fd, O_TEXT);