From: Andy Polyakov Date: Thu, 3 Nov 2005 16:43:53 +0000 (+0000) Subject: Make cygwin work in directories mounted with 'text' attribute. X-Git-Tag: OpenSSL_0_9_8k^2~1729 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=474b8a9716b184176e385d7c31f83ba78da5a21b;p=oweals%2Fopenssl.git Make cygwin work in directories mounted with 'text' attribute. --- diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c index ad4b301388..93727685cf 100644 --- a/crypto/bio/bss_file.c +++ b/crypto/bio/bss_file.c @@ -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); diff --git a/e_os.h b/e_os.h index 5068d1bd74..25e9e625f0 100644 --- a/e_os.h +++ b/e_os.h @@ -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 +# include +# endif # define OPENSSL_CONF "openssl.cnf" # define SSLEAY_CONF OPENSSL_CONF