summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/bio/bss_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/bio/bss_file.c')
-rw-r--r--crypto/openssl/crypto/bio/bss_file.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/crypto/openssl/crypto/bio/bss_file.c b/crypto/openssl/crypto/bio/bss_file.c
index b277367..9ad46fa 100644
--- a/crypto/openssl/crypto/bio/bss_file.c
+++ b/crypto/openssl/crypto/bio/bss_file.c
@@ -89,6 +89,10 @@
#include "bio_lcl.h"
#include <openssl/err.h>
+#if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_CLIB)
+#include <nwfileio.h>
+#endif
+
#if !defined(OPENSSL_NO_STDIO)
static int MS_CALLBACK file_write(BIO *h, const char *buf, int num);
@@ -275,7 +279,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
#endif
{
#if defined(OPENSSL_SYS_WINDOWS)
- int fd = fileno((FILE*)ptr);
+ int fd = _fileno((FILE*)ptr);
if (num & BIO_FP_TEXT)
_setmode(fd,_O_TEXT);
else
@@ -285,9 +289,9 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
/* Under CLib there are differences in file modes
*/
if (num & BIO_FP_TEXT)
- _setmode(fd,O_TEXT);
+ setmode(fd,O_TEXT);
else
- _setmode(fd,O_BINARY);
+ setmode(fd,O_BINARY);
#elif defined(OPENSSL_SYS_MSDOS)
int fd = fileno((FILE*)ptr);
/* Set correct text/binary mode */
OpenPOWER on IntegriCloud