Reserve for OPENSSL_NO_POSIX_IO macro which is to eliminate references
authorAndy Polyakov <appro@openssl.org>
Thu, 3 Nov 2005 15:50:50 +0000 (15:50 +0000)
committerAndy Polyakov <appro@openssl.org>
Thu, 3 Nov 2005 15:50:50 +0000 (15:50 +0000)
to open/read/write/close. First OPENSSL_NO_POSIX_IO target would be
Windows CE.

crypto/bio/bss_fd.c
crypto/des/enc_read.c
crypto/des/enc_writ.c

index 5786ed495b6b8948c1c694da05fc63bf57ca284d..c4be18470f40b9f215ba2edf0df26dd5b8b49d6d 100644 (file)
  * [including the GNU Public Licence.]
  */
 
-#if !defined(_WIN32_WCE)
-
 #include <stdio.h>
 #include <errno.h>
 #define USE_SOCKETS
 #include "cryptlib.h"
+
+#if defined(OPENSSL_NO_POSIX_IO)
+/*
+ * One can argue that one should implement dummy placeholder for
+ * BIO_s_fd here...
+ */
+#else
 /*
  * As for unconditional usage of "UPLINK" interface in this module.
  * Trouble is that unlike Unix file descriptors [which are indexes
index c70fb686b8b02b26815fd950279f9b39493eae60..ce82125b6f52e2efed49d1cd324c92fc7f46bd45 100644 (file)
@@ -87,6 +87,9 @@ OPENSSL_IMPLEMENT_GLOBAL(int,DES_rw_mode)=DES_PCBC_MODE;
 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;
@@ -224,5 +227,6 @@ int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,
                        }
                }
        return num;
+#endif /* OPENSSL_NO_POSIX_IO */
        }
 
index af5b8c2349bba80fd02dba4d0314fb0e3d3819aa..6e25b6d4f048e32e5cd123f065a9bd46c354fbea 100644 (file)
@@ -80,6 +80,9 @@
 int DES_enc_write(int fd, const void *_buf, int len,
                  DES_key_schedule *sched, DES_cblock *iv)
        {
+#if defined(OPENSSL_NO_POSIX_IO)
+       return (-1);
+#else
 #ifdef _LIBC
        extern unsigned long time();
        extern int write();
@@ -168,4 +171,5 @@ int DES_enc_write(int fd, const void *_buf, int len,
                }
 
        return(len);
+#endif /* OPENSSL_NO_POSIX_IO */
        }