Index: openssl/crypto/des/enc_read.c |
=================================================================== |
--- openssl/crypto/des/enc_read.c (revision 105093) |
+++ openssl/crypto/des/enc_read.c (working copy) |
@@ -63,7 +63,7 @@ |
/* This has some uglies in it but it works - even over sockets. */ |
/*extern int errno;*/ |
-OPENSSL_IMPLEMENT_GLOBAL(int,DES_rw_mode)=DES_PCBC_MODE; |
+OPENSSL_IMPLEMENT_GLOBAL(int,DES_rw_mode,DES_PCBC_MODE) |
/* |
@@ -87,6 +87,9 @@ |
int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched, |
DES_cblock *iv) |
{ |
+#if defined(OPENSSL_NO_POSIX_IO) |
+ return(0); |
+#else |
/* data to be unencrypted */ |
int net_num=0; |
static unsigned char *net=NULL; |
@@ -147,7 +150,7 @@ |
/* first - get the length */ |
while (net_num < HDRSIZE) |
{ |
-#ifndef _WIN32 |
+#ifndef OPENSSL_SYS_WIN32 |
i=read(fd,(void *)&(net[net_num]),HDRSIZE-net_num); |
#else |
i=_read(fd,(void *)&(net[net_num]),HDRSIZE-net_num); |
@@ -173,7 +176,11 @@ |
net_num=0; |
while (net_num < rnum) |
{ |
+#ifndef OPENSSL_SYS_WIN32 |
i=read(fd,(void *)&(net[net_num]),rnum-net_num); |
+#else |
+ i=_read(fd,(void *)&(net[net_num]),rnum-net_num); |
+#endif |
#ifdef EINTR |
if ((i == -1) && (errno == EINTR)) continue; |
#endif |
@@ -228,5 +235,6 @@ |
} |
} |
return num; |
+#endif /* OPENSSL_NO_POSIX_IO */ |
} |