summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-04-17 10:24:08 +0000
committerderaadt <deraadt@openbsd.org>2014-04-17 10:24:08 +0000
commitd4570f9598e8c7a5dffa25307a79b1ca7569c28e (patch)
tree3288bd54dce092f774c9cf5c26a528c1c14cdb56
parentminimal fix for ', ' issue in jsing's indent script (diff)
downloadwireguard-openbsd-d4570f9598e8c7a5dffa25307a79b1ca7569c28e.tar.xz
wireguard-openbsd-d4570f9598e8c7a5dffa25307a79b1ca7569c28e.zip
unistd.h is always in the same place; no need to #include the result of
a maze of conditional #define's
-rw-r--r--lib/libcrypto/bf/bf_opts.c2
-rw-r--r--lib/libcrypto/bf/bfspeed.c2
-rw-r--r--lib/libcrypto/cast/cast_spd.c2
-rw-r--r--lib/libcrypto/cast/castopts.c2
-rw-r--r--lib/libcrypto/des/des_locl.h10
-rw-r--r--lib/libcrypto/des/des_opts.c2
-rw-r--r--lib/libcrypto/des/speed.c2
-rw-r--r--lib/libcrypto/idea/idea_spd.c2
-rw-r--r--lib/libcrypto/opensslconf.h.in3
-rw-r--r--lib/libcrypto/rc2/rc2speed.c2
-rw-r--r--lib/libcrypto/rc4/rc4speed.c2
-rw-r--r--lib/libcrypto/rc5/rc5speed.c2
-rw-r--r--lib/libssl/src/apps/s_time.c2
-rw-r--r--lib/libssl/src/apps/speed.c2
-rw-r--r--lib/libssl/src/crypto/bf/bf_opts.c2
-rw-r--r--lib/libssl/src/crypto/bf/bfspeed.c2
-rw-r--r--lib/libssl/src/crypto/cast/cast_spd.c2
-rw-r--r--lib/libssl/src/crypto/cast/castopts.c2
-rw-r--r--lib/libssl/src/crypto/des/des_locl.h10
-rw-r--r--lib/libssl/src/crypto/des/des_opts.c2
-rw-r--r--lib/libssl/src/crypto/des/speed.c2
-rw-r--r--lib/libssl/src/crypto/idea/idea_spd.c2
-rw-r--r--lib/libssl/src/crypto/opensslconf.h.in3
-rw-r--r--lib/libssl/src/crypto/rc2/rc2speed.c2
-rw-r--r--lib/libssl/src/crypto/rc4/rc4speed.c2
-rw-r--r--lib/libssl/src/crypto/rc5/rc5speed.c2
-rw-r--r--lib/libssl/src/ssl/ssltest.c11
27 files changed, 29 insertions, 52 deletions
diff --git a/lib/libcrypto/bf/bf_opts.c b/lib/libcrypto/bf/bf_opts.c
index 1721bb99b4a..7a2a8b571c6 100644
--- a/lib/libcrypto/bf/bf_opts.c
+++ b/lib/libcrypto/bf/bf_opts.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libcrypto/bf/bfspeed.c b/lib/libcrypto/bf/bfspeed.c
index c41ef3b4035..4fbf81d00c7 100644
--- a/lib/libcrypto/bf/bfspeed.c
+++ b/lib/libcrypto/bf/bfspeed.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libcrypto/cast/cast_spd.c b/lib/libcrypto/cast/cast_spd.c
index d650af475c3..0f99e0e570d 100644
--- a/lib/libcrypto/cast/cast_spd.c
+++ b/lib/libcrypto/cast/cast_spd.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libcrypto/cast/castopts.c b/lib/libcrypto/cast/castopts.c
index 33b2c7b06fd..f18a49bd6ee 100644
--- a/lib/libcrypto/cast/castopts.c
+++ b/lib/libcrypto/cast/castopts.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libcrypto/des/des_locl.h b/lib/libcrypto/des/des_locl.h
index a3b512e9b04..cf7811041ef 100644
--- a/lib/libcrypto/des/des_locl.h
+++ b/lib/libcrypto/des/des_locl.h
@@ -70,16 +70,8 @@
#include <stdio.h>
#include <stdlib.h>
-#ifndef OPENSSL_SYS_MSDOS
-#if !defined(OPENSSL_SYS_VMS) || defined(__DECC)
-#ifdef OPENSSL_UNISTD
-# include OPENSSL_UNISTD
-#else
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <math.h>
-#endif
-#endif
#include <openssl/des.h>
#ifdef OPENSSL_SYS_MSDOS /* Visual C++ 2.1 (Windows NT/95) */
diff --git a/lib/libcrypto/des/des_opts.c b/lib/libcrypto/des/des_opts.c
index 2df82962c5a..c713c5e3195 100644
--- a/lib/libcrypto/des/des_opts.c
+++ b/lib/libcrypto/des/des_opts.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#ifndef OPENSSL_SYS_MSDOS
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD
+#include <unistd.h>
#else
#include <io.h>
extern void exit();
diff --git a/lib/libcrypto/des/speed.c b/lib/libcrypto/des/speed.c
index 1616f4b7c95..67a8edf00ff 100644
--- a/lib/libcrypto/des/speed.c
+++ b/lib/libcrypto/des/speed.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libcrypto/idea/idea_spd.c b/lib/libcrypto/idea/idea_spd.c
index 699353e8719..cce4be9e6fb 100644
--- a/lib/libcrypto/idea/idea_spd.c
+++ b/lib/libcrypto/idea/idea_spd.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libcrypto/opensslconf.h.in b/lib/libcrypto/opensslconf.h.in
index 97e37455634..4c92f144cb0 100644
--- a/lib/libcrypto/opensslconf.h.in
+++ b/lib/libcrypto/opensslconf.h.in
@@ -10,9 +10,6 @@
#endif
#endif
-#undef OPENSSL_UNISTD
-#define OPENSSL_UNISTD <unistd.h>
-
#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
diff --git a/lib/libcrypto/rc2/rc2speed.c b/lib/libcrypto/rc2/rc2speed.c
index 85cf6f65bf1..31bfc453f5c 100644
--- a/lib/libcrypto/rc2/rc2speed.c
+++ b/lib/libcrypto/rc2/rc2speed.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libcrypto/rc4/rc4speed.c b/lib/libcrypto/rc4/rc4speed.c
index 0ebd38123d0..a1207231fa9 100644
--- a/lib/libcrypto/rc4/rc4speed.c
+++ b/lib/libcrypto/rc4/rc4speed.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libcrypto/rc5/rc5speed.c b/lib/libcrypto/rc5/rc5speed.c
index 8e363be535b..3bcc8f49c0a 100644
--- a/lib/libcrypto/rc5/rc5speed.c
+++ b/lib/libcrypto/rc5/rc5speed.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libssl/src/apps/s_time.c b/lib/libssl/src/apps/s_time.c
index 5f02e5fd036..1eb01f6d2f6 100644
--- a/lib/libssl/src/apps/s_time.c
+++ b/lib/libssl/src/apps/s_time.c
@@ -81,7 +81,7 @@
#include "winmain.h"
#include "wintext.h"
#endif
-#include OPENSSL_UNISTD
+#include <unistd.h>
#undef PROG
#define PROG s_time_main
diff --git a/lib/libssl/src/apps/speed.c b/lib/libssl/src/apps/speed.c
index fb4f25ed418..72aa867ae49 100644
--- a/lib/libssl/src/apps/speed.c
+++ b/lib/libssl/src/apps/speed.c
@@ -100,7 +100,7 @@
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/objects.h>
-#include OPENSSL_UNISTD
+#include <unistd.h>
#include <signal.h>
diff --git a/lib/libssl/src/crypto/bf/bf_opts.c b/lib/libssl/src/crypto/bf/bf_opts.c
index 1721bb99b4a..7a2a8b571c6 100644
--- a/lib/libssl/src/crypto/bf/bf_opts.c
+++ b/lib/libssl/src/crypto/bf/bf_opts.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libssl/src/crypto/bf/bfspeed.c b/lib/libssl/src/crypto/bf/bfspeed.c
index c41ef3b4035..4fbf81d00c7 100644
--- a/lib/libssl/src/crypto/bf/bfspeed.c
+++ b/lib/libssl/src/crypto/bf/bfspeed.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libssl/src/crypto/cast/cast_spd.c b/lib/libssl/src/crypto/cast/cast_spd.c
index d650af475c3..0f99e0e570d 100644
--- a/lib/libssl/src/crypto/cast/cast_spd.c
+++ b/lib/libssl/src/crypto/cast/cast_spd.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libssl/src/crypto/cast/castopts.c b/lib/libssl/src/crypto/cast/castopts.c
index 33b2c7b06fd..f18a49bd6ee 100644
--- a/lib/libssl/src/crypto/cast/castopts.c
+++ b/lib/libssl/src/crypto/cast/castopts.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libssl/src/crypto/des/des_locl.h b/lib/libssl/src/crypto/des/des_locl.h
index a3b512e9b04..cf7811041ef 100644
--- a/lib/libssl/src/crypto/des/des_locl.h
+++ b/lib/libssl/src/crypto/des/des_locl.h
@@ -70,16 +70,8 @@
#include <stdio.h>
#include <stdlib.h>
-#ifndef OPENSSL_SYS_MSDOS
-#if !defined(OPENSSL_SYS_VMS) || defined(__DECC)
-#ifdef OPENSSL_UNISTD
-# include OPENSSL_UNISTD
-#else
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <math.h>
-#endif
-#endif
#include <openssl/des.h>
#ifdef OPENSSL_SYS_MSDOS /* Visual C++ 2.1 (Windows NT/95) */
diff --git a/lib/libssl/src/crypto/des/des_opts.c b/lib/libssl/src/crypto/des/des_opts.c
index 2df82962c5a..c713c5e3195 100644
--- a/lib/libssl/src/crypto/des/des_opts.c
+++ b/lib/libssl/src/crypto/des/des_opts.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#ifndef OPENSSL_SYS_MSDOS
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD
+#include <unistd.h>
#else
#include <io.h>
extern void exit();
diff --git a/lib/libssl/src/crypto/des/speed.c b/lib/libssl/src/crypto/des/speed.c
index 1616f4b7c95..67a8edf00ff 100644
--- a/lib/libssl/src/crypto/des/speed.c
+++ b/lib/libssl/src/crypto/des/speed.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libssl/src/crypto/idea/idea_spd.c b/lib/libssl/src/crypto/idea/idea_spd.c
index 699353e8719..cce4be9e6fb 100644
--- a/lib/libssl/src/crypto/idea/idea_spd.c
+++ b/lib/libssl/src/crypto/idea/idea_spd.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libssl/src/crypto/opensslconf.h.in b/lib/libssl/src/crypto/opensslconf.h.in
index 97e37455634..4c92f144cb0 100644
--- a/lib/libssl/src/crypto/opensslconf.h.in
+++ b/lib/libssl/src/crypto/opensslconf.h.in
@@ -10,9 +10,6 @@
#endif
#endif
-#undef OPENSSL_UNISTD
-#define OPENSSL_UNISTD <unistd.h>
-
#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
diff --git a/lib/libssl/src/crypto/rc2/rc2speed.c b/lib/libssl/src/crypto/rc2/rc2speed.c
index 85cf6f65bf1..31bfc453f5c 100644
--- a/lib/libssl/src/crypto/rc2/rc2speed.c
+++ b/lib/libssl/src/crypto/rc2/rc2speed.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libssl/src/crypto/rc4/rc4speed.c b/lib/libssl/src/crypto/rc4/rc4speed.c
index 0ebd38123d0..a1207231fa9 100644
--- a/lib/libssl/src/crypto/rc4/rc4speed.c
+++ b/lib/libssl/src/crypto/rc4/rc4speed.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libssl/src/crypto/rc5/rc5speed.c b/lib/libssl/src/crypto/rc5/rc5speed.c
index 8e363be535b..3bcc8f49c0a 100644
--- a/lib/libssl/src/crypto/rc5/rc5speed.c
+++ b/lib/libssl/src/crypto/rc5/rc5speed.c
@@ -66,7 +66,7 @@
#include <stdio.h>
#include <openssl/e_os2.h>
-#include OPENSSL_UNISTD_IO
+#include <unistd.h>
OPENSSL_DECLARE_EXIT
#ifndef OPENSSL_SYS_NETWARE
diff --git a/lib/libssl/src/ssl/ssltest.c b/lib/libssl/src/ssl/ssltest.c
index 771c50a3e1e..e56c811a47a 100644
--- a/lib/libssl/src/ssl/ssltest.c
+++ b/lib/libssl/src/ssl/ssltest.c
@@ -187,13 +187,12 @@
#endif
#include <openssl/bn.h>
-#define _XOPEN_SOURCE_EXTENDED 1 /* Or gethostname won't be declared properly
-on Compaq platforms (at least with DEC C).
-Do not try to put it earlier, or IPv6 includes
-get screwed...
- */
+#define _XOPEN_SOURCE_EXTENDED 1
+/* Or gethostname won't be declared properly
+ on Compaq platforms (at least with DEC C).
+ Do not try to put it earlier, or IPv6 includes
+ get screwed... */
-#include OPENSSL_UNISTD
# define TEST_SERVER_CERT "../apps/server.pem"
# define TEST_CLIENT_CERT "../apps/client.pem"