summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--Makefile.in15
-rw-r--r--configure.in2
-rw-r--r--includes.h4
-rw-r--r--openbsd-compat/Makefile.in33
-rw-r--r--openbsd-compat/base64.c (renamed from bsd-base64.c)2
-rw-r--r--openbsd-compat/base64.h (renamed from bsd-base64.h)0
-rw-r--r--openbsd-compat/bindresvport.c (renamed from bsd-bindresvport.c)0
-rw-r--r--openbsd-compat/bindresvport.h (renamed from bsd-bindresvport.h)0
-rw-r--r--openbsd-compat/bsd-arc4random.c (renamed from bsd-arc4random.c)0
-rw-r--r--openbsd-compat/bsd-arc4random.h (renamed from bsd-arc4random.h)0
-rw-r--r--openbsd-compat/bsd-cygwin_util.c (renamed from cygwin_util.c)0
-rw-r--r--openbsd-compat/bsd-cygwin_util.h (renamed from cygwin_util.h)0
-rw-r--r--openbsd-compat/bsd-misc.c (renamed from bsd-misc.c)0
-rw-r--r--openbsd-compat/bsd-misc.h (renamed from bsd-misc.h)0
-rw-r--r--openbsd-compat/bsd-nextstep.c (renamed from next-posix.c)0
-rw-r--r--openbsd-compat/bsd-nextstep.h (renamed from next-posix.h)0
-rw-r--r--openbsd-compat/bsd-snprintf.c (renamed from bsd-snprintf.c)0
-rw-r--r--openbsd-compat/bsd-snprintf.h (renamed from bsd-snprintf.h)0
-rw-r--r--openbsd-compat/bsd-waitpid.c (renamed from bsd-waitpid.c)0
-rw-r--r--openbsd-compat/bsd-waitpid.h (renamed from bsd-waitpid.h)0
-rw-r--r--openbsd-compat/daemon.c (renamed from bsd-daemon.c)0
-rw-r--r--openbsd-compat/daemon.h (renamed from bsd-daemon.h)0
-rw-r--r--openbsd-compat/fake-gai-errnos.h (renamed from fake-gai-errnos.h)0
-rw-r--r--openbsd-compat/fake-getaddrinfo.c (renamed from fake-getaddrinfo.c)0
-rw-r--r--openbsd-compat/fake-getaddrinfo.h (renamed from fake-getaddrinfo.h)0
-rw-r--r--openbsd-compat/fake-getnameinfo.c (renamed from fake-getnameinfo.c)0
-rw-r--r--openbsd-compat/fake-getnameinfo.h (renamed from fake-getnameinfo.h)0
-rw-r--r--openbsd-compat/fake-regex.h (renamed from fake-regex.h)0
-rw-r--r--openbsd-compat/fake-socket.h (renamed from fake-socket.h)0
-rw-r--r--openbsd-compat/getcwd.c (renamed from bsd-getcwd.c)0
-rw-r--r--openbsd-compat/getcwd.h (renamed from bsd-getcwd.h)0
-rw-r--r--openbsd-compat/getgrouplist.c (renamed from bsd-getgrouplist.c)0
-rw-r--r--openbsd-compat/getgrouplist.h (renamed from bsd-getgrouplist.h)0
-rw-r--r--openbsd-compat/inet_aton.c (renamed from bsd-inet_aton.c)0
-rw-r--r--openbsd-compat/inet_aton.h (renamed from bsd-inet_aton.h)0
-rw-r--r--openbsd-compat/inet_ntoa.c (renamed from bsd-inet_ntoa.c)0
-rw-r--r--openbsd-compat/inet_ntoa.h (renamed from bsd-inet_ntoa.h)0
-rw-r--r--openbsd-compat/mktemp.c (renamed from bsd-mktemp.c)0
-rw-r--r--openbsd-compat/mktemp.h (renamed from bsd-mktemp.h)0
-rw-r--r--openbsd-compat/openbsd-compat.h37
-rw-r--r--openbsd-compat/queue.h (renamed from bsd-queue.h)0
-rw-r--r--openbsd-compat/realpath.c (renamed from bsd-realpath.c)0
-rw-r--r--openbsd-compat/realpath.h (renamed from bsd-realpath.h)0
-rw-r--r--openbsd-compat/rresvport.c (renamed from bsd-rresvport.c)0
-rw-r--r--openbsd-compat/rresvport.h (renamed from bsd-rresvport.h)0
-rw-r--r--openbsd-compat/setenv.c (renamed from bsd-setenv.c)0
-rw-r--r--openbsd-compat/setenv.h (renamed from bsd-setenv.h)0
-rw-r--r--openbsd-compat/setproctitle.c (renamed from bsd-setproctitle.c)0
-rw-r--r--openbsd-compat/setproctitle.h (renamed from bsd-setproctitle.h)0
-rw-r--r--openbsd-compat/sigaction.c (renamed from bsd-sigaction.c)2
-rw-r--r--openbsd-compat/sigaction.h (renamed from bsd-sigaction.h)0
-rw-r--r--openbsd-compat/strlcat.c (renamed from bsd-strlcat.c)0
-rw-r--r--openbsd-compat/strlcat.h (renamed from bsd-strlcat.h)0
-rw-r--r--openbsd-compat/strlcpy.c (renamed from bsd-strlcpy.c)0
-rw-r--r--openbsd-compat/strlcpy.h (renamed from bsd-strlcpy.h)0
-rw-r--r--openbsd-compat/strmode.c (renamed from bsd-strmode.c)0
-rw-r--r--openbsd-compat/strmode.h (renamed from bsd-strmode.h)0
-rw-r--r--openbsd-compat/strsep.c (renamed from bsd-strsep.c)0
-rw-r--r--openbsd-compat/strsep.h (renamed from bsd-strsep.h)0
-rw-r--r--openbsd-compat/strtok.c (renamed from bsd-strtok.c)0
-rw-r--r--openbsd-compat/strtok.h (renamed from bsd-strtok.h)0
-rw-r--r--openbsd-compat/vis.c (renamed from bsd-vis.c)0
-rw-r--r--openbsd-compat/vis.h (renamed from bsd-vis.h)0
64 files changed, 88 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ac2bf354..d50091bc7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
120000131 120010131
2 - (djm) OpenBSD CVS Sync: 2 - (djm) OpenBSD CVS Sync:
3 - djm@cvs.openbsd.org 2001/01/30 15:48:53 3 - djm@cvs.openbsd.org 2001/01/30 15:48:53
4 [sshconnect.c] 4 [sshconnect.c]
@@ -8,8 +8,11 @@
8 respectively. 8 respectively.
9 - (djm) Don't log SSH2 PAM KbdInt responses to debug, they may contain 9 - (djm) Don't log SSH2 PAM KbdInt responses to debug, they may contain
10 passwords. 10 passwords.
11 - (bal) Reorder. Move all bsd-*, fake-*, next-*, and cygwin* stuff to
12 openbsd-compat/. And resolve all ./configure and Makefile.in issues
13 assocated.
11 14
1220000130 1520010130
13 - (djm) OpenBSD CVS Sync: 16 - (djm) OpenBSD CVS Sync:
14 - markus@cvs.openbsd.org 2001/01/29 09:55:37 17 - markus@cvs.openbsd.org 2001/01/29 09:55:37
15 [channels.c channels.h clientloop.c serverloop.c] 18 [channels.c channels.h clientloop.c serverloop.c]
@@ -26,7 +29,7 @@
26 Allow invocation of sybsystem by commandline (-s); ok markus@ 29 Allow invocation of sybsystem by commandline (-s); ok markus@
27 - (stevesk) configure.in: remove duplicate PROG_LS 30 - (stevesk) configure.in: remove duplicate PROG_LS
28 31
2920000129 3220010129
30 - (stevesk) sftp-server.c: use %lld vs. %qd 33 - (stevesk) sftp-server.c: use %lld vs. %qd
31 34
3220010128 3520010128
diff --git a/Makefile.in b/Makefile.in
index 58d67a5d5..063fa5c70 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -19,7 +19,7 @@ CC=@CC@
19LD=@LD@ 19LD=@LD@
20PATHS=-DETCDIR=\"$(sysconfdir)\" -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" -D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" 20PATHS=-DETCDIR=\"$(sysconfdir)\" -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" -D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\"
21CFLAGS=@CFLAGS@ 21CFLAGS=@CFLAGS@
22CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir) $(PATHS) @DEFS@ 22CPPFLAGS=@CPPFLAGS@ -I. -Iopenbsd-compat/ -I$(srcdir) $(PATHS) @DEFS@
23LIBS=@LIBS@ 23LIBS=@LIBS@
24AR=@AR@ 24AR=@AR@
25RANLIB=@RANLIB@ 25RANLIB=@RANLIB@
@@ -27,7 +27,7 @@ INSTALL=@INSTALL@
27PERL=@PERL@ 27PERL=@PERL@
28ENT=@ENT@ 28ENT=@ENT@
29XAUTH_PATH=@XAUTH_PATH@ 29XAUTH_PATH=@XAUTH_PATH@
30LDFLAGS=-L. @LDFLAGS@ 30LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@
31EXEEXT=@EXEEXT@ 31EXEEXT=@EXEEXT@
32SSH_MODE= @SSHMODE@ 32SSH_MODE= @SSHMODE@
33 33
@@ -37,9 +37,7 @@ INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@
37 37
38TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-agent$(EXEEXT) scp$(EXEEXT) $(SFTP-SERVER) 38TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-agent$(EXEEXT) scp$(EXEEXT) $(SFTP-SERVER)
39 39
40LIBSSH_OBJS=atomicio.o authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o cli.o compat.o compress.o crc32.o cygwin_util.o deattack.o dispatch.o hmac.o hostfile.o key.o kex.o log.o match.o misc.o mpaux.o nchan.o packet.o radix.o rijndael.o entropy.o readpass.o rsa.o ssh-dss.o ssh-rsa.o tildexpand.o ttymodes.o uidswap.o uuencode.o xmalloc.o 40LIBSSH_OBJS=atomicio.o authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o cli.o compat.o compress.o crc32.o deattack.o dispatch.o hmac.o hostfile.o key.o kex.o log.o match.o misc.o mpaux.o nchan.o packet.o radix.o rijndael.o entropy.o readpass.o rsa.o ssh-dss.o ssh-rsa.o tildexpand.o ttymodes.o uidswap.o uuencode.o xmalloc.o
41
42LIBOPENBSD_COMPAT_OBJS=bsd-arc4random.o bsd-base64.o bsd-bindresvport.o bsd-daemon.o bsd-getcwd.o bsd-getgrouplist.o bsd-inet_aton.o bsd-inet_ntoa.o bsd-misc.o bsd-mktemp.o bsd-realpath.o bsd-rresvport.o bsd-setenv.o bsd-sigaction.o bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o bsd-strmode.o bsd-strsep.o bsd-strtok.o bsd-vis.o bsd-setproctitle.o bsd-waitpid.o fake-getaddrinfo.o fake-getnameinfo.o next-posix.o
43 41
44SSHOBJS= ssh.o sshconnect.o sshconnect1.o sshconnect2.o log-client.o readconf.o clientloop.o 42SSHOBJS= ssh.o sshconnect.o sshconnect1.o sshconnect2.o log-client.o readconf.o clientloop.o
45 43
@@ -79,9 +77,8 @@ $(LIBOPENBSD_COMPAT_OBJS): config.h
79.c.o: 77.c.o:
80 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< 78 $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
81 79
82libopenbsd-compat.a: $(LIBOPENBSD_COMPAT_OBJS) 80libopenbsd-compat.a:
83 $(AR) rv $@ $(LIBOPENBSD_COMPAT_OBJS) 81 (cd openbsd-compat; make)
84 $(RANLIB) $@
85 82
86libssh.a: $(LIBSSH_OBJS) 83libssh.a: $(LIBSSH_OBJS)
87 $(AR) rv $@ $(LIBSSH_OBJS) 84 $(AR) rv $@ $(LIBSSH_OBJS)
@@ -119,10 +116,12 @@ $(MANPAGES) $(CONFIGFILES)::
119 $(FIXPATHSCMD) $(srcdir)/$@ 116 $(FIXPATHSCMD) $(srcdir)/$@
120 117
121clean: 118clean:
119 (cd openbsd-compat; make clean)
122 rm -f *.o *.a $(TARGETS) logintest config.cache config.log 120 rm -f *.o *.a $(TARGETS) logintest config.cache config.log
123 rm -f *.out core 121 rm -f *.out core
124 122
125distclean: clean 123distclean: clean
124 (cd openbsd-compat; make distclean)
126 rm -f Makefile config.h config.status ssh_prng_cmds *~ 125 rm -f Makefile config.h config.status ssh_prng_cmds *~
127 126
128mrproper: distclean 127mrproper: distclean
diff --git a/configure.in b/configure.in
index d9f59a315..9913442ac 100644
--- a/configure.in
+++ b/configure.in
@@ -1641,7 +1641,7 @@ fi
1641 1641
1642AC_EXEEXT 1642AC_EXEEXT
1643 1643
1644AC_OUTPUT(Makefile ssh_prng_cmds) 1644AC_OUTPUT(Makefile openbsd-compat/Makefile ssh_prng_cmds)
1645 1645
1646# Print summary of options 1646# Print summary of options
1647 1647
diff --git a/includes.h b/includes.h
index 18693c7f0..ac83a12f0 100644
--- a/includes.h
+++ b/includes.h
@@ -21,7 +21,7 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
21 21
22#include "config.h" 22#include "config.h"
23 23
24#include "next-posix.h" 24#include "bsd-nextstep.h"
25 25
26#include <sys/types.h> 26#include <sys/types.h>
27#include <sys/socket.h> 27#include <sys/socket.h>
@@ -95,7 +95,7 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
95#endif 95#endif
96#include "version.h" 96#include "version.h"
97#include "openbsd-compat.h" 97#include "openbsd-compat.h"
98#include "cygwin_util.h" 98#include "bsd-cygwin_util.h"
99#include "entropy.h" 99#include "entropy.h"
100 100
101#endif /* INCLUDES_H */ 101#endif /* INCLUDES_H */
diff --git a/openbsd-compat/Makefile.in b/openbsd-compat/Makefile.in
new file mode 100644
index 000000000..1c745fb8c
--- /dev/null
+++ b/openbsd-compat/Makefile.in
@@ -0,0 +1,33 @@
1sysconfdir=@sysconfdir@
2piddir=@piddir@
3srcdir=@srcdir@
4top_srcdir=@top_srcdir@
5
6CC=@CC@
7LD=@LD@
8CFLAGS=@CFLAGS@
9CPPFLAGS=@CPPFLAGS@ -I. -I.. -I$(srcdir) @DEFS@
10LIBS=@LIBS@
11AR=@AR@
12RANLIB=@RANLIB@
13INSTALL=@INSTALL@
14LDFLAGS=-L. @LDFLAGS@
15
16OPENBSD=base64.o bindresvport.o daemon.o getcwd.o getgrouplist.o inet_aton.o inet_ntoa.o mktemp.o realpath.o rresvport.o setenv.o setproctitle.o sigaction.o strlcat.o strlcpy.o strmode.o strsep.o strtok.o vis.o
17
18COMPAT=bsd-arc4random.o bsd-cygwin_util.o bsd-misc.o bsd-nextstep.o bsd-snprintf.o bsd-waitpid.o fake-getaddrinfo.o fake-getnameinfo.o
19
20
21all: libopenbsd-compat.a
22
23$(BSDCOMPAT): ../config.h
24
25libopenbsd-compat.a: $(COMPAT) $(OPENBSD)
26 $(AR) rv $@ $(COMPAT) $(OPENBSD)
27 $(RANLIB) $@
28
29clean:
30 rm -f *.o *.a core
31
32distclean: clean
33 rm -f Makefile *~
diff --git a/bsd-base64.c b/openbsd-compat/base64.c
index 8cbf8eeef..d12b993b7 100644
--- a/bsd-base64.c
+++ b/openbsd-compat/base64.c
@@ -58,7 +58,7 @@
58#include <stdlib.h> 58#include <stdlib.h>
59#include <string.h> 59#include <string.h>
60 60
61#include "bsd-base64.h" 61#include "base64.h"
62 62
63#define Assert(Cond) if (!(Cond)) abort() 63#define Assert(Cond) if (!(Cond)) abort()
64 64
diff --git a/bsd-base64.h b/openbsd-compat/base64.h
index c1d69dd6c..c1d69dd6c 100644
--- a/bsd-base64.h
+++ b/openbsd-compat/base64.h
diff --git a/bsd-bindresvport.c b/openbsd-compat/bindresvport.c
index 332bcb016..332bcb016 100644
--- a/bsd-bindresvport.c
+++ b/openbsd-compat/bindresvport.c
diff --git a/bsd-bindresvport.h b/openbsd-compat/bindresvport.h
index 6dbf8a2cb..6dbf8a2cb 100644
--- a/bsd-bindresvport.h
+++ b/openbsd-compat/bindresvport.h
diff --git a/bsd-arc4random.c b/openbsd-compat/bsd-arc4random.c
index c45459f59..c45459f59 100644
--- a/bsd-arc4random.c
+++ b/openbsd-compat/bsd-arc4random.c
diff --git a/bsd-arc4random.h b/openbsd-compat/bsd-arc4random.h
index 9819b848c..9819b848c 100644
--- a/bsd-arc4random.h
+++ b/openbsd-compat/bsd-arc4random.h
diff --git a/cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c
index b540ebe1a..b540ebe1a 100644
--- a/cygwin_util.c
+++ b/openbsd-compat/bsd-cygwin_util.c
diff --git a/cygwin_util.h b/openbsd-compat/bsd-cygwin_util.h
index bf90d0293..bf90d0293 100644
--- a/cygwin_util.h
+++ b/openbsd-compat/bsd-cygwin_util.h
diff --git a/bsd-misc.c b/openbsd-compat/bsd-misc.c
index 2e59019bc..2e59019bc 100644
--- a/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
diff --git a/bsd-misc.h b/openbsd-compat/bsd-misc.h
index e02c66783..e02c66783 100644
--- a/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
diff --git a/next-posix.c b/openbsd-compat/bsd-nextstep.c
index 43ec0acd9..43ec0acd9 100644
--- a/next-posix.c
+++ b/openbsd-compat/bsd-nextstep.c
diff --git a/next-posix.h b/openbsd-compat/bsd-nextstep.h
index 3e16dacb9..3e16dacb9 100644
--- a/next-posix.h
+++ b/openbsd-compat/bsd-nextstep.h
diff --git a/bsd-snprintf.c b/openbsd-compat/bsd-snprintf.c
index 59fefbf25..59fefbf25 100644
--- a/bsd-snprintf.c
+++ b/openbsd-compat/bsd-snprintf.c
diff --git a/bsd-snprintf.h b/openbsd-compat/bsd-snprintf.h
index ed7a21c97..ed7a21c97 100644
--- a/bsd-snprintf.h
+++ b/openbsd-compat/bsd-snprintf.h
diff --git a/bsd-waitpid.c b/openbsd-compat/bsd-waitpid.c
index 0bf4c7cd8..0bf4c7cd8 100644
--- a/bsd-waitpid.c
+++ b/openbsd-compat/bsd-waitpid.c
diff --git a/bsd-waitpid.h b/openbsd-compat/bsd-waitpid.h
index 25c6e9c86..25c6e9c86 100644
--- a/bsd-waitpid.h
+++ b/openbsd-compat/bsd-waitpid.h
diff --git a/bsd-daemon.c b/openbsd-compat/daemon.c
index f704a9048..f704a9048 100644
--- a/bsd-daemon.c
+++ b/openbsd-compat/daemon.c
diff --git a/bsd-daemon.h b/openbsd-compat/daemon.h
index cd91ea07b..cd91ea07b 100644
--- a/bsd-daemon.h
+++ b/openbsd-compat/daemon.h
diff --git a/fake-gai-errnos.h b/openbsd-compat/fake-gai-errnos.h
index 27f6089e9..27f6089e9 100644
--- a/fake-gai-errnos.h
+++ b/openbsd-compat/fake-gai-errnos.h
diff --git a/fake-getaddrinfo.c b/openbsd-compat/fake-getaddrinfo.c
index 73c122ed1..73c122ed1 100644
--- a/fake-getaddrinfo.c
+++ b/openbsd-compat/fake-getaddrinfo.c
diff --git a/fake-getaddrinfo.h b/openbsd-compat/fake-getaddrinfo.h
index 7da87142d..7da87142d 100644
--- a/fake-getaddrinfo.h
+++ b/openbsd-compat/fake-getaddrinfo.h
diff --git a/fake-getnameinfo.c b/openbsd-compat/fake-getnameinfo.c
index 203621f0d..203621f0d 100644
--- a/fake-getnameinfo.c
+++ b/openbsd-compat/fake-getnameinfo.c
diff --git a/fake-getnameinfo.h b/openbsd-compat/fake-getnameinfo.h
index 0d25f4270..0d25f4270 100644
--- a/fake-getnameinfo.h
+++ b/openbsd-compat/fake-getnameinfo.h
diff --git a/fake-regex.h b/openbsd-compat/fake-regex.h
index 8f7f6eddd..8f7f6eddd 100644
--- a/fake-regex.h
+++ b/openbsd-compat/fake-regex.h
diff --git a/fake-socket.h b/openbsd-compat/fake-socket.h
index b51caa030..b51caa030 100644
--- a/fake-socket.h
+++ b/openbsd-compat/fake-socket.h
diff --git a/bsd-getcwd.c b/openbsd-compat/getcwd.c
index 273a0487c..273a0487c 100644
--- a/bsd-getcwd.c
+++ b/openbsd-compat/getcwd.c
diff --git a/bsd-getcwd.h b/openbsd-compat/getcwd.h
index bee738657..bee738657 100644
--- a/bsd-getcwd.h
+++ b/openbsd-compat/getcwd.h
diff --git a/bsd-getgrouplist.c b/openbsd-compat/getgrouplist.c
index f7a27c339..f7a27c339 100644
--- a/bsd-getgrouplist.c
+++ b/openbsd-compat/getgrouplist.c
diff --git a/bsd-getgrouplist.h b/openbsd-compat/getgrouplist.h
index ef9e60116..ef9e60116 100644
--- a/bsd-getgrouplist.h
+++ b/openbsd-compat/getgrouplist.h
diff --git a/bsd-inet_aton.c b/openbsd-compat/inet_aton.c
index 18e31e7f6..18e31e7f6 100644
--- a/bsd-inet_aton.c
+++ b/openbsd-compat/inet_aton.c
diff --git a/bsd-inet_aton.h b/openbsd-compat/inet_aton.h
index ec3c225c9..ec3c225c9 100644
--- a/bsd-inet_aton.h
+++ b/openbsd-compat/inet_aton.h
diff --git a/bsd-inet_ntoa.c b/openbsd-compat/inet_ntoa.c
index fe5539be0..fe5539be0 100644
--- a/bsd-inet_ntoa.c
+++ b/openbsd-compat/inet_ntoa.c
diff --git a/bsd-inet_ntoa.h b/openbsd-compat/inet_ntoa.h
index e3d48e4af..e3d48e4af 100644
--- a/bsd-inet_ntoa.h
+++ b/openbsd-compat/inet_ntoa.h
diff --git a/bsd-mktemp.c b/openbsd-compat/mktemp.c
index 9ed1bc80f..9ed1bc80f 100644
--- a/bsd-mktemp.c
+++ b/openbsd-compat/mktemp.c
diff --git a/bsd-mktemp.h b/openbsd-compat/mktemp.h
index faddc916e..faddc916e 100644
--- a/bsd-mktemp.h
+++ b/openbsd-compat/mktemp.h
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
new file mode 100644
index 000000000..4758a9c59
--- /dev/null
+++ b/openbsd-compat/openbsd-compat.h
@@ -0,0 +1,37 @@
1#ifndef _OPENBSD_H
2#define _OPENBSD_H
3
4#include "config.h"
5
6/* OpenBSD function replacements */
7#include "bindresvport.h"
8#include "getcwd.h"
9#include "realpath.h"
10#include "rresvport.h"
11#include "strlcpy.h"
12#include "strlcat.h"
13#include "strmode.h"
14#include "mktemp.h"
15#include "daemon.h"
16#include "base64.h"
17#include "sigaction.h"
18#include "inet_aton.h"
19#include "inet_ntoa.h"
20#include "strsep.h"
21#include "strtok.h"
22#include "vis.h"
23#include "setproctitle.h"
24#include "getgrouplist.h"
25
26/* Home grown routines */
27#include "bsd-arc4random.h"
28#include "bsd-misc.h"
29#include "bsd-snprintf.h"
30#include "bsd-waitpid.h"
31
32/* rfc2553 socket API replacements */
33#include "fake-getaddrinfo.h"
34#include "fake-getnameinfo.h"
35#include "fake-socket.h"
36
37#endif /* _OPENBSD_H */
diff --git a/bsd-queue.h b/openbsd-compat/queue.h
index 269af413c..269af413c 100644
--- a/bsd-queue.h
+++ b/openbsd-compat/queue.h
diff --git a/bsd-realpath.c b/openbsd-compat/realpath.c
index baf17f1a4..baf17f1a4 100644
--- a/bsd-realpath.c
+++ b/openbsd-compat/realpath.c
diff --git a/bsd-realpath.h b/openbsd-compat/realpath.h
index dc3579dd3..dc3579dd3 100644
--- a/bsd-realpath.h
+++ b/openbsd-compat/realpath.h
diff --git a/bsd-rresvport.c b/openbsd-compat/rresvport.c
index 44eac2036..44eac2036 100644
--- a/bsd-rresvport.c
+++ b/openbsd-compat/rresvport.c
diff --git a/bsd-rresvport.h b/openbsd-compat/rresvport.h
index d139895e8..d139895e8 100644
--- a/bsd-rresvport.h
+++ b/openbsd-compat/rresvport.h
diff --git a/bsd-setenv.c b/openbsd-compat/setenv.c
index d69f88258..d69f88258 100644
--- a/bsd-setenv.c
+++ b/openbsd-compat/setenv.c
diff --git a/bsd-setenv.h b/openbsd-compat/setenv.h
index 62ebc201f..62ebc201f 100644
--- a/bsd-setenv.h
+++ b/openbsd-compat/setenv.h
diff --git a/bsd-setproctitle.c b/openbsd-compat/setproctitle.c
index 38eca9ad7..38eca9ad7 100644
--- a/bsd-setproctitle.c
+++ b/openbsd-compat/setproctitle.c
diff --git a/bsd-setproctitle.h b/openbsd-compat/setproctitle.h
index 000689fac..000689fac 100644
--- a/bsd-setproctitle.h
+++ b/openbsd-compat/setproctitle.h
diff --git a/bsd-sigaction.c b/openbsd-compat/sigaction.c
index d6966d4fd..47d853fe4 100644
--- a/bsd-sigaction.c
+++ b/openbsd-compat/sigaction.c
@@ -35,7 +35,7 @@
35 35
36#include <signal.h> 36#include <signal.h>
37#include "config.h" 37#include "config.h"
38#include "bsd-sigaction.h" 38#include "sigaction.h"
39 39
40/* This file provides sigaction() emulation using sigvec() */ 40/* This file provides sigaction() emulation using sigvec() */
41/* Use only if this is non POSIX system */ 41/* Use only if this is non POSIX system */
diff --git a/bsd-sigaction.h b/openbsd-compat/sigaction.h
index b37c1f84a..b37c1f84a 100644
--- a/bsd-sigaction.h
+++ b/openbsd-compat/sigaction.h
diff --git a/bsd-strlcat.c b/openbsd-compat/strlcat.c
index 10ad9e71a..10ad9e71a 100644
--- a/bsd-strlcat.c
+++ b/openbsd-compat/strlcat.c
diff --git a/bsd-strlcat.h b/openbsd-compat/strlcat.h
index 562dc7045..562dc7045 100644
--- a/bsd-strlcat.h
+++ b/openbsd-compat/strlcat.h
diff --git a/bsd-strlcpy.c b/openbsd-compat/strlcpy.c
index 276c25c37..276c25c37 100644
--- a/bsd-strlcpy.c
+++ b/openbsd-compat/strlcpy.c
diff --git a/bsd-strlcpy.h b/openbsd-compat/strlcpy.h
index dafa44af8..dafa44af8 100644
--- a/bsd-strlcpy.h
+++ b/openbsd-compat/strlcpy.h
diff --git a/bsd-strmode.c b/openbsd-compat/strmode.c
index 67e0e4d33..67e0e4d33 100644
--- a/bsd-strmode.c
+++ b/openbsd-compat/strmode.c
diff --git a/bsd-strmode.h b/openbsd-compat/strmode.h
index 773d6bdcd..773d6bdcd 100644
--- a/bsd-strmode.h
+++ b/openbsd-compat/strmode.h
diff --git a/bsd-strsep.c b/openbsd-compat/strsep.c
index c03649cff..c03649cff 100644
--- a/bsd-strsep.c
+++ b/openbsd-compat/strsep.c
diff --git a/bsd-strsep.h b/openbsd-compat/strsep.h
index d5ba6e0f1..d5ba6e0f1 100644
--- a/bsd-strsep.h
+++ b/openbsd-compat/strsep.h
diff --git a/bsd-strtok.c b/openbsd-compat/strtok.c
index d197734cb..d197734cb 100644
--- a/bsd-strtok.c
+++ b/openbsd-compat/strtok.c
diff --git a/bsd-strtok.h b/openbsd-compat/strtok.h
index 5a3a56959..5a3a56959 100644
--- a/bsd-strtok.h
+++ b/openbsd-compat/strtok.h
diff --git a/bsd-vis.c b/openbsd-compat/vis.c
index 94283a077..94283a077 100644
--- a/bsd-vis.c
+++ b/openbsd-compat/vis.c
diff --git a/bsd-vis.h b/openbsd-compat/vis.h
index 52e867b94..52e867b94 100644
--- a/bsd-vis.h
+++ b/openbsd-compat/vis.h