Skip to content

Commit

Permalink
Make cygwin work in directories mounted with 'text' attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Polyakov committed Nov 3, 2005
1 parent 5326183 commit 474b8a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crypto/bio/bss_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions e_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 474b8a9

Please sign in to comment.