summaryrefslogtreecommitdiff
path: root/openbsd-compat/openbsd-compat.h
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2009-12-29 21:38:40 +0000
committerColin Watson <cjwatson@debian.org>2009-12-29 21:38:40 +0000
commit1b816ea846aca3ee89e7995373ace609e9518424 (patch)
treeb41cdc8495cae7fa9c2e0f98a5f2e71656b61f9a /openbsd-compat/openbsd-compat.h
parentfa585019a79ebcb4e0202b1c33f87ff1c5c9ce1c (diff)
parent086ea76990b1e6287c24b6db74adffd4605eb3b0 (diff)
import openssh-4.6p1-gsskex-20070312.patch
Diffstat (limited to 'openbsd-compat/openbsd-compat.h')
-rw-r--r--openbsd-compat/openbsd-compat.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index 1a3027353..aac2e6cbc 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -1,4 +1,4 @@
1/* $Id: openbsd-compat.h,v 1.33 2005/12/31 05:33:37 djm Exp $ */ 1/* $Id: openbsd-compat.h,v 1.42 2006/09/03 12:44:50 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1999-2003 Damien Miller. All rights reserved. 4 * Copyright (c) 1999-2003 Damien Miller. All rights reserved.
@@ -31,6 +31,11 @@
31 31
32#include "includes.h" 32#include "includes.h"
33 33
34#include <sys/types.h>
35#include <pwd.h>
36
37#include <sys/socket.h>
38
34/* OpenBSD function replacements */ 39/* OpenBSD function replacements */
35#include "base64.h" 40#include "base64.h"
36#include "sigact.h" 41#include "sigact.h"
@@ -38,7 +43,7 @@
38#include "readpassphrase.h" 43#include "readpassphrase.h"
39#include "vis.h" 44#include "vis.h"
40#include "getrrsetbyname.h" 45#include "getrrsetbyname.h"
41 46#include "sha2.h"
42 47
43#ifndef HAVE_BASENAME 48#ifndef HAVE_BASENAME
44char *basename(const char *path); 49char *basename(const char *path);
@@ -126,13 +131,16 @@ int getgrouplist(const char *, gid_t, gid_t *, int *);
126int BSDgetopt(int argc, char * const *argv, const char *opts); 131int BSDgetopt(int argc, char * const *argv, const char *opts);
127#endif 132#endif
128 133
134#if defined(HAVE_DECL_WRITEV) && HAVE_DECL_WRITEV == 0
135# include <sys/types.h>
136# include <sys/uio.h>
137int writev(int, struct iovec *, int);
138#endif
129 139
130/* Home grown routines */ 140/* Home grown routines */
131#include "bsd-misc.h" 141#include "bsd-misc.h"
132#include "bsd-waitpid.h" 142#include "bsd-waitpid.h"
133 143
134/*#include <sys/types.h> XXX Still needed? * For uid_t, gid_t * */
135
136#ifndef HAVE_GETPEEREID 144#ifndef HAVE_GETPEEREID
137int getpeereid(int , uid_t *, gid_t *); 145int getpeereid(int , uid_t *, gid_t *);
138#endif 146#endif
@@ -147,13 +155,14 @@ int asprintf(char **, const char *, ...);
147#endif 155#endif
148 156
149#ifndef HAVE_OPENPTY 157#ifndef HAVE_OPENPTY
158# include <sys/ioctl.h> /* for struct winsize */
150int openpty(int *, int *, char *, struct termios *, struct winsize *); 159int openpty(int *, int *, char *, struct termios *, struct winsize *);
151#endif /* HAVE_OPENPTY */ 160#endif /* HAVE_OPENPTY */
152 161
153/* #include <sys/types.h> XXX needed? For size_t */ 162/* #include <sys/types.h> XXX needed? For size_t */
154 163
155#ifndef HAVE_SNPRINTF 164#ifndef HAVE_SNPRINTF
156int snprintf(char *, size_t, const char *, ...); 165int snprintf(char *, size_t, SNPRINTF_CONST char *, ...);
157#endif 166#endif
158 167
159#ifndef HAVE_STRTOLL 168#ifndef HAVE_STRTOLL
@@ -164,6 +173,10 @@ long long strtoll(const char *, char **, int);
164long long strtonum(const char *, long long, long long, const char **); 173long long strtonum(const char *, long long, long long, const char **);
165#endif 174#endif
166 175
176#if !defined(HAVE_VASPRINTF) || !defined(HAVE_VSNPRINTF)
177# include <stdarg.h>
178#endif
179
167#ifndef HAVE_VASPRINTF 180#ifndef HAVE_VASPRINTF
168int vasprintf(char **, const char *, va_list); 181int vasprintf(char **, const char *, va_list);
169#endif 182#endif
@@ -176,16 +189,18 @@ void *xmmap(size_t size);
176char *xcrypt(const char *password, const char *salt); 189char *xcrypt(const char *password, const char *salt);
177char *shadow_pw(struct passwd *pw); 190char *shadow_pw(struct passwd *pw);
178 191
179
180/* rfc2553 socket API replacements */ 192/* rfc2553 socket API replacements */
181#include "fake-rfc2553.h" 193#include "fake-rfc2553.h"
182 194
183/* Routines for a single OS platform */ 195/* Routines for a single OS platform */
184#include "bsd-cray.h" 196#include "bsd-cray.h"
185#include "bsd-cygwin_util.h" 197#include "bsd-cygwin_util.h"
186#include "port-irix.h" 198
187#include "port-aix.h" 199#include "port-aix.h"
188#include "port-uw.h" 200#include "port-irix.h"
201#include "port-linux.h"
202#include "port-solaris.h"
189#include "port-tun.h" 203#include "port-tun.h"
204#include "port-uw.h"
190 205
191#endif /* _OPENBSD_COMPAT_H */ 206#endif /* _OPENBSD_COMPAT_H */