1 #ifndef _LIB_OPENBSD_H_
2 #define _LIB_OPENBSD_H_
7 /* API definitions lifted from OpenBSD src/include */
10 #define _PW_NAME_LEN 63
13 #ifndef HAVE_REALLOCARRAY
14 void * reallocarray(void *optr, size_t nmemb, size_t size);
15 #endif /* HAVE_REALLOCARRAY */
17 long long strtonum(const char *numstr, long long minval,
18 long long maxval, const char **errstrp);
19 #endif /* !HAVE_STRTONUM */
22 #ifndef HAVE_EXPLICIT_BZERO
23 void explicit_bzero(void *, size_t);
26 size_t strlcat(char *dst, const char *src, size_t dsize);
27 #endif /* !HAVE_STRLCAT */
29 size_t strlcpy(char *dst, const char *src, size_t dsize);
30 #endif /* !HAVE_STRLCPY */
34 int execvpe(const char *, char *const *, char *const *);
35 #endif /* !HAVE_EXECVPE */
36 #ifndef HAVE_SETRESUID
37 int setresuid(uid_t, uid_t, uid_t);
38 #endif /* !HAVE_SETRESUID */
40 int pledge(const char *promises, const char *paths[]);
41 #endif /* !HAVE_PLEDGE */
42 #ifndef HAVE_CLOSEFROM
44 #endif /* !HAVE_CLOSEFROM */
48 void verrc(int eval, int code, const char *fmt, va_list ap);
49 #endif /* !HAVE_VERRC */
51 void errc(int eval, int code, const char *fmt, ...);
52 #endif /* !HAVE_ERRC */
54 #ifndef HAVE_SETPROGNAME
55 const char * getprogname(void);
56 void setprogname(const char *progname);
57 #endif /* !HAVE_SETPROGNAME */
59 #endif /* _LIB_OPENBSD_H_ */