summaryrefslogtreecommitdiff
path: root/openbsd-compat/openbsd-compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/openbsd-compat.h')
-rw-r--r--openbsd-compat/openbsd-compat.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index 37d2064cd..cff547745 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -1,5 +1,3 @@
1/* $Id: openbsd-compat.h,v 1.62 2014/09/30 23:43:08 djm Exp $ */
2
3/* 1/*
4 * Copyright (c) 1999-2003 Damien Miller. All rights reserved. 2 * Copyright (c) 1999-2003 Damien Miller. All rights reserved.
5 * Copyright (c) 2003 Ben Lindstrom. All rights reserved. 3 * Copyright (c) 2003 Ben Lindstrom. All rights reserved.
@@ -64,7 +62,7 @@ void closefrom(int);
64 62
65#ifndef HAVE_GETCWD 63#ifndef HAVE_GETCWD
66char *getcwd(char *pt, size_t size); 64char *getcwd(char *pt, size_t size);
67#endif 65#endif
68 66
69#ifndef HAVE_REALLOCARRAY 67#ifndef HAVE_REALLOCARRAY
70void *reallocarray(void *, size_t, size_t); 68void *reallocarray(void *, size_t, size_t);
@@ -87,14 +85,16 @@ int rresvport_af(int *alport, sa_family_t af);
87#endif 85#endif
88 86
89#ifndef HAVE_STRLCPY 87#ifndef HAVE_STRLCPY
90/* #include <sys/types.h> XXX Still needed? */
91size_t strlcpy(char *dst, const char *src, size_t siz); 88size_t strlcpy(char *dst, const char *src, size_t siz);
92#endif 89#endif
93 90
94#ifndef HAVE_STRLCAT 91#ifndef HAVE_STRLCAT
95/* #include <sys/types.h> XXX Still needed? */
96size_t strlcat(char *dst, const char *src, size_t siz); 92size_t strlcat(char *dst, const char *src, size_t siz);
97#endif 93#endif
94
95#ifndef HAVE_STRCASESTR
96char *strcasestr(const char *, const char *);
97#endif
98 98
99#ifndef HAVE_SETENV 99#ifndef HAVE_SETENV
100int setenv(register const char *name, register const char *value, int rewrite); 100int setenv(register const char *name, register const char *value, int rewrite);
@@ -113,11 +113,11 @@ char *strptime(const char *buf, const char *fmt, struct tm *tm);
113int mkstemps(char *path, int slen); 113int mkstemps(char *path, int slen);
114int mkstemp(char *path); 114int mkstemp(char *path);
115char *mkdtemp(char *path); 115char *mkdtemp(char *path);
116#endif 116#endif
117 117
118#ifndef HAVE_DAEMON 118#ifndef HAVE_DAEMON
119int daemon(int nochdir, int noclose); 119int daemon(int nochdir, int noclose);
120#endif 120#endif
121 121
122#ifndef HAVE_DIRNAME 122#ifndef HAVE_DIRNAME
123char *dirname(const char *path); 123char *dirname(const char *path);
@@ -142,7 +142,7 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
142 142
143#ifndef HAVE_INET_ATON 143#ifndef HAVE_INET_ATON
144int inet_aton(const char *cp, struct in_addr *addr); 144int inet_aton(const char *cp, struct in_addr *addr);
145#endif 145#endif
146 146
147#ifndef HAVE_STRSEP 147#ifndef HAVE_STRSEP
148char *strsep(char **stringp, const char *delim); 148char *strsep(char **stringp, const char *delim);
@@ -154,7 +154,6 @@ void compat_init_setproctitle(int argc, char *argv[]);
154#endif 154#endif
155 155
156#ifndef HAVE_GETGROUPLIST 156#ifndef HAVE_GETGROUPLIST
157/* #include <grp.h> XXXX Still needed ? */
158int getgrouplist(const char *, gid_t, gid_t *, int *); 157int getgrouplist(const char *, gid_t, gid_t *, int *);
159#endif 158#endif
160 159
@@ -199,18 +198,16 @@ u_int32_t arc4random_uniform(u_int32_t);
199 198
200#ifndef HAVE_ASPRINTF 199#ifndef HAVE_ASPRINTF
201int asprintf(char **, const char *, ...); 200int asprintf(char **, const char *, ...);
202#endif 201#endif
203 202
204#ifndef HAVE_OPENPTY 203#ifndef HAVE_OPENPTY
205# include <sys/ioctl.h> /* for struct winsize */ 204# include <sys/ioctl.h> /* for struct winsize */
206int openpty(int *, int *, char *, struct termios *, struct winsize *); 205int openpty(int *, int *, char *, struct termios *, struct winsize *);
207#endif /* HAVE_OPENPTY */ 206#endif /* HAVE_OPENPTY */
208 207
209/* #include <sys/types.h> XXX needed? For size_t */
210
211#ifndef HAVE_SNPRINTF 208#ifndef HAVE_SNPRINTF
212int snprintf(char *, size_t, SNPRINTF_CONST char *, ...); 209int snprintf(char *, size_t, SNPRINTF_CONST char *, ...);
213#endif 210#endif
214 211
215#ifndef HAVE_STRTOLL 212#ifndef HAVE_STRTOLL
216long long strtoll(const char *, char **, int); 213long long strtoll(const char *, char **, int);
@@ -299,7 +296,6 @@ int bcrypt_pbkdf(const char *, size_t, const u_int8_t *, size_t,
299void explicit_bzero(void *p, size_t n); 296void explicit_bzero(void *p, size_t n);
300#endif 297#endif
301 298
302void *xmmap(size_t size);
303char *xcrypt(const char *password, const char *salt); 299char *xcrypt(const char *password, const char *salt);
304char *shadow_pw(struct passwd *pw); 300char *shadow_pw(struct passwd *pw);
305 301