Skip to content
Snippets Groups Projects
Commit 474b8a97 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Make cygwin work in directories mounted with 'text' attribute.

parent 53261831
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -408,6 +408,10 @@ static unsigned int _strlen31(const char *str)
# define setvbuf(a, b, c, d) setbuffer((a), (b), (d))
typedef unsigned long clock_t;
# endif
# ifdef OPENSSL_SYS_WIN32_CYGWIN
# include <io.h>
# include <fcntl.h>
# endif
# define OPENSSL_CONF "openssl.cnf"
# define SSLEAY_CONF OPENSSL_CONF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment