xref: /freebsd/contrib/pkgconf/libpkgconf/bsdstubs.h (revision a3cefe7f2b4df0f70ff92d4570ce18e517af43ec)
1 /*
2  * bsdstubs.h
3  * Header for stub BSD function prototypes if unavailable on a specific platform.
4  *
5  * Copyright (c) 2012 William Pitcock <nenolod@dereferenced.org>.
6  *
7  * Permission to use, copy, modify, and/or distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * This software is provided 'as is' and without any warranty, express or
12  * implied.  In no event shall the authors be liable for any damages arising
13  * from the use of this software.
14  */
15 
16 #ifndef LIBPKGCONF_BSDSTUBS_H
17 #define LIBPKGCONF_BSDSTUBS_H
18 
19 #include <libpkgconf/libpkgconf-api.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 PKGCONF_API extern size_t pkgconf_strlcpy(char *dst, const char *src, size_t siz);
26 PKGCONF_API extern size_t pkgconf_strlcat(char *dst, const char *src, size_t siz);
27 PKGCONF_API extern char *pkgconf_strndup(const char *src, size_t len);
28 PKGCONF_API extern void *pkgconf_reallocarray(void *ptr, size_t m, size_t n);
29 PKGCONF_API extern int pkgconf_pledge(const char *promises, const char *execpromises);
30 PKGCONF_API extern int pkgconf_unveil(const char *path, const char *permissions);
31 
32 #ifdef __cplusplus
33 }
34 #endif
35 
36 #endif
37