summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>1999-06-09 13:23:38 +0000
committerBodo Möller <bodo@openssl.org>1999-06-09 13:23:38 +0000
commite766a681aa4df604b20ce2d23cd131b74af9eaf7 (patch)
tree6ab2ba6c2881f49cb0ec8091d04100eef3653c84 /crypto
parent9e952fc8770bf72b03fdd7acf6a1843070b44b4b (diff)
downloadopenssl-new-e766a681aa4df604b20ce2d23cd131b74af9eaf7.tar.gz
Some pre-POSIX systems don't have unistd.h (but e.g. lib.c).
Allow configuring the name of that header file.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bf/bf_opts.c11
-rw-r--r--crypto/bf/bfspeed.c11
-rw-r--r--crypto/cast/cast_spd.c11
-rw-r--r--crypto/cast/castopts.c11
-rw-r--r--crypto/des/des.c3
-rw-r--r--crypto/des/des_locl.h7
-rw-r--r--crypto/des/des_opts.c3
-rw-r--r--crypto/des/destest.c3
-rw-r--r--crypto/des/read_pwd.c3
-rw-r--r--crypto/des/speed.c11
-rw-r--r--crypto/idea/idea_spd.c11
-rw-r--r--crypto/opensslconf.h.in2
-rw-r--r--crypto/rc2/rc2speed.c11
-rw-r--r--crypto/rc4/rc4speed.c11
-rw-r--r--crypto/rc5/rc5speed.c11
15 files changed, 59 insertions, 61 deletions
diff --git a/crypto/bf/bf_opts.c b/crypto/bf/bf_opts.c
index a0663b5801..5f330cc53c 100644
--- a/crypto/bf/bf_opts.c
+++ b/crypto/bf/bf_opts.c
@@ -64,12 +64,11 @@
#endif
#include <stdio.h>
-#ifndef MSDOS
-#include <unistd.h>
-#else
-#include <io.h>
-extern void exit();
-#endif
+
+#include <openssl/e_os2.h>
+#include OPENSSL_UNISTD_IO
+OPENSSL_DECLARE_EXIT
+
#include <signal.h>
#ifndef _IRIX
#include <time.h>
diff --git a/crypto/bf/bfspeed.c b/crypto/bf/bfspeed.c
index bc6cd8df5f..9b893e92cc 100644
--- a/crypto/bf/bfspeed.c
+++ b/crypto/bf/bfspeed.c
@@ -64,12 +64,11 @@
#endif
#include <stdio.h>
-#ifndef MSDOS
-#include <unistd.h>
-#else
-#include <io.h>
-extern int exit();
-#endif
+
+#include <openssl/e_os2.h>
+#include OPENSSL_UNISTD_IO
+OPENSSL_DECLARE_EXIT
+
#include <signal.h>
#ifndef _IRIX
#include <time.h>
diff --git a/crypto/cast/cast_spd.c b/crypto/cast/cast_spd.c
index 47af9639e4..c0726906c2 100644
--- a/crypto/cast/cast_spd.c
+++ b/crypto/cast/cast_spd.c
@@ -64,12 +64,11 @@
#endif
#include <stdio.h>
-#ifndef MSDOS
-#include <unistd.h>
-#else
-#include <io.h>
-extern int exit();
-#endif
+
+#include <openssl/e_os2.h>
+#include OPENSSL_UNISTD_IO
+OPENSSL_DECLARE_EXIT
+
#include <signal.h>
#ifndef _IRIX
#include <time.h>
diff --git a/crypto/cast/castopts.c b/crypto/cast/castopts.c
index 25c40af06a..642e9725af 100644
--- a/crypto/cast/castopts.c
+++ b/crypto/cast/castopts.c
@@ -64,12 +64,11 @@
#endif
#include <stdio.h>
-#ifndef MSDOS
-#include <unistd.h>
-#else
-#include <io.h>
-extern void exit();
-#endif
+
+#include <openssl/e_os2.h>
+#include OPENSSL_UNISTD_IO
+OPENSSL_DECLARE_EXIT
+
#include <signal.h>
#ifndef _IRIX
#include <time.h>
diff --git a/crypto/des/des.c b/crypto/des/des.c
index 91d7967e31..32ddf1b927 100644
--- a/crypto/des/des.c
+++ b/crypto/des/des.c
@@ -60,7 +60,8 @@
#include <stdlib.h>
#ifndef MSDOS
#ifndef VMS
-#include <unistd.h>
+#include <openssl/opensslconf.h>
+#include OPENSSL_UNISTD
#else /* VMS */
#ifdef __DECC
#include <unistd.h>
diff --git a/crypto/des/des_locl.h b/crypto/des/des_locl.h
index c9312f806a..a44da79b92 100644
--- a/crypto/des/des_locl.h
+++ b/crypto/des/des_locl.h
@@ -67,15 +67,16 @@
#include <stdio.h>
#include <stdlib.h>
+
+#include <openssl/opensslconf.h>
+
#ifndef MSDOS
#if !defined(VMS) || defined(__DECC)
-#include <unistd.h>
+#include OPENSSL_UNISTD
#endif
#endif
#include <openssl/des.h>
-#include <openssl/opensslconf.h>
-
#ifdef MSDOS /* Visual C++ 2.1 (Windows NT/95) */
#include <stdlib.h>
#include <errno.h>
diff --git a/crypto/des/des_opts.c b/crypto/des/des_opts.c
index 500509ea73..746c456f8f 100644
--- a/crypto/des/des_opts.c
+++ b/crypto/des/des_opts.c
@@ -65,7 +65,8 @@
#include <stdio.h>
#ifndef MSDOS
-#include <unistd.h>
+#include <openssl/e_os2.h>
+#include OPENSSL_UNISTD
#else
#include <io.h>
extern void exit();
diff --git a/crypto/des/destest.c b/crypto/des/destest.c
index 0054fb9a97..d92fabdf3f 100644
--- a/crypto/des/destest.c
+++ b/crypto/des/destest.c
@@ -66,7 +66,8 @@
#include <stdlib.h>
#ifndef MSDOS
#if !defined(VMS) || defined(__DECC)
-#include <unistd.h>
+#include <openssl/opensslconf.h>
+#include OPENSSL_UNISTD
#endif /* VMS */
#else
#include <io.h>
diff --git a/crypto/des/read_pwd.c b/crypto/des/read_pwd.c
index d280aa14a5..7639fc0c3b 100644
--- a/crypto/des/read_pwd.c
+++ b/crypto/des/read_pwd.c
@@ -57,7 +57,8 @@
*/
#if !defined(MSDOS) && !defined(VMS) && !defined(WIN32)
-#include <unistd.h>
+#include <openssl/opensslconf.h>
+#include OPENSSL_UNISTD
/* If unistd.h defines _POSIX_VERSION, we conclude that we
* are on a POSIX system and have sigaction and termios. */
#if defined(_POSIX_VERSION)
diff --git a/crypto/des/speed.c b/crypto/des/speed.c
index ed3b760167..da41abcb03 100644
--- a/crypto/des/speed.c
+++ b/crypto/des/speed.c
@@ -64,12 +64,11 @@
#endif
#include <stdio.h>
-#ifndef MSDOS
-#include <unistd.h>
-#else
-#include <io.h>
-extern int exit();
-#endif
+
+#include <openssl/e_os2.h>
+#include OPENSSL_UNISTD_IO
+OPENSSL_DECLARE_EXIT
+
#include <signal.h>
#ifndef _IRIX
#include <time.h>
diff --git a/crypto/idea/idea_spd.c b/crypto/idea/idea_spd.c
index 3c24ff5d86..5f79f93d67 100644
--- a/crypto/idea/idea_spd.c
+++ b/crypto/idea/idea_spd.c
@@ -64,12 +64,11 @@
#endif
#include <stdio.h>
-#ifndef MSDOS
-#include <unistd.h>
-#else
-#include <io.h>
-extern int exit();
-#endif
+
+#include <openssl/e_os2.h>
+#include OPENSSL_UNISTD_IO
+OPENSSL_DECLARE_EXIT
+
#include <signal.h>
#ifndef _IRIX
#include <time.h>
diff --git a/crypto/opensslconf.h.in b/crypto/opensslconf.h.in
index 5c9ee256e1..e4a8f8ad54 100644
--- a/crypto/opensslconf.h.in
+++ b/crypto/opensslconf.h.in
@@ -10,6 +10,8 @@
#endif
#endif
+#define OPENSSL_UNISTD <unistd.h>
+
#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
#define IDEA_INT unsigned int
#endif
diff --git a/crypto/rc2/rc2speed.c b/crypto/rc2/rc2speed.c
index 5e747c9265..c3da63e77e 100644
--- a/crypto/rc2/rc2speed.c
+++ b/crypto/rc2/rc2speed.c
@@ -64,12 +64,11 @@
#endif
#include <stdio.h>
-#ifndef MSDOS
-#include <unistd.h>
-#else
-#include <io.h>
-extern int exit();
-#endif
+
+#include <openssl/e_os2.h>
+#include OPENSSL_UNISTD_IO
+OPENSSL_DECLARE_EXIT
+
#include <signal.h>
#ifndef _IRIX
#include <time.h>
diff --git a/crypto/rc4/rc4speed.c b/crypto/rc4/rc4speed.c
index 40d153a709..4fb5ebf573 100644
--- a/crypto/rc4/rc4speed.c
+++ b/crypto/rc4/rc4speed.c
@@ -64,12 +64,11 @@
#endif
#include <stdio.h>
-#ifndef MSDOS
-#include <unistd.h>
-#else
-#include <io.h>
-extern int exit();
-#endif
+
+#include <openssl/e_os2.h>
+#include OPENSSL_UNISTD_IO
+OPENSSL_DECLARE_EXIT
+
#include <signal.h>
#ifndef _IRIX
#include <time.h>
diff --git a/crypto/rc5/rc5speed.c b/crypto/rc5/rc5speed.c
index ae263a10ef..c5636627f6 100644
--- a/crypto/rc5/rc5speed.c
+++ b/crypto/rc5/rc5speed.c
@@ -64,12 +64,11 @@
#endif
#include <stdio.h>
-#ifndef MSDOS
-#include <unistd.h>
-#else
-#include <io.h>
-extern int exit();
-#endif
+
+#include <openssl/e_os2.h>
+#include OPENSSL_UNISTD_IO
+OPENSSL_DECLARE_EXIT
+
#include <signal.h>
#ifndef _IRIX
#include <time.h>